@opencx/widget-react 5.14.0 → 5.15.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-BqeBBEEw.cjs → Chart.impl-1tLZ016z.cjs} +2 -2
- package/dist/{Chart.impl-BqeBBEEw.cjs.map → Chart.impl-1tLZ016z.cjs.map} +1 -1
- package/dist/{Chart.impl-f76-3-Kz.js → Chart.impl-BURnFwHb.js} +2 -2
- package/dist/{Chart.impl-f76-3-Kz.js.map → Chart.impl-BURnFwHb.js.map} +1 -1
- package/dist/{index-CDhPHP0u.js → index-BDJTS5VH.js} +1949 -1945
- package/dist/index-BDJTS5VH.js.map +1 -0
- package/dist/{index-BfYw7I9u.cjs → index-zggs8o0o.cjs} +45 -45
- package/dist/index-zggs8o0o.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/WidgetImperativeHandler.d.ts +12 -0
- package/dist/src/WidgetImperativeHandler.d.ts.map +1 -1
- package/dist/src/screens/chat/ChatInput.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/index-BfYw7I9u.cjs.map +0 -1
- package/dist/index-CDhPHP0u.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-zggs8o0o.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-BDJTS5VH.js";
|
|
7
7
|
export {
|
|
8
8
|
s as HostedSpecRenderer,
|
|
9
9
|
n as Widget,
|
package/dist/package.json.d.ts
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
+
import { RenewUserTokenResult } from '@opencx/widget-core';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
export type WidgetRef = {
|
|
3
4
|
/** Open the widget on a fresh conversation, optionally sending its first message. */
|
|
4
5
|
newChat: (options?: {
|
|
5
6
|
message?: string;
|
|
6
7
|
}) => Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Hand the widget a renewed `user.token` for the signed-in visitor, on your
|
|
10
|
+
* own schedule, instead of (or as well as) answering `user.refreshToken`.
|
|
11
|
+
* The open session is kept and an ended one comes back. A token for another
|
|
12
|
+
* visitor, an expired one, or anything that isn't a user token is refused
|
|
13
|
+
* with a reason and a console error: switch visitors through
|
|
14
|
+
* `options.user.token`. Rendering again with the same `options.user.token`
|
|
15
|
+
* keeps the token handed over here; a different one replaces it, and a
|
|
16
|
+
* remounted widget starts from `options.user.token` again.
|
|
17
|
+
*/
|
|
18
|
+
renewUserToken: (token: string) => RenewUserTokenResult;
|
|
7
19
|
};
|
|
8
20
|
export declare function WidgetImperativeHandler({ widgetRef, }: {
|
|
9
21
|
widgetRef: React.Ref<WidgetRef>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetImperativeHandler.d.ts","sourceRoot":"","sources":["../../src/WidgetImperativeHandler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WidgetImperativeHandler.d.ts","sourceRoot":"","sources":["../../src/WidgetImperativeHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,MAAM,SAAS,GAAG;IACtB,qFAAqF;IACrF,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D;;;;;;;;;OASG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,oBAAoB,CAAC;CACzD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,GACV,EAAE;IACD,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;CACjC,QA8BA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../src/screens/chat/ChatInput.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAuD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../src/screens/chat/ChatInput.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAsD5E;;;;GAIG;AACH,KAAK,cAAc,GAAG;IACpB,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;CAC3B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,GAAE,cAAmB,qBAGnD"}
|
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.15.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.15.0",
|
|
40
|
+
"@opencx/widget-react-headless": "5.15.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@types/react": ">=18 <20",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"tailwindcss-animate": "^1.0.7",
|
|
60
60
|
"tsx": "^4.19.2",
|
|
61
61
|
"vite-plugin-qrcode": "^0.3.0",
|
|
62
|
-
"@opencx/
|
|
63
|
-
"@opencx/
|
|
62
|
+
"@opencx/eslint-config": "0.0.1",
|
|
63
|
+
"@opencx/tsconfig": "0.0.2"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"clean": "rm -rf node_modules dist .turbo",
|