site-operator-react 0.1.10 → 0.1.12
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.
|
@@ -61,7 +61,7 @@ function ae() {
|
|
|
61
61
|
return "Suspense";
|
|
62
62
|
case X:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case B:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof e == "object")
|
|
@@ -77,7 +77,7 @@ function ae() {
|
|
|
77
77
|
case z:
|
|
78
78
|
var r = e.render;
|
|
79
79
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
80
|
-
case
|
|
80
|
+
case H:
|
|
81
81
|
return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
|
|
82
82
|
case P:
|
|
83
83
|
r = e._payload, e = e._init;
|
|
@@ -127,7 +127,7 @@ function ae() {
|
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
129
|
function m(e) {
|
|
130
|
-
if (
|
|
130
|
+
if (C.call(e, "key")) {
|
|
131
131
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
132
132
|
if (r && r.isReactWarning) return !1;
|
|
133
133
|
}
|
|
@@ -135,7 +135,7 @@ function ae() {
|
|
|
135
135
|
}
|
|
136
136
|
function s(e, r) {
|
|
137
137
|
function t() {
|
|
138
|
-
|
|
138
|
+
N || (N = !0, console.error(
|
|
139
139
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
140
140
|
r
|
|
141
141
|
));
|
|
@@ -145,9 +145,9 @@ function ae() {
|
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function v() {
|
|
149
149
|
var e = l(this.type);
|
|
150
|
-
return
|
|
150
|
+
return h[e] || (h[e] = !0, console.error(
|
|
151
151
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
152
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
153
153
|
}
|
|
@@ -161,7 +161,7 @@ function ae() {
|
|
|
161
161
|
_owner: n
|
|
162
162
|
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
|
-
get:
|
|
164
|
+
get: v
|
|
165
165
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
@@ -197,12 +197,12 @@ function ae() {
|
|
|
197
197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
198
198
|
);
|
|
199
199
|
else _(a);
|
|
200
|
-
if (
|
|
200
|
+
if (C.call(r, "key")) {
|
|
201
201
|
a = l(e);
|
|
202
|
-
var
|
|
202
|
+
var R = Object.keys(r).filter(function(K) {
|
|
203
203
|
return K !== "key";
|
|
204
204
|
});
|
|
205
|
-
n = 0 <
|
|
205
|
+
n = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", I[a + n] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
207
|
let props = %s;
|
|
208
208
|
<%s {...props} />
|
|
@@ -211,7 +211,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
211
211
|
<%s key={someKey} {...props} />`,
|
|
212
212
|
n,
|
|
213
213
|
a,
|
|
214
|
-
|
|
214
|
+
R,
|
|
215
215
|
a
|
|
216
216
|
), I[a + n] = !0);
|
|
217
217
|
}
|
|
@@ -238,7 +238,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
238
238
|
function j(e) {
|
|
239
239
|
return typeof e == "object" && e !== null && e.$$typeof === x;
|
|
240
240
|
}
|
|
241
|
-
var T = ee, x = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), O = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), V = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"),
|
|
241
|
+
var T = ee, x = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), O = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), V = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), S = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, Q = Array.isArray, y = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
244
|
T = {
|
|
@@ -246,7 +246,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
246
246
|
return e();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
249
|
+
var N, h = {}, Y = T.react_stack_bottom_frame.bind(
|
|
250
250
|
T,
|
|
251
251
|
u
|
|
252
252
|
)(), $ = y(d(u)), I = {};
|
|
@@ -287,7 +287,7 @@ const ie = ({
|
|
|
287
287
|
interceptor: u,
|
|
288
288
|
className: m,
|
|
289
289
|
composer: s,
|
|
290
|
-
thread:
|
|
290
|
+
thread: v,
|
|
291
291
|
header: c,
|
|
292
292
|
context: i
|
|
293
293
|
}) => {
|
|
@@ -298,15 +298,15 @@ const ie = ({
|
|
|
298
298
|
"agent-chat",
|
|
299
299
|
{
|
|
300
300
|
ref: _,
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
301
|
+
backendUrl: l,
|
|
302
|
+
conversationUrl: E,
|
|
303
|
+
appName: f,
|
|
304
|
+
agentAvatar: d,
|
|
305
305
|
disclaimer: s == null ? void 0 : s.disclaimer,
|
|
306
306
|
placeholder: s == null ? void 0 : s.placeholder,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
307
|
+
emptyText: v == null ? void 0 : v.emptyText,
|
|
308
|
+
headerTitle: c == null ? void 0 : c.title,
|
|
309
|
+
hideHeader: c == null ? void 0 : c.hide,
|
|
310
310
|
inspector: o ? "true" : void 0,
|
|
311
311
|
interceptor: u ? !0 : void 0,
|
|
312
312
|
class: m
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var x;function J(){if(x)return b;x=1;var
|
|
9
|
+
*/var x;function J(){if(x)return b;x=1;var s=Symbol.for("react.transitional.element"),p=Symbol.for("react.fragment");function E(_,o,u){var m=null;if(u!==void 0&&(m=""+u),o.key!==void 0&&(m=""+o.key),"key"in o){u={};for(var l in o)l!=="key"&&(u[l]=o[l])}else u=o;return o=u.ref,{$$typeof:s,type:_,key:m,ref:o!==void 0?o:null,props:u}}return b.Fragment=p,b.jsx=E,b.jsxs=E,b}var T={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var C;function V(){return C||(C=1,process.env.NODE_ENV!=="production"&&(function(){function
|
|
17
|
+
*/var C;function V(){return C||(C=1,process.env.NODE_ENV!=="production"&&(function(){function s(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case P:return"Fragment";case Z:return"Profiler";case B:return"StrictMode";case re:return"Suspense";case te:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case H:return"Portal";case K:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case ee:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return r=e.displayName||null,r!==null?r:s(e.type)||"Memo";case y:r=e._payload,e=e._init;try{return s(e(r))}catch{}}return null}function p(e){return""+e}function E(e){try{p(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),p(e)}}function _(e){if(e===P)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===y)return"<...>";try{var r=s(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function o(){var e=g.A;return e===null?null:e.getOwner()}function u(){return Error("react-stack-top-frame")}function m(e){if(F.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function l(e,r){function t(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function k(){var e=s(this.type);return M[e]||(M[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function d(e,r,t,n,A,w){var a=t.ref;return e={$$typeof:I,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:k}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:w}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function i(e,r,t,n,A,w){var a=r.children;if(a!==void 0)if(n)if(se(a)){for(n=0;n<a.length;n++)R(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else R(a);if(F.call(r,"key")){a=s(e);var v=Object.keys(r).filter(function(ue){return ue!=="key"});n=0<v.length?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}",U[a+n]||(v=0<v.length?"{"+v.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,n,a,v,a),U[a+n]=!0)}if(a=null,t!==void 0&&(E(t),a=""+t),
|
|
22
|
+
<%s key={someKey} {...props} />`,n,a,v,a),U[a+n]=!0)}if(a=null,t!==void 0&&(E(t),a=""+t),m(r)&&(E(r.key),a=""+r.key),"key"in r){t={};for(var h in r)h!=="key"&&(t[h]=r[h])}else t=r;return a&&l(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),d(e,a,t,o(),A,w)}function R(e){Y(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===y&&(e._payload.status==="fulfilled"?Y(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function Y(e){return typeof e=="object"&&e!==null&&e.$$typeof===I}var S=f,I=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),K=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),oe=Symbol.for("react.client.reference"),g=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,se=Array.isArray,j=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(e){return e()}};var D,M={},L=S.react_stack_bottom_frame.bind(S,u)(),W=j(_(u)),U={};T.Fragment=P,T.jsx=function(e,r,t){var n=1e4>g.recentlyCreatedOwnerStacks++;return i(e,r,t,!1,n?Error("react-stack-top-frame"):L,n?j(_(e)):W)},T.jsxs=function(e,r,t){var n=1e4>g.recentlyCreatedOwnerStacks++;return i(e,r,t,!0,n?Error("react-stack-top-frame"):L,n?j(_(e)):W)}})()),T}var N;function z(){return N||(N=1,process.env.NODE_ENV==="production"?O.exports=J():O.exports=V()),O.exports}var q=z();const G=({backendUrl:s,conversationUrl:p,appName:E,agentAvatar:_,inspector:o,interceptor:u,className:m,composer:l,thread:k,header:d,context:i})=>{const R=f.useRef(null);return f.useEffect(()=>{R.current&&(i!=null&&i.appContext)&&R.current.setAppContext(i.appContext)},[i==null?void 0:i.appContext]),q.jsx("agent-chat",{ref:R,backendUrl:s,conversationUrl:p,appName:E,agentAvatar:_,disclaimer:l==null?void 0:l.disclaimer,placeholder:l==null?void 0:l.placeholder,emptyText:k==null?void 0:k.emptyText,headerTitle:d==null?void 0:d.title,hideHeader:d==null?void 0:d.hide,inspector:o?"true":void 0,interceptor:u?!0:void 0,class:m})};function X(s){f.useEffect(()=>{$.chatPortalService.registerPortal(s)},[s])}c.AgentChat=G,c.useChatPortal=X,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "site-operator-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "React wrapper for site-operator, providing AgentChat component and hooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "jostvian",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dev": "vite build --watch"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"site-operator": "
|
|
35
|
+
"site-operator": "^0.1.11"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "^19.0.0",
|