@helpway/react 0.13.2 → 0.13.3

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/index.js CHANGED
@@ -87,6 +87,227 @@ function isRealtimeEvent(data) {
87
87
  return typeof data === "object" && data !== null && "type" in data && typeof data.type === "string";
88
88
  }
89
89
 
90
+ // ../types/src/doc-nav-icons.ts
91
+ var DOC_NAV_ICONS = [
92
+ {
93
+ name: "globe",
94
+ label: "Globe",
95
+ shapes: [
96
+ { t: "circle", cx: 12, cy: 12, r: 10 },
97
+ { t: "path", d: "M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" }
98
+ ]
99
+ },
100
+ {
101
+ name: "code",
102
+ label: "Code",
103
+ shapes: [
104
+ { t: "polyline", points: "16 18 22 12 16 6" },
105
+ { t: "polyline", points: "8 6 2 12 8 18" }
106
+ ]
107
+ },
108
+ {
109
+ name: "book",
110
+ label: "Book",
111
+ shapes: [
112
+ { t: "path", d: "M4 19.5A2.5 2.5 0 0 1 6.5 17H20" },
113
+ { t: "path", d: "M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z" }
114
+ ]
115
+ },
116
+ {
117
+ name: "rocket",
118
+ label: "Rocket",
119
+ shapes: [
120
+ { t: "path", d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z" },
121
+ { t: "path", d: "m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z" },
122
+ { t: "path", d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" }
123
+ ]
124
+ },
125
+ {
126
+ name: "terminal",
127
+ label: "Terminal",
128
+ shapes: [
129
+ { t: "polyline", points: "4 17 10 11 4 5" },
130
+ { t: "line", x1: 12, y1: 19, x2: 20, y2: 19 }
131
+ ]
132
+ },
133
+ {
134
+ name: "server",
135
+ label: "Server",
136
+ shapes: [
137
+ { t: "rect", x: 2, y: 2, width: 20, height: 8, rx: 2 },
138
+ { t: "rect", x: 2, y: 14, width: 20, height: 8, rx: 2 },
139
+ { t: "line", x1: 6, y1: 6, x2: 6.01, y2: 6 },
140
+ { t: "line", x1: 6, y1: 18, x2: 6.01, y2: 18 }
141
+ ]
142
+ },
143
+ {
144
+ name: "key",
145
+ label: "Key",
146
+ shapes: [
147
+ { t: "circle", cx: 7.5, cy: 15.5, r: 5.5 },
148
+ { t: "path", d: "m21 2-9.6 9.6M16 6l4 4" }
149
+ ]
150
+ },
151
+ {
152
+ name: "puzzle",
153
+ label: "Puzzle",
154
+ shapes: [
155
+ { t: "path", d: "M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.704.706 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.28 8.687c.24-.24.581-.353.925-.29.493.074.84.504 1.02.968a2.5 2.5 0 1 0 3.237-3.237c-.464-.18-.894-.527-.967-1.02a1.026 1.026 0 0 1 .289-.877l1.568-1.568A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.18.464-.527.894-1.02.968z" }
156
+ ]
157
+ },
158
+ {
159
+ name: "file",
160
+ label: "File",
161
+ shapes: [
162
+ { t: "path", d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" },
163
+ { t: "polyline", points: "14 2 14 8 20 8" }
164
+ ]
165
+ },
166
+ {
167
+ name: "settings",
168
+ label: "Settings",
169
+ shapes: [
170
+ { t: "circle", cx: 12, cy: 12, r: 3 },
171
+ { t: "path", d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" }
172
+ ]
173
+ },
174
+ {
175
+ name: "zap",
176
+ label: "Zap",
177
+ shapes: [{ t: "polygon", points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" }]
178
+ },
179
+ {
180
+ name: "layers",
181
+ label: "Layers",
182
+ shapes: [
183
+ { t: "polygon", points: "12 2 2 7 12 12 22 7 12 2" },
184
+ { t: "polyline", points: "2 17 12 22 22 17" },
185
+ { t: "polyline", points: "2 12 12 17 22 12" }
186
+ ]
187
+ },
188
+ {
189
+ name: "plug",
190
+ label: "Plug",
191
+ shapes: [
192
+ { t: "path", d: "M12 22v-5" },
193
+ { t: "path", d: "M9 8V2M15 8V2" },
194
+ { t: "path", d: "M18 8v5a6 6 0 0 1-12 0V8z" }
195
+ ]
196
+ },
197
+ {
198
+ name: "message",
199
+ label: "Message",
200
+ shapes: [{ t: "path", d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }]
201
+ },
202
+ {
203
+ name: "inbox",
204
+ label: "Inbox",
205
+ shapes: [
206
+ { t: "polyline", points: "22 12 16 12 14 15 10 15 8 12 2 12" },
207
+ { t: "path", d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }
208
+ ]
209
+ },
210
+ {
211
+ name: "users",
212
+ label: "Users",
213
+ shapes: [
214
+ { t: "path", d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" },
215
+ { t: "circle", cx: 9, cy: 7, r: 4 },
216
+ { t: "path", d: "M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75" }
217
+ ]
218
+ },
219
+ {
220
+ name: "mail",
221
+ label: "Mail",
222
+ shapes: [
223
+ { t: "rect", x: 2, y: 4, width: 20, height: 16, rx: 2 },
224
+ { t: "path", d: "m22 7-10 5L2 7" }
225
+ ]
226
+ },
227
+ {
228
+ name: "credit-card",
229
+ label: "Credit card",
230
+ shapes: [
231
+ { t: "rect", x: 1, y: 4, width: 22, height: 16, rx: 2 },
232
+ { t: "line", x1: 1, y1: 10, x2: 23, y2: 10 }
233
+ ]
234
+ },
235
+ {
236
+ name: "sparkles",
237
+ label: "Sparkles",
238
+ shapes: [
239
+ { t: "path", d: "m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3z" }
240
+ ]
241
+ },
242
+ {
243
+ name: "bell",
244
+ label: "Bell",
245
+ shapes: [
246
+ { t: "path", d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" },
247
+ { t: "path", d: "M10.3 21a1.94 1.94 0 0 0 3.4 0" }
248
+ ]
249
+ },
250
+ {
251
+ name: "search",
252
+ label: "Search",
253
+ shapes: [
254
+ { t: "circle", cx: 11, cy: 11, r: 8 },
255
+ { t: "path", d: "m21 21-4.3-4.3" }
256
+ ]
257
+ },
258
+ {
259
+ name: "wrench",
260
+ label: "Wrench",
261
+ shapes: [
262
+ { t: "path", d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" }
263
+ ]
264
+ },
265
+ {
266
+ name: "shield",
267
+ label: "Shield",
268
+ shapes: [
269
+ { t: "path", d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" },
270
+ { t: "path", d: "m9 12 2 2 4-4" }
271
+ ]
272
+ },
273
+ {
274
+ name: "lifebuoy",
275
+ label: "Life buoy",
276
+ shapes: [
277
+ { t: "circle", cx: 12, cy: 12, r: 10 },
278
+ { t: "circle", cx: 12, cy: 12, r: 4 },
279
+ { t: "line", x1: 4.93, y1: 4.93, x2: 9.17, y2: 9.17 },
280
+ { t: "line", x1: 14.83, y1: 14.83, x2: 19.07, y2: 19.07 },
281
+ { t: "line", x1: 14.83, y1: 9.17, x2: 19.07, y2: 4.93 },
282
+ { t: "line", x1: 4.93, y1: 19.07, x2: 9.17, y2: 14.83 }
283
+ ]
284
+ },
285
+ {
286
+ name: "chart",
287
+ label: "Chart",
288
+ shapes: [
289
+ { t: "line", x1: 12, y1: 20, x2: 12, y2: 10 },
290
+ { t: "line", x1: 18, y1: 20, x2: 18, y2: 4 },
291
+ { t: "line", x1: 6, y1: 20, x2: 6, y2: 16 }
292
+ ]
293
+ },
294
+ {
295
+ name: "share",
296
+ label: "Share",
297
+ shapes: [
298
+ { t: "circle", cx: 18, cy: 5, r: 3 },
299
+ { t: "circle", cx: 6, cy: 12, r: 3 },
300
+ { t: "circle", cx: 18, cy: 19, r: 3 },
301
+ { t: "line", x1: 8.59, y1: 13.51, x2: 15.42, y2: 17.49 },
302
+ { t: "line", x1: 15.41, y1: 6.51, x2: 8.59, y2: 10.49 }
303
+ ]
304
+ }
305
+ ];
306
+ var DOC_NAV_ICON_NAMES = DOC_NAV_ICONS.map((i) => i.name);
307
+ var DOC_NAV_ICON_MAP = Object.fromEntries(
308
+ DOC_NAV_ICONS.map((i) => [i.name, i])
309
+ );
310
+
90
311
  // ../widget-core/src/ws.ts
91
312
  var WebSocketManager = class {
92
313
  ws = null;
@@ -127,7 +348,8 @@ var WebSocketManager = class {
127
348
  const params = new URLSearchParams({
128
349
  type: "visitor",
129
350
  id: this.config.visitorId,
130
- websiteId: this.config.websiteId
351
+ websiteId: this.config.websiteId,
352
+ key: this.config.apiKey
131
353
  });
132
354
  const ws = new WebSocket(`${base}/ws?${params}`);
133
355
  ws.onopen = () => {
@@ -1074,7 +1296,8 @@ function SupportProvider({
1074
1296
  const ws2 = new WebSocketManager({
1075
1297
  apiUrl: resolvedApiUrl,
1076
1298
  visitorId: "",
1077
- websiteId: ""
1299
+ websiteId: "",
1300
+ apiKey
1078
1301
  });
1079
1302
  const identify2 = async (data) => {
1080
1303
  try {