@paramms/chat-widget 1.0.16 → 1.0.18

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/react.d.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  import { type MountOptions } from './index.js';
2
2
  interface BaseProps {
3
- /** Relay WebSocket URL — set as NEXT_PUBLIC_RELAY_WS_URL in .env required */
3
+ /** Relay URL — set as NEXT_PUBLIC_RELAY_URL in .env. Any scheme works:
4
+ * `https://api.example.com` is fine. The WebSocket URL and REST base are
5
+ * derived automatically — you do NOT need to pass `wss://` or `/ws`. */
4
6
  url: string;
7
+ /** HTTP(S) base for REST calls — only when the REST API is on a different
8
+ * origin than the socket. Normally omit. */
9
+ apiUrl?: string;
5
10
  /** Your Relay profile ID — set as NEXT_PUBLIC_RELAY_PROFILE_ID in .env — required */
6
11
  profileId: string;
7
12
  /** Your logged-in user's stable ID. When omitted the widget automatically
@@ -64,7 +69,7 @@ export interface ChatWidgetProps extends BaseProps {
64
69
  * />
65
70
  * ```
66
71
  */
67
- export declare function ChatWidget({ url, profileId, userId, userName, userEmail, userAvatar, contextTitle, contextSubtitle, contextStatus, subjectId, accent, launcher, position, quickReplies, height, i18n, translateLang, }: ChatWidgetProps): JSX.Element;
72
+ export declare function ChatWidget({ url, apiUrl, profileId, userId, userName, userEmail, userAvatar, contextTitle, contextSubtitle, contextStatus, subjectId, accent, launcher, position, quickReplies, height, i18n, translateLang, }: ChatWidgetProps): JSX.Element;
68
73
  export interface MarketplaceChatProps extends BaseProps {
69
74
  /** Unique ID for this listing — each listing gets its own thread.
70
75
  * Omit for a general (non-item-specific) conversation. */
@@ -114,10 +119,12 @@ export interface MarketplaceChatProps extends BaseProps {
114
119
  *
115
120
  * Only `url` and `profileId` are required. All other props are optional.
116
121
  */
117
- export declare function MarketplaceChat({ url, profileId, listingId, listingTitle, listingMeta, listingPrice, listingStatus, userId, userName, userEmail, userAvatar, accent, launcher, position, quickReplies, height, i18n, translateLang, }: MarketplaceChatProps): JSX.Element;
122
+ export declare function MarketplaceChat({ url, apiUrl, profileId, listingId, listingTitle, listingMeta, listingPrice, listingStatus, userId, userName, userEmail, userAvatar, accent, launcher, position, quickReplies, height, i18n, translateLang, }: MarketplaceChatProps): JSX.Element;
118
123
  export interface ChatAppProps {
119
124
  /** Relay WebSocket URL — required */
120
125
  url: string;
126
+ /** HTTP(S) base for REST calls. Defaults to the WS origin. */
127
+ apiUrl?: string;
121
128
  /** Your Relay profile ID — required */
122
129
  profileId: string;
123
130
  /** Your logged-in user's stable ID. Omit for anonymous (uses localStorage UID) */
@@ -160,10 +167,12 @@ export interface ChatAppProps {
160
167
  * }
161
168
  * ```
162
169
  */
163
- export declare function ChatApp({ url, profileId, userId, userName, userEmail, accent, height, i18n, }: ChatAppProps): JSX.Element;
170
+ export declare function ChatApp({ url, apiUrl, profileId, userId, userName, userEmail, accent, height, i18n, }: ChatAppProps): JSX.Element;
164
171
  export interface ChatAppLauncherProps {
165
172
  /** Relay WebSocket URL — required */
166
173
  url: string;
174
+ /** HTTP(S) base for REST calls. Defaults to the WS origin. */
175
+ apiUrl?: string;
167
176
  /** Your Relay profile ID — required */
168
177
  profileId: string;
169
178
  /** Your logged-in user's stable ID */
@@ -215,5 +224,5 @@ export interface ChatAppLauncherProps {
215
224
  * />
216
225
  * ```
217
226
  */
218
- export declare function ChatAppLauncher({ url, profileId, userId, userName, userEmail, accent, floating, position, label, panelWidth, panelHeight, }: ChatAppLauncherProps): JSX.Element;
227
+ export declare function ChatAppLauncher({ url, apiUrl, profileId, userId, userName, userEmail, accent, floating, position, label, panelWidth, panelHeight, }: ChatAppLauncherProps): JSX.Element;
219
228
  export {};
package/dist/react.js CHANGED
@@ -1,175 +1,182 @@
1
- import { jsxs as C, jsx as h, Fragment as D } from "react/jsx-runtime";
2
- import { useState as M, useRef as v, useEffect as S } from "react";
3
- import { mount as L } from "./index.js";
4
- function Y({
5
- url: a,
6
- profileId: x,
1
+ import { jsxs as j, jsx as u, Fragment as $ } from "react/jsx-runtime";
2
+ import { useState as L, useRef as k, useEffect as W } from "react";
3
+ import { mount as D } from "./index.js";
4
+ function A({
5
+ url: b,
6
+ apiUrl: i,
7
+ profileId: a,
7
8
  userId: e,
8
- userName: r,
9
- userEmail: l,
9
+ userName: l,
10
+ userEmail: c,
10
11
  userAvatar: o,
11
- contextTitle: w,
12
- contextSubtitle: b,
12
+ contextTitle: m,
13
+ contextSubtitle: y,
13
14
  contextStatus: t,
14
15
  subjectId: p,
15
- accent: d,
16
+ accent: s,
16
17
  launcher: n,
17
- position: c,
18
- quickReplies: s,
19
- height: f = "100%",
20
- i18n: y,
21
- translateLang: i
18
+ position: d,
19
+ quickReplies: f,
20
+ height: h = "100%",
21
+ i18n: g,
22
+ translateLang: r
22
23
  }) {
23
- const g = v(null), u = v(null);
24
- return S(() => {
25
- var m;
26
- if (g.current)
27
- return (m = u.current) == null || m.close(), u.current = L({
28
- el: g.current,
29
- url: a,
30
- profileId: x,
24
+ const w = k(null), x = k(null);
25
+ return W(() => {
26
+ var v;
27
+ if (w.current)
28
+ return (v = x.current) == null || v.close(), x.current = D({
29
+ el: w.current,
30
+ url: b,
31
+ ...i ? { apiUrl: i } : {},
32
+ profileId: a,
31
33
  ...p ? { subjectId: p } : {},
32
34
  ...e ? { token: e } : {},
33
- ...e || r || l || o ? {
35
+ ...e || l || c || o ? {
34
36
  user: {
35
- ...r ? { name: r } : {},
36
- ...l ? { email: l } : {},
37
+ ...l ? { name: l } : {},
38
+ ...c ? { email: c } : {},
37
39
  ...o ? { avatar: o } : {}
38
40
  }
39
41
  } : {},
40
- ...w ? {
42
+ ...m ? {
41
43
  subject: {
42
- title: w,
43
- ...b ? { subtitle: b } : {},
44
+ title: m,
45
+ ...y ? { subtitle: y } : {},
44
46
  ...t ? { status: t } : {}
45
47
  }
46
48
  } : {},
47
- ...s ? { quickReplies: s } : {},
48
- ...d ? { accent: d } : {},
49
- ...i ? { translateLang: i } : {},
50
- ...y ? { i18n: y } : {},
51
- ...n ? { launcher: n, position: c ?? "bottom-right" } : {}
49
+ ...f ? { quickReplies: f } : {},
50
+ ...s ? { accent: s } : {},
51
+ ...r ? { translateLang: r } : {},
52
+ ...g ? { i18n: g } : {},
53
+ ...n ? { launcher: n, position: d ?? "bottom-right" } : {}
52
54
  }), () => {
53
- var R;
54
- (R = u.current) == null || R.close(), u.current = null;
55
+ var C;
56
+ (C = x.current) == null || C.close(), x.current = null;
55
57
  };
56
- }, [a, x, p, e, r, l, d, n, c, i]), /* @__PURE__ */ h(
58
+ }, [b, i, a, p, e, l, c, s, n, d, r]), /* @__PURE__ */ u(
57
59
  "div",
58
60
  {
59
- ref: g,
60
- style: n ? { width: 0, height: 0, overflow: "hidden" } : { width: "100%", height: f, minHeight: f === "100%" ? "480px" : void 0 }
61
+ ref: w,
62
+ style: n ? { width: 0, height: 0, overflow: "hidden" } : { width: "100%", height: h, minHeight: h === "100%" ? "480px" : void 0 }
61
63
  }
62
64
  );
63
65
  }
64
- const B = [
66
+ const T = [
65
67
  "Is this still available?",
66
68
  "Can I schedule a viewing?",
67
69
  "What is your best price?"
68
70
  ];
69
- function A({
70
- url: a,
71
- profileId: x,
71
+ function K({
72
+ url: b,
73
+ apiUrl: i,
74
+ profileId: a,
72
75
  listingId: e,
73
- listingTitle: r,
74
- listingMeta: l,
76
+ listingTitle: l,
77
+ listingMeta: c,
75
78
  listingPrice: o,
76
- listingStatus: w,
77
- userId: b,
79
+ listingStatus: m,
80
+ userId: y,
78
81
  userName: t,
79
82
  userEmail: p,
80
- userAvatar: d,
83
+ userAvatar: s,
81
84
  accent: n,
82
- launcher: c,
83
- position: s,
84
- quickReplies: f,
85
- height: y = "100%",
86
- i18n: i,
87
- translateLang: g
85
+ launcher: d,
86
+ position: f,
87
+ quickReplies: h,
88
+ height: g = "100%",
89
+ i18n: r,
90
+ translateLang: w
88
91
  }) {
89
- const u = v(null), m = v(null);
90
- return S(() => {
91
- var R;
92
- if (u.current)
93
- return (R = m.current) == null || R.close(), m.current = L({
94
- el: u.current,
95
- url: a,
96
- profileId: x,
92
+ const x = k(null), v = k(null);
93
+ return W(() => {
94
+ var C;
95
+ if (x.current)
96
+ return (C = v.current) == null || C.close(), v.current = D({
97
+ el: x.current,
98
+ url: b,
99
+ ...i ? { apiUrl: i } : {},
100
+ profileId: a,
97
101
  ...e ? { subjectId: `listing_${e}` } : {},
98
- ...b ? { token: b } : {},
99
- ...b || t || p || d ? {
102
+ ...y ? { token: y } : {},
103
+ ...y || t || p || s ? {
100
104
  user: {
101
105
  ...t ? { name: t } : {},
102
106
  ...p ? { email: p } : {},
103
- ...d ? { avatar: d } : {},
107
+ ...s ? { avatar: s } : {},
104
108
  ...e ? { meta: { listingId: e } } : {}
105
109
  }
106
110
  } : {},
107
- ...r ? {
111
+ ...l ? {
108
112
  subject: {
109
- title: r,
110
- ...l ? { subtitle: l } : {},
113
+ title: l,
114
+ ...c ? { subtitle: c } : {},
111
115
  ...o ? { tags: [`$${o.toLocaleString()}`] } : {},
112
- ...w ? { status: w } : {}
116
+ ...m ? { status: m } : {}
113
117
  }
114
118
  } : {},
115
- quickReplies: f ?? B,
119
+ quickReplies: h ?? T,
116
120
  ...n ? { accent: n } : {},
117
- ...g ? { translateLang: g } : {},
118
- ...i ? { i18n: i } : {},
119
- ...c ? { launcher: c, position: s ?? "bottom-right" } : {}
121
+ ...w ? { translateLang: w } : {},
122
+ ...r ? { i18n: r } : {},
123
+ ...d ? { launcher: d, position: f ?? "bottom-right" } : {}
120
124
  }), () => {
121
- var W;
122
- (W = m.current) == null || W.close(), m.current = null;
125
+ var z;
126
+ (z = v.current) == null || z.close(), v.current = null;
123
127
  };
124
- }, [a, x, e, b, t, p, n, c, s, g]), /* @__PURE__ */ h(
128
+ }, [b, i, a, e, y, t, p, n, d, f, w]), /* @__PURE__ */ u(
125
129
  "div",
126
130
  {
127
- ref: u,
128
- style: c ? { width: 0, height: 0, overflow: "hidden" } : { width: "100%", height: y, minHeight: y === "100%" ? "480px" : void 0 }
131
+ ref: x,
132
+ style: d ? { width: 0, height: 0, overflow: "hidden" } : { width: "100%", height: g, minHeight: g === "100%" ? "480px" : void 0 }
129
133
  }
130
134
  );
131
135
  }
132
- function $({
133
- url: a,
134
- profileId: x,
136
+ function F({
137
+ url: b,
138
+ apiUrl: i,
139
+ profileId: a,
135
140
  userId: e,
136
- userName: r,
137
- userEmail: l,
141
+ userName: l,
142
+ userEmail: c,
138
143
  accent: o,
139
- height: w = "100%",
140
- i18n: b
144
+ height: m = "100%",
145
+ i18n: y
141
146
  }) {
142
- const [t, p] = M(null), d = v(null), n = v(null), c = v(null), s = v(null);
143
- S(() => {
144
- if (!d.current) return;
145
- let y = !1;
146
- return import("./chatlist.js").then(({ mountChatList: i }) => {
147
- y || !d.current || (c.current = i({
148
- el: d.current,
149
- url: a,
150
- profileId: x,
151
- onSelect: (g) => p(g),
147
+ const [t, p] = L(null), s = k(null), n = k(null), d = k(null), f = k(null);
148
+ W(() => {
149
+ if (!s.current) return;
150
+ let g = !1;
151
+ return import("./chatlist.js").then(({ mountChatList: r }) => {
152
+ g || !s.current || (d.current = r({
153
+ el: s.current,
154
+ url: b,
155
+ ...i ? { apiUrl: i } : {},
156
+ profileId: a,
157
+ onSelect: (w) => p(w),
152
158
  ...e ? { userId: e } : {},
153
159
  ...o ? { accent: o } : {},
154
- ...b ? { i18n: b } : {}
160
+ ...y ? { i18n: y } : {}
155
161
  }));
156
162
  }), () => {
157
- var i;
158
- y = !0, (i = c.current) == null || i.close(), c.current = null;
163
+ var r;
164
+ g = !0, (r = d.current) == null || r.close(), d.current = null;
159
165
  };
160
- }, [a, x, e]), S(() => {
161
- var y;
166
+ }, [b, a, e]), W(() => {
167
+ var g;
162
168
  if (!(!n.current || !t))
163
- return (y = s.current) == null || y.close(), s.current = L({
169
+ return (g = f.current) == null || g.close(), f.current = D({
164
170
  el: n.current,
165
- url: a,
166
- profileId: x,
171
+ url: b,
172
+ ...i ? { apiUrl: i } : {},
173
+ profileId: a,
167
174
  ...t.subjectId ? { subjectId: t.subjectId } : {},
168
175
  ...e ? { token: e } : {},
169
- ...e || r || l ? {
176
+ ...e || l || c ? {
170
177
  user: {
171
- ...r ? { name: r } : {},
172
- ...l ? { email: l } : {}
178
+ ...l ? { name: l } : {},
179
+ ...c ? { email: c } : {}
173
180
  }
174
181
  } : {},
175
182
  ...t.subjectTitle ? {
@@ -180,22 +187,22 @@ function $({
180
187
  } : {},
181
188
  ...o ? { accent: o } : {}
182
189
  }), () => {
183
- var i;
184
- (i = s.current) == null || i.close(), s.current = null;
190
+ var r;
191
+ (r = f.current) == null || r.close(), f.current = null;
185
192
  };
186
193
  }, [t == null ? void 0 : t.id]);
187
- const f = typeof window < "u" && window.innerWidth < 768;
188
- return /* @__PURE__ */ C("div", { style: { display: "flex", width: "100%", height: w, minHeight: "400px", overflow: "hidden" }, children: [
189
- /* @__PURE__ */ h("div", { style: {
190
- width: f ? "100%" : "360px",
191
- flex: f && t ? "none" : void 0,
192
- display: f && t ? "none" : "flex",
194
+ const h = typeof window < "u" && window.innerWidth < 768;
195
+ return /* @__PURE__ */ j("div", { style: { display: "flex", width: "100%", height: m, minHeight: "400px", overflow: "hidden" }, children: [
196
+ /* @__PURE__ */ u("div", { style: {
197
+ width: h ? "100%" : "360px",
198
+ flex: h && t ? "none" : void 0,
199
+ display: h && t ? "none" : "flex",
193
200
  flexDirection: "column",
194
- borderRight: f ? "none" : "1px solid #e8eaed",
201
+ borderRight: h ? "none" : "1px solid #e8eaed",
195
202
  minWidth: 0
196
- }, children: /* @__PURE__ */ h("div", { ref: d, style: { width: "100%", height: "100%" } }) }),
197
- t ? /* @__PURE__ */ C("div", { style: { flex: 1, display: "flex", flexDirection: "column", minWidth: 0, position: "relative" }, children: [
198
- f && /* @__PURE__ */ h(
203
+ }, children: /* @__PURE__ */ u("div", { ref: s, style: { width: "100%", height: "100%" } }) }),
204
+ t ? /* @__PURE__ */ j("div", { style: { flex: 1, display: "flex", flexDirection: "column", minWidth: 0, position: "relative" }, children: [
205
+ h && /* @__PURE__ */ u(
199
206
  "button",
200
207
  {
201
208
  onClick: () => p(null),
@@ -203,69 +210,71 @@ function $({
203
210
  children: "←"
204
211
  }
205
212
  ),
206
- /* @__PURE__ */ h("div", { ref: n, style: { width: "100%", height: "100%" } })
207
- ] }) : /* @__PURE__ */ h("div", { style: { flex: 1, display: f ? "none" : "flex", alignItems: "center", justifyContent: "center", color: "#9b9690", fontSize: 14 }, children: "Select a conversation" })
213
+ /* @__PURE__ */ u("div", { ref: n, style: { width: "100%", height: "100%" } })
214
+ ] }) : /* @__PURE__ */ u("div", { style: { flex: 1, display: h ? "none" : "flex", alignItems: "center", justifyContent: "center", color: "#9b9690", fontSize: 14 }, children: "Select a conversation" })
208
215
  ] });
209
216
  }
210
- function K({
211
- url: a,
212
- profileId: x,
217
+ function P({
218
+ url: b,
219
+ apiUrl: i,
220
+ profileId: a,
213
221
  userId: e,
214
- userName: r,
215
- userEmail: l,
222
+ userName: l,
223
+ userEmail: c,
216
224
  accent: o = "#4F63F5",
217
- floating: w = !0,
218
- position: b = "bottom-right",
225
+ floating: m = !0,
226
+ position: y = "bottom-right",
219
227
  label: t,
220
228
  panelWidth: p,
221
- panelHeight: d = "600px"
229
+ panelHeight: s = "600px"
222
230
  }) {
223
- const [n, c] = M(!1), s = v(null), f = b === "bottom-right", i = t ?? (w ? "💬" : "Messages");
224
- if (S(() => {
225
- const k = (z) => {
226
- z.key === "Escape" && c(!1);
231
+ const [n, d] = L(!1), f = k(null), h = y === "bottom-right", r = t ?? (m ? "💬" : "Messages");
232
+ if (W(() => {
233
+ const R = (M) => {
234
+ M.key === "Escape" && d(!1);
227
235
  };
228
- return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
229
- }, []), w) {
230
- const k = typeof window < "u" && window.innerWidth < 480, z = k ? "100vw" : p ?? "420px", H = k ? "100dvh" : d;
231
- return /* @__PURE__ */ C("div", { style: {
236
+ return document.addEventListener("keydown", R), () => document.removeEventListener("keydown", R);
237
+ }, []), m) {
238
+ const R = typeof window < "u" && window.innerWidth < 480, M = R ? "100vw" : p ?? "420px", B = R ? "100dvh" : s;
239
+ return /* @__PURE__ */ j("div", { style: {
232
240
  position: "fixed",
233
- [f ? "right" : "left"]: "20px",
241
+ [h ? "right" : "left"]: "20px",
234
242
  bottom: "20px",
235
243
  zIndex: 9999,
236
244
  display: "flex",
237
245
  flexDirection: "column",
238
- alignItems: f ? "flex-end" : "flex-start",
246
+ alignItems: h ? "flex-end" : "flex-start",
239
247
  gap: "12px"
240
248
  }, children: [
241
- /* @__PURE__ */ h("div", { style: {
242
- width: z,
243
- height: H,
244
- borderRadius: k ? "0" : "16px",
249
+ /* @__PURE__ */ u("div", { style: {
250
+ width: M,
251
+ height: B,
252
+ borderRadius: R ? "0" : "16px",
245
253
  overflow: "hidden",
246
254
  boxShadow: "0 8px 40px rgba(0,0,0,.18)",
247
255
  background: "#fff",
248
256
  display: n ? "flex" : "none",
249
257
  flexDirection: "column",
250
- transformOrigin: `bottom ${f ? "right" : "left"}`,
258
+ transformOrigin: `bottom ${h ? "right" : "left"}`,
251
259
  animation: n ? "ocl-pop-in .18s ease" : "none"
252
- }, children: /* @__PURE__ */ h(
253
- $,
260
+ }, children: /* @__PURE__ */ u(
261
+ F,
254
262
  {
255
- url: a,
256
- profileId: x,
263
+ url: b,
264
+ ...i ? { apiUrl: i } : {},
265
+ profileId: a,
257
266
  ...e ? { userId: e } : {},
258
- ...r ? { userName: r } : {},
259
- ...l ? { userEmail: l } : {},
267
+ ...l ? { userName: l } : {},
268
+ ...c ? { userEmail: c } : {},
260
269
  accent: o,
261
270
  height: "100%"
262
271
  }
263
272
  ) }),
264
- /* @__PURE__ */ h(
273
+ /* @__PURE__ */ u(
265
274
  "button",
266
275
  {
267
- ref: s,
268
- onClick: () => c((j) => !j),
276
+ ref: f,
277
+ onClick: () => d((S) => !S),
269
278
  style: {
270
279
  width: "56px",
271
280
  height: "56px",
@@ -279,27 +288,27 @@ function K({
279
288
  boxShadow: "0 4px 16px rgba(0,0,0,.25)",
280
289
  transition: "transform .15s"
281
290
  },
282
- onMouseEnter: (j) => {
283
- j.target.style.transform = "scale(1.08)";
291
+ onMouseEnter: (S) => {
292
+ S.target.style.transform = "scale(1.08)";
284
293
  },
285
- onMouseLeave: (j) => {
286
- j.target.style.transform = "scale(1)";
294
+ onMouseLeave: (S) => {
295
+ S.target.style.transform = "scale(1)";
287
296
  },
288
- children: n ? "✕" : i
297
+ children: n ? "✕" : r
289
298
  }
290
299
  ),
291
- /* @__PURE__ */ h("style", { children: "@keyframes ocl-pop-in { from { opacity:0; transform:scale(.95) } to { opacity:1; transform:scale(1) } }" })
300
+ /* @__PURE__ */ u("style", { children: "@keyframes ocl-pop-in { from { opacity:0; transform:scale(.95) } to { opacity:1; transform:scale(1) } }" })
292
301
  ] });
293
302
  }
294
- const g = p ?? "420px", [u, m] = M(null), R = () => {
295
- !n && s.current && m(s.current.getBoundingClientRect()), c((k) => !k);
296
- }, W = u ? u.bottom + 8 : 0, F = u ? window.innerWidth - u.right : 0;
297
- return /* @__PURE__ */ C(D, { children: [
298
- /* @__PURE__ */ C(
303
+ const w = p ?? "420px", [x, v] = L(null), C = () => {
304
+ !n && f.current && v(f.current.getBoundingClientRect()), d((R) => !R);
305
+ }, z = x ? x.bottom + 8 : 0, H = x ? window.innerWidth - x.right : 0;
306
+ return /* @__PURE__ */ j($, { children: [
307
+ /* @__PURE__ */ j(
299
308
  "button",
300
309
  {
301
- ref: s,
302
- onClick: R,
310
+ ref: f,
311
+ onClick: C,
303
312
  style: {
304
313
  display: "inline-flex",
305
314
  alignItems: "center",
@@ -316,50 +325,51 @@ function K({
316
325
  },
317
326
  children: [
318
327
  "💬 ",
319
- i
328
+ r
320
329
  ]
321
330
  }
322
331
  ),
323
- n && u && /* @__PURE__ */ C(D, { children: [
324
- /* @__PURE__ */ h(
332
+ n && x && /* @__PURE__ */ j($, { children: [
333
+ /* @__PURE__ */ u(
325
334
  "div",
326
335
  {
327
- onClick: () => c(!1),
336
+ onClick: () => d(!1),
328
337
  style: { position: "fixed", inset: 0, zIndex: 9998 }
329
338
  }
330
339
  ),
331
- /* @__PURE__ */ h("div", { style: {
340
+ /* @__PURE__ */ u("div", { style: {
332
341
  position: "fixed",
333
- top: W,
334
- right: F,
335
- width: g,
336
- height: d,
342
+ top: z,
343
+ right: H,
344
+ width: w,
345
+ height: s,
337
346
  borderRadius: "16px",
338
347
  overflow: "hidden",
339
348
  boxShadow: "0 8px 40px rgba(0,0,0,.2)",
340
349
  background: "#fff",
341
350
  zIndex: 9999,
342
351
  animation: "ocl-slide-in .18s ease"
343
- }, children: /* @__PURE__ */ h(
344
- $,
352
+ }, children: /* @__PURE__ */ u(
353
+ F,
345
354
  {
346
- url: a,
347
- profileId: x,
355
+ url: b,
356
+ ...i ? { apiUrl: i } : {},
357
+ profileId: a,
348
358
  ...e ? { userId: e } : {},
349
- ...r ? { userName: r } : {},
350
- ...l ? { userEmail: l } : {},
359
+ ...l ? { userName: l } : {},
360
+ ...c ? { userEmail: c } : {},
351
361
  accent: o,
352
362
  height: "100%"
353
363
  }
354
364
  ) }),
355
- /* @__PURE__ */ h("style", { children: "@keyframes ocl-slide-in { from { opacity:0; transform:translateY(-8px) } to { opacity:1; transform:translateY(0) } }" })
365
+ /* @__PURE__ */ u("style", { children: "@keyframes ocl-slide-in { from { opacity:0; transform:translateY(-8px) } to { opacity:1; transform:translateY(0) } }" })
356
366
  ] })
357
367
  ] });
358
368
  }
359
369
  export {
360
- $ as ChatApp,
361
- K as ChatAppLauncher,
362
- Y as ChatWidget,
363
- A as MarketplaceChat
370
+ F as ChatApp,
371
+ P as ChatAppLauncher,
372
+ A as ChatWidget,
373
+ K as MarketplaceChat
364
374
  };
365
375
  //# sourceMappingURL=react.js.map