@inkeep/cxkit-primitives 0.5.45 → 0.5.46
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.cjs +5 -5
- package/dist/components/embedded-chat.js +1004 -986
- package/dist/hooks/use-debounce.cjs +1 -0
- package/dist/hooks/use-debounce.js +16 -0
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/dist/providers/hover-popover-provider.cjs +1 -0
- package/dist/providers/hover-popover-provider.js +13 -0
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react");function r(e,t){const[n,c]=u.useState(e);return u.useEffect(()=>{const o=setTimeout(()=>{c(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}exports.useDebounce=r;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState as c, useEffect as r } from "react";
|
|
3
|
+
function i(e, t) {
|
|
4
|
+
const [u, n] = c(e);
|
|
5
|
+
return r(() => {
|
|
6
|
+
const o = setTimeout(() => {
|
|
7
|
+
n(e);
|
|
8
|
+
}, t);
|
|
9
|
+
return () => {
|
|
10
|
+
clearTimeout(o);
|
|
11
|
+
};
|
|
12
|
+
}, [e, t]), u;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as useDebounce
|
|
16
|
+
};
|
package/dist/index.d.cts
CHANGED
|
@@ -27,7 +27,6 @@ import { FormField } from '@inkeep/cxkit-types';
|
|
|
27
27
|
import { FormHTMLAttributes } from 'react';
|
|
28
28
|
import { ForwardRefExoticComponent } from 'react';
|
|
29
29
|
import { GetHelpOption } from '@inkeep/cxkit-types';
|
|
30
|
-
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
31
30
|
import { HTMLAttributes } from 'react';
|
|
32
31
|
import { IconBaseProps } from 'react-icons/lib';
|
|
33
32
|
import { ImgHTMLAttributes } from 'react';
|
|
@@ -2056,7 +2055,7 @@ declare const EmbeddedChatPrimitiveConversationLoading: (props: ComponentPropsWi
|
|
|
2056
2055
|
|
|
2057
2056
|
declare const EmbeddedChatPrimitiveDisclaimer: MemoExoticComponent<(props: ComponentPropsWithRef<typeof PrimitiveDisclaimer>) => JSX.Element | null>;
|
|
2058
2057
|
|
|
2059
|
-
declare const EmbeddedChatPrimitiveDisclaimerArrow: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
2058
|
+
declare const EmbeddedChatPrimitiveDisclaimerArrow: ForwardRefExoticComponent< PolymorphicProps & Omit<PopoverPrimitive.PopoverArrowProps & RefAttributes<SVGSVGElement>, "_id"> & Partial<Pick<PopoverPrimitive.PopoverArrowProps & RefAttributes<SVGSVGElement>, "_id">>>;
|
|
2060
2059
|
|
|
2061
2060
|
declare const EmbeddedChatPrimitiveDisclaimerContent: (props: ComponentPropsWithRef<typeof PrimitiveDisclaimerContent>) => JSX.Element;
|
|
2062
2061
|
|
|
@@ -2064,7 +2063,7 @@ declare const EmbeddedChatPrimitiveDisclaimerLabel: MemoExoticComponent<(props:
|
|
|
2064
2063
|
|
|
2065
2064
|
declare const EmbeddedChatPrimitiveDisclaimerText: MemoExoticComponent<(props: Omit<ComponentPropsWithRef<typeof PrimitiveDisclaimerText>, "componentStyles">) => JSX.Element>;
|
|
2066
2065
|
|
|
2067
|
-
declare const EmbeddedChatPrimitiveDisclaimerTrigger:
|
|
2066
|
+
declare const EmbeddedChatPrimitiveDisclaimerTrigger: MemoExoticComponent<(props: ComponentPropsWithRef<typeof PrimitiveDisclaimerTrigger>) => JSX.Element>;
|
|
2068
2067
|
|
|
2069
2068
|
declare const EmbeddedChatPrimitiveExampleQuestion: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
2070
2069
|
|
|
@@ -3405,12 +3404,14 @@ declare const PrimitiveConversationLoading: ForwardRefExoticComponent< Polymorph
|
|
|
3405
3404
|
|
|
3406
3405
|
declare const PrimitiveDisclaimer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
3407
3406
|
|
|
3408
|
-
declare const PrimitiveDisclaimerContent: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
3407
|
+
declare const PrimitiveDisclaimerContent: ForwardRefExoticComponent< PolymorphicProps & Omit<PopoverPrimitive.PopoverContentProps & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick<PopoverPrimitive.PopoverContentProps & RefAttributes<HTMLDivElement>, "_id">>>;
|
|
3409
3408
|
|
|
3410
3409
|
declare const PrimitiveDisclaimerLabel: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
|
|
3411
3410
|
|
|
3412
3411
|
declare const PrimitiveDisclaimerText: ForwardRefExoticComponent< PolymorphicProps & Omit< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & MarkdownProps, "_id"> & Partial<Pick< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & MarkdownProps, "_id">>>;
|
|
3413
3412
|
|
|
3413
|
+
declare const PrimitiveDisclaimerTrigger: ForwardRefExoticComponent< PolymorphicProps & Omit<PopoverPrimitive.PopoverTriggerProps & RefAttributes<HTMLButtonElement>, "children" | "_id"> & Partial<Pick<PopoverPrimitive.PopoverTriggerProps & RefAttributes<HTMLButtonElement>, "children" | "_id">>>;
|
|
3414
|
+
|
|
3414
3415
|
declare type PrimitiveDivProps = React_2.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
3415
3416
|
|
|
3416
3417
|
declare const PrimitiveFeedbackForm: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id"> & Partial<Pick< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id">>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,6 @@ import { FormField } from '@inkeep/cxkit-types';
|
|
|
27
27
|
import { FormHTMLAttributes } from 'react';
|
|
28
28
|
import { ForwardRefExoticComponent } from 'react';
|
|
29
29
|
import { GetHelpOption } from '@inkeep/cxkit-types';
|
|
30
|
-
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
31
30
|
import { HTMLAttributes } from 'react';
|
|
32
31
|
import { IconBaseProps } from 'react-icons/lib';
|
|
33
32
|
import { ImgHTMLAttributes } from 'react';
|
|
@@ -2056,7 +2055,7 @@ declare const EmbeddedChatPrimitiveConversationLoading: (props: ComponentPropsWi
|
|
|
2056
2055
|
|
|
2057
2056
|
declare const EmbeddedChatPrimitiveDisclaimer: MemoExoticComponent<(props: ComponentPropsWithRef<typeof PrimitiveDisclaimer>) => JSX.Element | null>;
|
|
2058
2057
|
|
|
2059
|
-
declare const EmbeddedChatPrimitiveDisclaimerArrow: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
2058
|
+
declare const EmbeddedChatPrimitiveDisclaimerArrow: ForwardRefExoticComponent< PolymorphicProps & Omit<PopoverPrimitive.PopoverArrowProps & RefAttributes<SVGSVGElement>, "_id"> & Partial<Pick<PopoverPrimitive.PopoverArrowProps & RefAttributes<SVGSVGElement>, "_id">>>;
|
|
2060
2059
|
|
|
2061
2060
|
declare const EmbeddedChatPrimitiveDisclaimerContent: (props: ComponentPropsWithRef<typeof PrimitiveDisclaimerContent>) => JSX.Element;
|
|
2062
2061
|
|
|
@@ -2064,7 +2063,7 @@ declare const EmbeddedChatPrimitiveDisclaimerLabel: MemoExoticComponent<(props:
|
|
|
2064
2063
|
|
|
2065
2064
|
declare const EmbeddedChatPrimitiveDisclaimerText: MemoExoticComponent<(props: Omit<ComponentPropsWithRef<typeof PrimitiveDisclaimerText>, "componentStyles">) => JSX.Element>;
|
|
2066
2065
|
|
|
2067
|
-
declare const EmbeddedChatPrimitiveDisclaimerTrigger:
|
|
2066
|
+
declare const EmbeddedChatPrimitiveDisclaimerTrigger: MemoExoticComponent<(props: ComponentPropsWithRef<typeof PrimitiveDisclaimerTrigger>) => JSX.Element>;
|
|
2068
2067
|
|
|
2069
2068
|
declare const EmbeddedChatPrimitiveExampleQuestion: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
2070
2069
|
|
|
@@ -3405,12 +3404,14 @@ declare const PrimitiveConversationLoading: ForwardRefExoticComponent< Polymorph
|
|
|
3405
3404
|
|
|
3406
3405
|
declare const PrimitiveDisclaimer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
3407
3406
|
|
|
3408
|
-
declare const PrimitiveDisclaimerContent: ForwardRefExoticComponent< PolymorphicProps & Omit<
|
|
3407
|
+
declare const PrimitiveDisclaimerContent: ForwardRefExoticComponent< PolymorphicProps & Omit<PopoverPrimitive.PopoverContentProps & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick<PopoverPrimitive.PopoverContentProps & RefAttributes<HTMLDivElement>, "_id">>>;
|
|
3409
3408
|
|
|
3410
3409
|
declare const PrimitiveDisclaimerLabel: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
|
|
3411
3410
|
|
|
3412
3411
|
declare const PrimitiveDisclaimerText: ForwardRefExoticComponent< PolymorphicProps & Omit< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & MarkdownProps, "_id"> & Partial<Pick< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & MarkdownProps, "_id">>>;
|
|
3413
3412
|
|
|
3413
|
+
declare const PrimitiveDisclaimerTrigger: ForwardRefExoticComponent< PolymorphicProps & Omit<PopoverPrimitive.PopoverTriggerProps & RefAttributes<HTMLButtonElement>, "children" | "_id"> & Partial<Pick<PopoverPrimitive.PopoverTriggerProps & RefAttributes<HTMLButtonElement>, "children" | "_id">>>;
|
|
3414
|
+
|
|
3414
3415
|
declare type PrimitiveDivProps = React_2.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
3415
3416
|
|
|
3416
3417
|
declare const PrimitiveFeedbackForm: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id"> & Partial<Pick< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id">>>;
|
|
@@ -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"),f=require("./user-provider.cjs"),d=t.createContext(void 0),b=({children:e})=>{const{baseSettings:n,componentType:o}=B.useInkeepConfig(),{apiKey:r,analyticsApiBaseUrl:i,tags:c,privacyPreferences:E,env:g}=n,{userProperties:a}=f.useUser(),v=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"),f=require("./user-provider.cjs"),d=t.createContext(void 0),b=({children:e})=>{const{baseSettings:n,componentType:o}=B.useInkeepConfig(),{apiKey:r,analyticsApiBaseUrl:i,tags:c,privacyPreferences:E,env:g}=n,{userProperties:a}=f.useUser(),v=t.useMemo(()=>({widgetLibraryVersion:"0.5.46",componentType:o,tags:c}),[o,c]),u=!E.optOutAllAnalytics&&g!=="development",m={logEvent:t.useCallback(async l=>{const s={...v,...l.properties},p={eventName:l.eventName,properties:s,userProperties:a};if(u){if("conversation"in s&&!s.conversation?.id)return;y.logEvent(p,r,i)}n.onEvent?.(p)},[u,n,r,i,a,v])};return P.jsx(d.Provider,{value:m,children:e})},x=()=>{const e=t.useContext(d);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=b;exports.useBaseEvents=x;
|
|
@@ -7,7 +7,7 @@ import { useUser as b } from "./user-provider.js";
|
|
|
7
7
|
const u = x(void 0), U = ({ children: e }) => {
|
|
8
8
|
const { baseSettings: t, componentType: n } = C(), { apiKey: s, analyticsApiBaseUrl: r, tags: i, privacyPreferences: l, env: E } = t, { userProperties: a } = b(), c = g(
|
|
9
9
|
() => ({
|
|
10
|
-
widgetLibraryVersion: "0.5.
|
|
10
|
+
widgetLibraryVersion: "0.5.46",
|
|
11
11
|
componentType: n,
|
|
12
12
|
tags: i
|
|
13
13
|
}),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),r=o.createContext(void 0),s=({children:e,open:t,setOpen:v})=>n.jsx(r.Provider,{value:{open:t,setOpen:v},children:e}),u=()=>{const e=o.useContext(r);if(!e)throw new Error("useHoverPopover must be used within a HoverPopoverProvider");return e};exports.HoverPopoverProvider=s;exports.useHoverPopover=u;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as n, useContext as s } from "react";
|
|
4
|
+
const e = n(void 0), p = ({ children: o, open: r, setOpen: t }) => /* @__PURE__ */ v(e.Provider, { value: { open: r, setOpen: t }, children: o }), P = () => {
|
|
5
|
+
const o = s(e);
|
|
6
|
+
if (!o)
|
|
7
|
+
throw new Error("useHoverPopover must be used within a HoverPopoverProvider");
|
|
8
|
+
return o;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
p as HoverPopoverProvider,
|
|
12
|
+
P as useHoverPopover
|
|
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.46",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"remark-gfm": "^4.0.1",
|
|
60
60
|
"unist-util-visit": "^5.0.0",
|
|
61
61
|
"use-sync-external-store": "^1.4.0",
|
|
62
|
-
"@inkeep/cxkit-color-mode": "0.5.
|
|
63
|
-
"@inkeep/cxkit-theme": "0.5.
|
|
64
|
-
"@inkeep/cxkit-types": "0.5.
|
|
62
|
+
"@inkeep/cxkit-color-mode": "0.5.46",
|
|
63
|
+
"@inkeep/cxkit-theme": "0.5.46",
|
|
64
|
+
"@inkeep/cxkit-types": "0.5.46"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@biomejs/biome": "1.9.4",
|