@opencx/widget-react 5.9.0 → 5.10.0
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/{Chart.impl-D-e-ljB-.js → Chart.impl-BJv8nMFH.js} +2 -2
- package/dist/{Chart.impl-D-e-ljB-.js.map → Chart.impl-BJv8nMFH.js.map} +1 -1
- package/dist/{Chart.impl-CgiXedqT.cjs → Chart.impl-bhOhKeoS.cjs} +2 -2
- package/dist/{Chart.impl-CgiXedqT.cjs.map → Chart.impl-bhOhKeoS.cjs.map} +1 -1
- package/dist/{index-Dr5xAVxl.js → index-CKgXh5ot.js} +3903 -3786
- package/dist/index-CKgXh5ot.js.map +1 -0
- package/dist/index-CLteV-u1.cjs +390 -0
- package/dist/index-CLteV-u1.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json.d.ts +1 -1
- package/dist/src/companion/useHostPortal.d.ts.map +1 -1
- package/dist/src/components/ClarificationQuestions.d.ts.map +1 -1
- package/dist/src/components/FrameDocument.d.ts.map +1 -1
- package/dist/src/components/MessageOptions.d.ts.map +1 -1
- package/dist/src/components/SuggestedReplyButton.d.ts.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/screens/chat/ChatCanvas.d.ts.map +1 -1
- package/dist/src/screens/chat/ChatInput.d.ts.map +1 -1
- package/dist/src/screens/home/HomeArticle.d.ts.map +1 -1
- package/dist/src/screens/home/HomeTopic.d.ts.map +1 -1
- package/dist/src/screens/home/home-data.d.ts +1 -0
- package/dist/src/screens/home/home-data.d.ts.map +1 -1
- package/dist/src/screens/home/home-state.d.ts +25 -0
- package/dist/src/screens/home/home-state.d.ts.map +1 -0
- package/dist/src/screens/home/index.d.ts.map +1 -1
- package/dist/src/screens/home/use-home-search.d.ts +1 -0
- package/dist/src/screens/home/use-home-search.d.ts.map +1 -1
- package/dist/src/screens/index.d.ts.map +1 -1
- package/dist/src/user-activity/UserActivityProvider.d.ts +21 -0
- package/dist/src/user-activity/UserActivityProvider.d.ts.map +1 -0
- package/dist/src/user-activity/useUserActivityListeners.d.ts +19 -0
- package/dist/src/user-activity/useUserActivityListeners.d.ts.map +1 -0
- package/dist/src/user-activity/useVisitorSendMessage.d.ts +9 -0
- package/dist/src/user-activity/useVisitorSendMessage.d.ts.map +1 -0
- package/package.json +3 -3
- package/dist/index-Cbc5wgsq.cjs +0 -390
- package/dist/index-Cbc5wgsq.cjs.map +0 -1
- package/dist/index-Dr5xAVxl.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("@radix-ui/react-popover");require("framer-motion");require("react");require("@opencx/widget-react-headless");const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("@radix-ui/react-popover");require("framer-motion");require("react");require("@opencx/widget-react-headless");const e=require("./index-CLteV-u1.cjs");exports.HostedSpecRenderer=e.HostedSpecRenderer;exports.Widget=e.Widget;exports.segmentContent=e.segmentContent;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import "@radix-ui/react-popover";
|
|
|
3
3
|
import "framer-motion";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@opencx/widget-react-headless";
|
|
6
|
-
import { H as s, W as n, s as a } from "./index-
|
|
6
|
+
import { H as s, W as n, s as a } from "./index-CKgXh5ot.js";
|
|
7
7
|
export {
|
|
8
8
|
s as HostedSpecRenderer,
|
|
9
9
|
n as Widget,
|
package/dist/package.json.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHostPortal.d.ts","sourceRoot":"","sources":["../../../src/companion/useHostPortal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useHostPortal.d.ts","sourceRoot":"","sources":["../../../src/companion/useHostPortal.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,IAAI,WAAW,GAAG,IAAI,CAmBlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClarificationQuestions.d.ts","sourceRoot":"","sources":["../../../src/components/ClarificationQuestions.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ClarificationQuestions.d.ts","sourceRoot":"","sources":["../../../src/components/ClarificationQuestions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D;;;;;;;;;GASG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,mBAAmB,CAAC;CAC9B,CAAC;AA4BF,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,GACR,EAAE,2BAA2B,4BAmP7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameDocument.d.ts","sourceRoot":"","sources":["../../../src/components/FrameDocument.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"FrameDocument.d.ts","sourceRoot":"","sources":["../../../src/components/FrameDocument.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAWrD;;;;;;;;;GASG;AAEH,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AAErD,wBAAgB,cAAc,CAAC,EAC7B,WAAmB,GACpB,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,UAmBhC;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,GACT,EAAE;IACD,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAiDA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageOptions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageOptions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,cAAc,GACf,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,oBAAoB,CAAC;CACtC,4BAiEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestedReplyButton.d.ts","sourceRoot":"","sources":["../../../src/components/SuggestedReplyButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SuggestedReplyButton.d.ts","sourceRoot":"","sources":["../../../src/components/SuggestedReplyButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG3D,wBAAgB,oBAAoB,CAAC,EACnC,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,qBAoBtC"}
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAavC,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,2BAA2B,CAAC;AA8EnC,QAAA,MAAM,MAAM;aAGC,YAAY;iBACR,mBAAmB,EAAE;uBACf,KAAK,CAAC,SAAS;qBACjB,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS;mCA2DpD,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB;;;;;GAKG;AACH,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,KAAK,cAAc,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,SAAS,GACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatCanvas.d.ts","sourceRoot":"","sources":["../../../../src/screens/chat/ChatCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatCanvas.d.ts","sourceRoot":"","sources":["../../../../src/screens/chat/ChatCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,wBAAgB,UAAU,6BA8BzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../src/screens/chat/ChatInput.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../src/screens/chat/ChatInput.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAoD5E;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,eAAe,EACf,WAAW,EACX,eAAe,EACf,QAAQ,EAAE,gBAAwB,GACnC,GAAE;IACD,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CACtB,qBAwvBL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeArticle.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/HomeArticle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HomeArticle.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/HomeArticle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAalD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAsBnD,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,aAAa,EACb,eAAe,EACf,UAAU,GACX,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC/C,qBAiKA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeTopic.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/HomeTopic.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HomeTopic.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/HomeTopic.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAYhD,wBAAgB,SAAS,CAAC,EACxB,YAAY,EACZ,KAAK,EACL,MAAM,EACN,MAAM,EACN,WAAW,EACX,aAAa,GACd,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,qBA2EA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-data.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/home-data.tsx"],"names":[],"mappings":"AAEA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"home-data.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/home-data.tsx"],"names":[],"mappings":"AAEA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,eAAe,8BAK1B,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAgC3E;AAED,wBAAgB,WAAW,IAAI,aAAa,CAK3C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { useHomeSearch } from './use-home-search';
|
|
3
|
+
export type HomeView = {
|
|
4
|
+
kind: 'topic';
|
|
5
|
+
topicId: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'article';
|
|
8
|
+
slug: string;
|
|
9
|
+
};
|
|
10
|
+
type HomeState = {
|
|
11
|
+
stack: HomeView[];
|
|
12
|
+
setStack: Dispatch<SetStateAction<HomeView[]>>;
|
|
13
|
+
homeSearch: ReturnType<typeof useHomeSearch>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The Articles tab's open topics and article, and its search, kept above the
|
|
17
|
+
* screens so switching to the Chat tab and back returns to them. They start
|
|
18
|
+
* over when the help center changes.
|
|
19
|
+
*/
|
|
20
|
+
export declare function HomeStateProvider({ children }: {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
export declare function useHomeState(): HomeState;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=home-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-state.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/home-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC/C,UAAU,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;CAC9C,CAAC;AAIF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAiB5E;AAED,wBAAgB,YAAY,IAAI,SAAS,CAKxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAmD,MAAM,OAAO,CAAC;AA0CxE,wBAAgB,UAAU,6BA6EzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-home-search.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/use-home-search.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,eAAe,EAAE,MAAM,EAAE;;;;sBAW5B,MAAM
|
|
1
|
+
{"version":3,"file":"use-home-search.d.ts","sourceRoot":"","sources":["../../../../src/screens/home/use-home-search.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,eAAe,EAAE,MAAM,EAAE;;;;sBAW5B,MAAM;;;EAUhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screens/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA0C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screens/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuC/D,wBAAgB,UAAU,sBA4EzB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UserActivity, UserActivityHomeView } from '@opencx/widget-core';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
type UserActivityValue = {
|
|
4
|
+
/** Calls `hooks.onUserActivity` with the visible screen and session. */
|
|
5
|
+
report: (activity: UserActivity) => void;
|
|
6
|
+
setHomeView: (view: UserActivityHomeView) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Reads the runtime on screen (in companion mode, the visible conversation)
|
|
10
|
+
* at the moment of each interaction, so the event describes what the visitor
|
|
11
|
+
* was looking at when they acted.
|
|
12
|
+
*/
|
|
13
|
+
export declare function UserActivityProvider({ children, }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
/** `null` outside the styled widget's provider: nothing to report to. */
|
|
17
|
+
export declare function useUserActivity(): UserActivityValue | null;
|
|
18
|
+
/** Publish the help center view a mounted home view shows. Pass a memoized view. */
|
|
19
|
+
export declare function useUserActivityHomeView(view: UserActivityHomeView): void;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=UserActivityProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserActivityProvider.d.ts","sourceRoot":"","sources":["../../../src/user-activity/UserActivityProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEZ,oBAAoB,EAErB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,KAAK,iBAAiB,GAAG;IACvB,wEAAwE;IACxE,MAAM,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACnD,CAAC;AAIF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAwCA;AAED,yEAAyE;AACzE,wBAAgB,eAAe,IAAI,iBAAiB,GAAG,IAAI,CAE1D;AAED,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAKxE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** How long scrolling must be quiet before `scroll-end`. */
|
|
2
|
+
export declare const SCROLL_QUIET_MS = 150;
|
|
3
|
+
/**
|
|
4
|
+
* Report the visitor's own interactions inside `target` (a widget frame's
|
|
5
|
+
* document, or a widget-owned container in the host page). Only trusted
|
|
6
|
+
* events count, so script-dispatched events never do.
|
|
7
|
+
*
|
|
8
|
+
* - `click`: pointer clicks and taps; a key that activates a button already
|
|
9
|
+
* reported `keyboard`, and its synthesized click (detail 0) is skipped.
|
|
10
|
+
* - `scroll-start` / `scroll-end`: started by wheel or touch-drag input
|
|
11
|
+
* only, because the widget scrolls itself when replies arrive. Momentum
|
|
12
|
+
* keeps the scroll alive; it ends on `scrollend` or after
|
|
13
|
+
* `SCROLL_QUIET_MS` without movement (a wheel at a list's edge moves
|
|
14
|
+
* nothing, so `scrollend` never comes).
|
|
15
|
+
*/
|
|
16
|
+
export declare function useUserActivityListeners(target: EventTarget | null, { scroll }: {
|
|
17
|
+
scroll: boolean;
|
|
18
|
+
}): void;
|
|
19
|
+
//# sourceMappingURL=useUserActivityListeners.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUserActivityListeners.d.ts","sourceRoot":"","sources":["../../../src/user-activity/useUserActivityListeners.ts"],"names":[],"mappings":"AAGA,4DAA4D;AAC5D,eAAO,MAAM,eAAe,MAAM,CAAC;AAKnC;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,WAAW,GAAG,IAAI,EAC1B,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAC9B,IAAI,CA0DN"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SendMessageInput } from '@opencx/widget-core';
|
|
2
|
+
/**
|
|
3
|
+
* `sendMessage` for sends made from the widget UI (including mode components
|
|
4
|
+
* rendered in the chat): it also reports `message-sent` the moment the message
|
|
5
|
+
* is built. Host-code sends (`newChat`) and the widget's own background sends
|
|
6
|
+
* use `sendMessage` directly and never report.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useVisitorSendMessage(): (input: SendMessageInput) => Promise<void>;
|
|
9
|
+
//# sourceMappingURL=useVisitorSendMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVisitorSendMessage.d.ts","sourceRoot":"","sources":["../../../src/user-activity/useVisitorSendMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAK5D;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,CACvC,KAAK,EAAE,gBAAgB,KACpB,OAAO,CAAC,IAAI,CAAC,CAkBjB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencx/widget-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.10.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"tailwind-merge": "^2.4.0",
|
|
37
37
|
"tinycolor2": "^1.6.0",
|
|
38
38
|
"zod": "^4.6.7",
|
|
39
|
-
"@opencx/widget-core": "5.
|
|
40
|
-
"@opencx/widget-react-headless": "5.
|
|
39
|
+
"@opencx/widget-core": "5.10.0",
|
|
40
|
+
"@opencx/widget-react-headless": "5.10.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@types/react": ">=18 <20",
|