@inkeep/cxkit-primitives 0.0.0-dev-20250310205338 → 0.0.0-dev-20250311011214
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-chat-action.cjs +1 -1
- package/dist/components/embedded-chat/use-chat-action.js +6 -6
- package/dist/components/modal/use-inkeep-modal.cjs +1 -1
- package/dist/components/modal/use-inkeep-modal.js +16 -23
- package/dist/components/modal.cjs +1 -1
- package/dist/components/modal.js +27 -27
- package/dist/index.d.cts +4 -8
- package/dist/index.d.ts +4 -8
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/dist/providers/chat-form-provider.cjs +1 -1
- package/dist/providers/chat-form-provider.js +23 -23
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../providers/conversation-provider.cjs"),l=require("../../providers/chat-events-provider.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../providers/conversation-provider.cjs"),l=require("../../providers/chat-events-provider.cjs"),a=require("../../providers/chat-form-provider.cjs"),c=require("../modal/modal-provider.cjs"),u=e=>{const{logEvent:n}=l.useChatEvents(),{conversation:o}=s.useInkeepConversation(),{openForm:t}=a.useChatForm(),r=c.useModal();return{handleAction:i=>{e.action.type==="open_form"?(i?.onOpenForm?.(),t?.(e.action.formSettings)):e.action.type==="invoke_callback"&&(e.action.callback({conversation:o}),e.action.shouldCloseModal&&r?.setOpen(!1))},logHelpAction:()=>{!("name"in e)||!o.id||n({eventName:"get_help_option_clicked",properties:{getHelpOption:e,conversation:o}})}}};exports.useChatAction=u;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useInkeepConversation as
|
|
3
|
-
import { useChatEvents as
|
|
2
|
+
import { useInkeepConversation as l } from "../../providers/conversation-provider.js";
|
|
3
|
+
import { useChatEvents as r } from "../../providers/chat-events-provider.js";
|
|
4
4
|
import { useChatForm as p } from "../../providers/chat-form-provider.js";
|
|
5
5
|
import { useModal as a } from "../modal/modal-provider.js";
|
|
6
6
|
const v = (o) => {
|
|
7
|
-
const { logEvent: n } =
|
|
8
|
-
return { handleAction: (
|
|
9
|
-
o.action.type === "open_form" ? (
|
|
7
|
+
const { logEvent: n } = r(), { conversation: e } = l(), { openForm: t } = p(), i = a();
|
|
8
|
+
return { handleAction: (s) => {
|
|
9
|
+
o.action.type === "open_form" ? (s?.onOpenForm?.(), t?.(o.action.formSettings)) : o.action.type === "invoke_callback" && (o.action.callback({
|
|
10
10
|
conversation: e
|
|
11
|
-
}), o.action.shouldCloseModal && i?.
|
|
11
|
+
}), o.action.shouldCloseModal && i?.setOpen(!1));
|
|
12
12
|
}, logHelpAction: () => {
|
|
13
13
|
!("name" in o) || !e.id || n({
|
|
14
14
|
eventName: "get_help_option_clicked",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),c=require("@radix-ui/react-use-controllable-state"),p=s=>{const{isOpen:t,onOpenChange:a,shortcutKey:o}=s??{},[l=!1,n]=c.useControllableState({prop:t,defaultProp:t,onChange:a});return u.useEffect(()=>{const r=e=>{o&&(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===o.toLowerCase()&&(e.preventDefault(),e.stopPropagation(),n(!0)),e.key==="Escape"&&t&&(e.preventDefault(),n(!1))};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[o,n,t]),{isOpen:l,setOpen:n,shortcutKey:o}};exports.useInkeepModal=p;
|
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
[e]
|
|
14
|
-
), p = s(() => e(!0), [e]), u = s(() => e(!1), [e]);
|
|
15
|
-
return d(() => {
|
|
16
|
-
const t = (o) => {
|
|
17
|
-
n && (o.metaKey || o.ctrlKey) && o.key.toLowerCase() === n.toLowerCase() && (o.preventDefault(), o.stopPropagation(), e(!0)), o.key === "Escape" && a && (o.preventDefault(), e(!1));
|
|
2
|
+
import { useEffect as u } from "react";
|
|
3
|
+
import { useControllableState as l } from "@radix-ui/react-use-controllable-state";
|
|
4
|
+
const i = (s) => {
|
|
5
|
+
const { isOpen: o, onOpenChange: a, shortcutKey: t } = s ?? {}, [p = !1, n] = l({
|
|
6
|
+
prop: o,
|
|
7
|
+
defaultProp: o,
|
|
8
|
+
onChange: a
|
|
9
|
+
});
|
|
10
|
+
return u(() => {
|
|
11
|
+
const r = (e) => {
|
|
12
|
+
t && (e.metaKey || e.ctrlKey) && e.key.toLowerCase() === t.toLowerCase() && (e.preventDefault(), e.stopPropagation(), n(!0)), e.key === "Escape" && o && (e.preventDefault(), n(!1));
|
|
18
13
|
};
|
|
19
|
-
return document.addEventListener("keydown",
|
|
20
|
-
}, [
|
|
21
|
-
isOpen:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
handleOpenChange: l,
|
|
25
|
-
shortcutKey: n
|
|
14
|
+
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
15
|
+
}, [t, n, o]), {
|
|
16
|
+
isOpen: p,
|
|
17
|
+
setOpen: n,
|
|
18
|
+
shortcutKey: t
|
|
26
19
|
};
|
|
27
20
|
};
|
|
28
21
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("../atoms/dialog.cjs"),i=require("./factory.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("../atoms/dialog.cjs"),i=require("./factory.cjs"),c=require("../atoms/icons/custom-icon.cjs"),u=require("./modal/use-inkeep-modal.cjs"),s=require("./modal/modal-provider.cjs"),m=require("../utils/compose-event-handlers.cjs"),M=require("../hooks/use-media-query.cjs"),p=require("../utils/misc.cjs"),v=i.ikp(t.Root,{_id:"modal"}),C=e=>{const{onOpenChange:n,config:l,...a}=e,r=u.useInkeepModal(l);return o.jsx(s.ModalProvider,{modal:r,children:o.jsx(v,{open:r.isOpen,onOpenChange:m.composeEventHandlers(n,d=>r.setOpen(d)),...a})})},y=i.ikp(t.Overlay,{_id:"modal__Overlay"}),_=i.ikp(t.Content,{_id:"modal__Content","aria-describedby":void 0}),q=e=>{const n=M.useMediaQuery("(max-width: 768px)");return o.jsx(_,{"data-mobile":p.dataAttr(n),...e})},O=i.ikp(t.Close,{_id:"modal__Close",children:o.jsx(c.CustomIcon,{iconKey:"close"})}),x=e=>s.useModal()?o.jsx(O,{...e}):null;exports.Close=x;exports.Content=q;exports.Modal=C;exports.Overlay=y;
|
package/dist/components/modal.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { Overlay as
|
|
4
|
-
import { ikp as
|
|
5
|
-
import { CustomIcon as
|
|
6
|
-
import { useInkeepModal as
|
|
7
|
-
import { ModalProvider as
|
|
8
|
-
import { composeEventHandlers as
|
|
9
|
-
import { useMediaQuery as
|
|
10
|
-
import { dataAttr as
|
|
11
|
-
const
|
|
3
|
+
import { Overlay as s, Root as d, Content as m, Close as c } from "../atoms/dialog.js";
|
|
4
|
+
import { ikp as r } from "./factory.js";
|
|
5
|
+
import { CustomIcon as p } from "../atoms/icons/custom-icon.js";
|
|
6
|
+
import { useInkeepModal as C } from "./modal/use-inkeep-modal.js";
|
|
7
|
+
import { ModalProvider as M, useModal as f } from "./modal/modal-provider.js";
|
|
8
|
+
import { composeEventHandlers as u } from "../utils/compose-event-handlers.js";
|
|
9
|
+
import { useMediaQuery as v } from "../hooks/use-media-query.js";
|
|
10
|
+
import { dataAttr as _ } from "../utils/misc.js";
|
|
11
|
+
const O = r(d, {
|
|
12
12
|
_id: "modal"
|
|
13
|
-
}),
|
|
14
|
-
const { onOpenChange: t, config: i, ...a } = o,
|
|
15
|
-
return /* @__PURE__ */ e(
|
|
16
|
-
|
|
13
|
+
}), E = (o) => {
|
|
14
|
+
const { onOpenChange: t, config: i, ...a } = o, n = C(i);
|
|
15
|
+
return /* @__PURE__ */ e(M, { modal: n, children: /* @__PURE__ */ e(
|
|
16
|
+
O,
|
|
17
17
|
{
|
|
18
|
-
open:
|
|
19
|
-
onOpenChange:
|
|
18
|
+
open: n.isOpen,
|
|
19
|
+
onOpenChange: u(t, (l) => n.setOpen(l)),
|
|
20
20
|
...a
|
|
21
21
|
}
|
|
22
22
|
) });
|
|
23
|
-
},
|
|
23
|
+
}, H = r(s, {
|
|
24
24
|
_id: "modal__Overlay"
|
|
25
|
-
}),
|
|
25
|
+
}), y = r(m, {
|
|
26
26
|
_id: "modal__Content",
|
|
27
27
|
"aria-describedby": void 0
|
|
28
|
-
}),
|
|
29
|
-
const t =
|
|
30
|
-
return /* @__PURE__ */ e(
|
|
31
|
-
}, h =
|
|
28
|
+
}), K = (o) => {
|
|
29
|
+
const t = v("(max-width: 768px)");
|
|
30
|
+
return /* @__PURE__ */ e(y, { "data-mobile": _(t), ...o });
|
|
31
|
+
}, h = r(c, {
|
|
32
32
|
_id: "modal__Close",
|
|
33
|
-
children: /* @__PURE__ */ e(
|
|
34
|
-
}),
|
|
33
|
+
children: /* @__PURE__ */ e(p, { iconKey: "close" })
|
|
34
|
+
}), Q = (o) => f() ? /* @__PURE__ */ e(h, { ...o }) : null;
|
|
35
35
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
Q as Close,
|
|
37
|
+
K as Content,
|
|
38
|
+
E as Modal,
|
|
39
|
+
H as Overlay
|
|
40
40
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -3541,10 +3541,8 @@ declare const useInkeepIntelligentForm: (props: InkeepIntelligentFormSettings) =
|
|
|
3541
3541
|
};
|
|
3542
3542
|
|
|
3543
3543
|
declare const useInkeepModal: (props: InkeepModalSettings | undefined) => {
|
|
3544
|
-
isOpen: boolean
|
|
3545
|
-
|
|
3546
|
-
closeModal: () => void;
|
|
3547
|
-
handleOpenChange: (newState: boolean) => void;
|
|
3544
|
+
isOpen: boolean;
|
|
3545
|
+
setOpen: Dispatch<SetStateAction<boolean | undefined>>;
|
|
3548
3546
|
shortcutKey: string | null | undefined;
|
|
3549
3547
|
};
|
|
3550
3548
|
|
|
@@ -3615,10 +3613,8 @@ export declare const useMessageAttachments: () => MessageAttachmentsContextValue
|
|
|
3615
3613
|
export declare const useMessageFeedback: () => FeedbackContextValue;
|
|
3616
3614
|
|
|
3617
3615
|
export declare const useModal: () => {
|
|
3618
|
-
isOpen: boolean
|
|
3619
|
-
|
|
3620
|
-
closeModal: () => void;
|
|
3621
|
-
handleOpenChange: (newState: boolean) => void;
|
|
3616
|
+
isOpen: boolean;
|
|
3617
|
+
setOpen: Dispatch<SetStateAction<boolean | undefined>>;
|
|
3622
3618
|
shortcutKey: string | null | undefined;
|
|
3623
3619
|
} | undefined;
|
|
3624
3620
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3541,10 +3541,8 @@ declare const useInkeepIntelligentForm: (props: InkeepIntelligentFormSettings) =
|
|
|
3541
3541
|
};
|
|
3542
3542
|
|
|
3543
3543
|
declare const useInkeepModal: (props: InkeepModalSettings | undefined) => {
|
|
3544
|
-
isOpen: boolean
|
|
3545
|
-
|
|
3546
|
-
closeModal: () => void;
|
|
3547
|
-
handleOpenChange: (newState: boolean) => void;
|
|
3544
|
+
isOpen: boolean;
|
|
3545
|
+
setOpen: Dispatch<SetStateAction<boolean | undefined>>;
|
|
3548
3546
|
shortcutKey: string | null | undefined;
|
|
3549
3547
|
};
|
|
3550
3548
|
|
|
@@ -3615,10 +3613,8 @@ export declare const useMessageAttachments: () => MessageAttachmentsContextValue
|
|
|
3615
3613
|
export declare const useMessageFeedback: () => FeedbackContextValue;
|
|
3616
3614
|
|
|
3617
3615
|
export declare const useModal: () => {
|
|
3618
|
-
isOpen: boolean
|
|
3619
|
-
|
|
3620
|
-
closeModal: () => void;
|
|
3621
|
-
handleOpenChange: (newState: boolean) => void;
|
|
3616
|
+
isOpen: boolean;
|
|
3617
|
+
setOpen: Dispatch<SetStateAction<boolean | undefined>>;
|
|
3622
3618
|
shortcutKey: string | null | undefined;
|
|
3623
3619
|
} | undefined;
|
|
3624
3620
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),t=require("react"),y=require("../atoms/api/analytics/events.cjs"),B=require("./config-provider.cjs"),b=require("./user-provider.cjs"),p=t.createContext(void 0),f=({children:e})=>{const{baseSettings:s,componentType:n}=B.useInkeepConfig(),{apiKey:o,analyticsApiBaseUrl:r,tags:i,privacyPreferences:d,env:E}=s,{userProperties:c}=b.useUser(),a=t.useMemo(()=>({widgetLibraryVersion:"0.5.
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),t=require("react"),y=require("../atoms/api/analytics/events.cjs"),B=require("./config-provider.cjs"),b=require("./user-provider.cjs"),p=t.createContext(void 0),f=({children:e})=>{const{baseSettings:s,componentType:n}=B.useInkeepConfig(),{apiKey:o,analyticsApiBaseUrl:r,tags:i,privacyPreferences:d,env:E}=s,{userProperties:c}=b.useUser(),a=t.useMemo(()=>({widgetLibraryVersion:"0.5.22",componentType:n,tags:i}),[n,i]),u=!d.optOutAllAnalytics&&E!=="development",g={logEvent:t.useCallback(async v=>{const m={...a,...v.properties},l={eventName:v.eventName,properties:m,userProperties:c};u&&y.logEvent(l,o,r),s.onEvent?.(l)},[u,s,o,r,c,a])};return P.jsx(p.Provider,{value:g,children:e})},x=()=>{const e=t.useContext(p);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=f;exports.useBaseEvents=x;
|
|
@@ -7,7 +7,7 @@ import { useUser as b } from "./user-provider.js";
|
|
|
7
7
|
const m = x(void 0), U = ({ children: e }) => {
|
|
8
8
|
const { baseSettings: t, componentType: o } = C(), { apiKey: n, analyticsApiBaseUrl: s, tags: r, privacyPreferences: u, env: l } = t, { userProperties: i } = b(), a = d(
|
|
9
9
|
() => ({
|
|
10
|
-
widgetLibraryVersion: "0.5.
|
|
10
|
+
widgetLibraryVersion: "0.5.22",
|
|
11
11
|
componentType: o,
|
|
12
12
|
tags: r
|
|
13
13
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react/jsx-runtime"),o=require("react"),x=require("react-hook-form"),P=require("./conversation-provider.cjs"),w=require("../components/modal/modal-provider.cjs"),M=require("../utils/form.cjs"),j="root.serverError",f=o.createContext(void 0);function h(){const[t,n]=o.useState(null),[S,u]=o.useState(!1),{conversation:i}=P.useInkeepConversation(),v=w.useModal(),F=e=>{n(e)},C=()=>{n(null),u(!1),t?.buttons.close?.action==="close_modal"&&v?.
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react/jsx-runtime"),o=require("react"),x=require("react-hook-form"),P=require("./conversation-provider.cjs"),w=require("../components/modal/modal-provider.cjs"),M=require("../utils/form.cjs"),j="root.serverError",f=o.createContext(void 0);function h(){const[t,n]=o.useState(null),[S,u]=o.useState(!1),{conversation:i}=P.useInkeepConversation(),v=w.useModal(),F=e=>{n(e)},C=()=>{n(null),u(!1),t?.buttons.close?.action==="close_modal"&&v?.setOpen(!1)},c=o.useMemo(()=>t?.fields.map(e=>{const s=e;return"_type"in e&&e._type==="include_chat_session"&&(s.isRequired=!1,s.inputType="checkbox",i.id||(s.isHidden=!0)),s}),[t?.fields,i.id]),a=c?.find(e=>"_type"in e&&e._type==="include_chat_session"),r=o.useMemo(()=>M.getFormDefaultValues(c),[c]),{control:b,handleSubmit:p,formState:{errors:m,isSubmitting:E},setError:_,reset:l}=x.useForm({defaultValues:r});o.useEffect(()=>{r&&l(r)},[l,r]);const y=p(async e=>{const R=i.id&&a&&e[a.name]?i:null;try{await t?.buttons.submit.onSubmit({values:e,conversation:R}),u(!0)}catch(d){_(j,{message:d instanceof Error?d.message:"Something went wrong."})}}),g=m?.root?.serverError;return{form:t,openForm:F,closeForm:C,handleSubmit:y,isSuccess:S,isSubmitting:E,formError:g,fields:c,errors:m,control:b,defaultValues:r}}const k=({children:t})=>{const n=h();return q.jsx(f.Provider,{value:n,children:t})},O=()=>{const t=o.useContext(f);if(!t)throw new Error("useChatForm must be used within a ChatFormProvider");return t};exports.ChatFormProvider=k;exports.useChatForm=O;exports.useChatFormState=h;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as w } from "react/jsx-runtime";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as f, useMemo as d, useEffect as R, createContext as M, useContext as P } from "react";
|
|
4
4
|
import { useForm as V } from "react-hook-form";
|
|
5
5
|
import { useInkeepConversation as k } from "./conversation-provider.js";
|
|
6
6
|
import { useModal as I } from "../components/modal/modal-provider.js";
|
|
7
|
-
import { getFormDefaultValues as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const [
|
|
11
|
-
r(
|
|
7
|
+
import { getFormDefaultValues as O } from "../utils/form.js";
|
|
8
|
+
const j = "root.serverError", p = M(void 0);
|
|
9
|
+
function q() {
|
|
10
|
+
const [o, r] = f(null), [h, c] = f(!1), { conversation: n } = k(), S = I(), b = (t) => {
|
|
11
|
+
r(t);
|
|
12
12
|
}, v = () => {
|
|
13
|
-
r(null), c(!1),
|
|
14
|
-
}, i =
|
|
15
|
-
const s =
|
|
16
|
-
return "_type" in
|
|
17
|
-
}), [
|
|
13
|
+
r(null), c(!1), o?.buttons.close?.action === "close_modal" && S?.setOpen(!1);
|
|
14
|
+
}, i = d(() => o?.fields.map((t) => {
|
|
15
|
+
const s = t;
|
|
16
|
+
return "_type" in t && t._type === "include_chat_session" && (s.isRequired = !1, s.inputType = "checkbox", n.id || (s.isHidden = !0)), s;
|
|
17
|
+
}), [o?.fields, n.id]), a = i?.find((t) => "_type" in t && t._type === "include_chat_session"), e = d(() => O(i), [i]), {
|
|
18
18
|
control: C,
|
|
19
19
|
handleSubmit: F,
|
|
20
20
|
formState: { errors: u, isSubmitting: E },
|
|
@@ -26,18 +26,18 @@ function A() {
|
|
|
26
26
|
R(() => {
|
|
27
27
|
e && m(e);
|
|
28
28
|
}, [m, e]);
|
|
29
|
-
const x = F(async (
|
|
30
|
-
const g = n.id && a &&
|
|
29
|
+
const x = F(async (t) => {
|
|
30
|
+
const g = n.id && a && t[a.name] ? n : null;
|
|
31
31
|
try {
|
|
32
|
-
await
|
|
32
|
+
await o?.buttons.submit.onSubmit({ values: t, conversation: g }), c(!0);
|
|
33
33
|
} catch (l) {
|
|
34
|
-
_(
|
|
34
|
+
_(j, {
|
|
35
35
|
message: l instanceof Error ? l.message : "Something went wrong."
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
}), y = u?.root?.serverError;
|
|
39
39
|
return {
|
|
40
|
-
form:
|
|
40
|
+
form: o,
|
|
41
41
|
openForm: b,
|
|
42
42
|
closeForm: v,
|
|
43
43
|
handleSubmit: x,
|
|
@@ -50,17 +50,17 @@ function A() {
|
|
|
50
50
|
defaultValues: e
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
const G = ({ children:
|
|
54
|
-
const r =
|
|
55
|
-
return /* @__PURE__ */ w(p.Provider, { value: r, children:
|
|
53
|
+
const G = ({ children: o }) => {
|
|
54
|
+
const r = q();
|
|
55
|
+
return /* @__PURE__ */ w(p.Provider, { value: r, children: o });
|
|
56
56
|
}, J = () => {
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
57
|
+
const o = P(p);
|
|
58
|
+
if (!o)
|
|
59
59
|
throw new Error("useChatForm must be used within a ChatFormProvider");
|
|
60
|
-
return
|
|
60
|
+
return o;
|
|
61
61
|
};
|
|
62
62
|
export {
|
|
63
63
|
G as ChatFormProvider,
|
|
64
64
|
J as useChatForm,
|
|
65
|
-
|
|
65
|
+
q as useChatFormState
|
|
66
66
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/cxkit-primitives",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250311011214",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"rehype-raw": "7.0.0",
|
|
59
59
|
"unist-util-visit": "^5.0.0",
|
|
60
60
|
"use-sync-external-store": "^1.4.0",
|
|
61
|
-
"@inkeep/cxkit-color-mode": "0.0.0-dev-
|
|
62
|
-
"@inkeep/cxkit-theme": "0.0.0-dev-
|
|
63
|
-
"@inkeep/cxkit-types": "0.0.0-dev-
|
|
61
|
+
"@inkeep/cxkit-color-mode": "0.0.0-dev-20250311011214",
|
|
62
|
+
"@inkeep/cxkit-theme": "0.0.0-dev-20250311011214",
|
|
63
|
+
"@inkeep/cxkit-types": "0.0.0-dev-20250311011214"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@biomejs/biome": "1.9.4",
|