@helpai/elements 0.43.2 → 0.44.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/elements-web-component.esm.js +18 -18
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +18 -18
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +18 -18
- package/elements.esm.js.map +4 -4
- package/elements.js +18 -18
- package/elements.js.map +4 -4
- package/index.d.ts +4 -3
- package/index.mjs +7 -2
- package/package.json +1 -1
- package/schema.d.ts +26 -26
- package/web-component.mjs +6 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-paIqjCiE.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1733,8 +1733,9 @@ declare function getAllInstances(): ChatWidgetInstance[];
|
|
|
1733
1733
|
* cycles until explicitly unregistered.
|
|
1734
1734
|
*/
|
|
1735
1735
|
declare function hook(widgetId: string, event: string, listener: HookListener): () => void;
|
|
1736
|
-
/** Semver of the published package
|
|
1737
|
-
|
|
1736
|
+
/** Semver of the published `@<brand>/elements` package — build-injected, also
|
|
1737
|
+
* sent on every request + analytics hit as `_ev`. */
|
|
1738
|
+
declare const version: string;
|
|
1738
1739
|
/** Compile-time brand constants inlined at build time (name, CDN URL, theme). */
|
|
1739
1740
|
declare const brand: {
|
|
1740
1741
|
readonly id: string;
|
package/index.mjs
CHANGED
|
@@ -29,6 +29,10 @@ var BRAND = {
|
|
|
29
29
|
siteUrl: true ? "https://help.ai" : "https://help.ai"
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
// src/core/version.ts
|
|
33
|
+
var ELEMENTS_VERSION = true ? "0.44.0" : "0.0.0-dev";
|
|
34
|
+
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
35
|
+
|
|
32
36
|
// src/i18n/strings.ts
|
|
33
37
|
var STRINGS_EN = {
|
|
34
38
|
attach: "Attach files",
|
|
@@ -1790,7 +1794,7 @@ var AgentTransport = class {
|
|
|
1790
1794
|
}
|
|
1791
1795
|
/** Build the per-request envelope from the current transport state. */
|
|
1792
1796
|
envelope() {
|
|
1793
|
-
const out = {};
|
|
1797
|
+
const out = { [ELEMENTS_VERSION_PARAM]: ELEMENTS_VERSION };
|
|
1794
1798
|
if (this.visitorId) out.visitorId = this.visitorId;
|
|
1795
1799
|
if (this.conversationId) out.conversationId = this.conversationId;
|
|
1796
1800
|
if (this.locale) out.locale = this.locale;
|
|
@@ -7902,6 +7906,7 @@ function createTracker(bus, deps) {
|
|
|
7902
7906
|
if (++windowHits > MAX_HITS_PER_MINUTE) return;
|
|
7903
7907
|
const params = new URLSearchParams();
|
|
7904
7908
|
params.set("v", PROTOCOL_VERSION);
|
|
7909
|
+
params.set(ELEMENTS_VERSION_PARAM, ELEMENTS_VERSION);
|
|
7905
7910
|
params.set("e", event);
|
|
7906
7911
|
if (tracking.token) params.set("tk", tracking.token);
|
|
7907
7912
|
if (publicKey) params.set("pk", publicKey);
|
|
@@ -8222,7 +8227,7 @@ function getAllInstances() {
|
|
|
8222
8227
|
function hook(widgetId, event, listener) {
|
|
8223
8228
|
return registerHook(widgetId, event, listener);
|
|
8224
8229
|
}
|
|
8225
|
-
var version =
|
|
8230
|
+
var version = ELEMENTS_VERSION;
|
|
8226
8231
|
var brand = BRAND;
|
|
8227
8232
|
export {
|
|
8228
8233
|
HOOK_WILDCARD,
|
package/package.json
CHANGED
package/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, H as HandshakeResponse, L as Link, P as PAGE_AREA_SUGGESTIONS, f as PageContext, S as ServerConfig, b as SiteConfig, U as UserContext, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial, g as assetSchema, h as blocksConfigSchema, i as connectionConfigPartialSchema, j as connectionConfigSchema, k as cssColorSchema, l as cssLengthSchema, m as endpointsSchema, n as handshakeResponseSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, u as userContextSchema, t as uuid7Schema, w as widgetConfigPartialSchema, v as widgetConfigSchema, x as widgetSettingsPartialSchema, y as widgetSettingsSchema } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, H as HandshakeResponse, L as Link, P as PAGE_AREA_SUGGESTIONS, f as PageContext, S as ServerConfig, b as SiteConfig, U as UserContext, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial, g as assetSchema, h as blocksConfigSchema, i as connectionConfigPartialSchema, j as connectionConfigSchema, k as cssColorSchema, l as cssLengthSchema, m as endpointsSchema, n as handshakeResponseSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, u as userContextSchema, t as uuid7Schema, w as widgetConfigPartialSchema, v as widgetConfigSchema, x as widgetSettingsPartialSchema, y as widgetSettingsSchema } from './deployment-paIqjCiE.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -56,9 +56,9 @@ declare const presentationSchema: z.ZodObject<{
|
|
|
56
56
|
inset: z.ZodOptional<z.ZodString>;
|
|
57
57
|
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
58
58
|
fullscreen: "fullscreen";
|
|
59
|
-
normal: "normal";
|
|
60
59
|
expanded: "expanded";
|
|
61
60
|
auto: "auto";
|
|
61
|
+
normal: "normal";
|
|
62
62
|
}>>;
|
|
63
63
|
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
64
64
|
}, z.core.$loose>>;
|
|
@@ -239,9 +239,9 @@ type LauncherOptions = z.infer<typeof launcherOptionsSchema>;
|
|
|
239
239
|
|
|
240
240
|
declare const initialSizeSchema: z.ZodEnum<{
|
|
241
241
|
fullscreen: "fullscreen";
|
|
242
|
-
normal: "normal";
|
|
243
242
|
expanded: "expanded";
|
|
244
243
|
auto: "auto";
|
|
244
|
+
normal: "normal";
|
|
245
245
|
}>;
|
|
246
246
|
declare const resizeOptionsSchema: z.ZodObject<{
|
|
247
247
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -268,9 +268,9 @@ declare const sizeOptionsSchema: z.ZodObject<{
|
|
|
268
268
|
inset: z.ZodOptional<z.ZodString>;
|
|
269
269
|
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
270
270
|
fullscreen: "fullscreen";
|
|
271
|
-
normal: "normal";
|
|
272
271
|
expanded: "expanded";
|
|
273
272
|
auto: "auto";
|
|
273
|
+
normal: "normal";
|
|
274
274
|
}>>;
|
|
275
275
|
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
276
276
|
}, z.core.$loose>;
|
|
@@ -322,40 +322,40 @@ type FeatureFlags = z.infer<typeof featureFlagsSchema>;
|
|
|
322
322
|
*/
|
|
323
323
|
|
|
324
324
|
declare const actionNameSchema: z.ZodEnum<{
|
|
325
|
+
close: "close";
|
|
325
326
|
expand: "expand";
|
|
326
327
|
fullscreen: "fullscreen";
|
|
327
|
-
|
|
328
|
-
language: "language";
|
|
328
|
+
clear: "clear";
|
|
329
329
|
theme: "theme";
|
|
330
|
+
language: "language";
|
|
330
331
|
textSize: "textSize";
|
|
331
332
|
history: "history";
|
|
332
|
-
clear: "clear";
|
|
333
333
|
sound: "sound";
|
|
334
334
|
}>;
|
|
335
335
|
type ActionName = z.infer<typeof actionNameSchema>;
|
|
336
336
|
declare const headerActionsSchema: z.ZodArray<z.ZodEnum<{
|
|
337
|
+
close: "close";
|
|
337
338
|
expand: "expand";
|
|
338
339
|
fullscreen: "fullscreen";
|
|
339
|
-
|
|
340
|
-
language: "language";
|
|
340
|
+
clear: "clear";
|
|
341
341
|
theme: "theme";
|
|
342
|
+
language: "language";
|
|
342
343
|
textSize: "textSize";
|
|
343
344
|
history: "history";
|
|
344
|
-
clear: "clear";
|
|
345
345
|
sound: "sound";
|
|
346
346
|
}>>;
|
|
347
347
|
type HeaderActions = z.infer<typeof headerActionsSchema>;
|
|
348
348
|
/** Section wrapper — `actions` list wrapped under `header` in the dashboard form. */
|
|
349
349
|
declare const headerSchema: z.ZodObject<{
|
|
350
350
|
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
351
|
+
close: "close";
|
|
351
352
|
expand: "expand";
|
|
352
353
|
fullscreen: "fullscreen";
|
|
353
|
-
|
|
354
|
-
language: "language";
|
|
354
|
+
clear: "clear";
|
|
355
355
|
theme: "theme";
|
|
356
|
+
language: "language";
|
|
356
357
|
textSize: "textSize";
|
|
357
358
|
history: "history";
|
|
358
|
-
clear: "clear";
|
|
359
359
|
sound: "sound";
|
|
360
360
|
}>>>;
|
|
361
361
|
}, z.core.$loose>;
|
|
@@ -371,33 +371,33 @@ type HeaderOptions = z.infer<typeof headerSchema>;
|
|
|
371
371
|
*/
|
|
372
372
|
|
|
373
373
|
declare const feedbackEventSchema: z.ZodEnum<{
|
|
374
|
+
voiceStart: "voiceStart";
|
|
375
|
+
voiceStop: "voiceStop";
|
|
374
376
|
error: "error";
|
|
375
377
|
messageReceived: "messageReceived";
|
|
376
378
|
messageSent: "messageSent";
|
|
377
|
-
voiceStart: "voiceStart";
|
|
378
|
-
voiceStop: "voiceStop";
|
|
379
379
|
}>;
|
|
380
380
|
type FeedbackEvent = z.infer<typeof feedbackEventSchema>;
|
|
381
381
|
declare const soundOptionsSchema: z.ZodObject<{
|
|
382
382
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
383
383
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
384
384
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
385
|
+
voiceStart: "voiceStart";
|
|
386
|
+
voiceStop: "voiceStop";
|
|
385
387
|
error: "error";
|
|
386
388
|
messageReceived: "messageReceived";
|
|
387
389
|
messageSent: "messageSent";
|
|
388
|
-
voiceStart: "voiceStart";
|
|
389
|
-
voiceStop: "voiceStop";
|
|
390
390
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
391
391
|
}, z.core.$loose>;
|
|
392
392
|
type SoundOptions = z.infer<typeof soundOptionsSchema>;
|
|
393
393
|
declare const hapticsOptionsSchema: z.ZodObject<{
|
|
394
394
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
395
395
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
396
|
+
voiceStart: "voiceStart";
|
|
397
|
+
voiceStop: "voiceStop";
|
|
396
398
|
error: "error";
|
|
397
399
|
messageReceived: "messageReceived";
|
|
398
400
|
messageSent: "messageSent";
|
|
399
|
-
voiceStart: "voiceStart";
|
|
400
|
-
voiceStop: "voiceStop";
|
|
401
401
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
402
402
|
}, z.core.$loose>;
|
|
403
403
|
type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
|
|
@@ -406,21 +406,21 @@ declare const feedbackSchema: z.ZodObject<{
|
|
|
406
406
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
407
407
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
408
408
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
409
|
+
voiceStart: "voiceStart";
|
|
410
|
+
voiceStop: "voiceStop";
|
|
409
411
|
error: "error";
|
|
410
412
|
messageReceived: "messageReceived";
|
|
411
413
|
messageSent: "messageSent";
|
|
412
|
-
voiceStart: "voiceStart";
|
|
413
|
-
voiceStop: "voiceStop";
|
|
414
414
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
415
415
|
}, z.core.$loose>>;
|
|
416
416
|
haptics: z.ZodOptional<z.ZodObject<{
|
|
417
417
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
418
418
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
419
|
+
voiceStart: "voiceStart";
|
|
420
|
+
voiceStop: "voiceStop";
|
|
419
421
|
error: "error";
|
|
420
422
|
messageReceived: "messageReceived";
|
|
421
423
|
messageSent: "messageSent";
|
|
422
|
-
voiceStart: "voiceStart";
|
|
423
|
-
voiceStop: "voiceStop";
|
|
424
424
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
425
425
|
}, z.core.$loose>>;
|
|
426
426
|
}, z.core.$loose>;
|
|
@@ -855,18 +855,18 @@ type I18nOptions = z.infer<typeof i18nSchema>;
|
|
|
855
855
|
*/
|
|
856
856
|
|
|
857
857
|
declare const moduleLayoutSchema: z.ZodEnum<{
|
|
858
|
+
home: "home";
|
|
858
859
|
chat: "chat";
|
|
859
860
|
help: "help";
|
|
860
|
-
home: "home";
|
|
861
861
|
news: "news";
|
|
862
862
|
}>;
|
|
863
863
|
type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
|
|
864
864
|
declare const moduleSchema: z.ZodObject<{
|
|
865
865
|
label: z.ZodString;
|
|
866
866
|
layout: z.ZodEnum<{
|
|
867
|
+
home: "home";
|
|
867
868
|
chat: "chat";
|
|
868
869
|
help: "help";
|
|
869
|
-
home: "home";
|
|
870
870
|
news: "news";
|
|
871
871
|
}>;
|
|
872
872
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -892,9 +892,9 @@ type ModuleOptions = z.infer<typeof moduleSchema>;
|
|
|
892
892
|
declare const modulesSchema: z.ZodArray<z.ZodObject<{
|
|
893
893
|
label: z.ZodString;
|
|
894
894
|
layout: z.ZodEnum<{
|
|
895
|
+
home: "home";
|
|
895
896
|
chat: "chat";
|
|
896
897
|
help: "help";
|
|
897
|
-
home: "home";
|
|
898
898
|
news: "news";
|
|
899
899
|
}>;
|
|
900
900
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
package/web-component.mjs
CHANGED
|
@@ -1426,6 +1426,10 @@ function createAuth(opts) {
|
|
|
1426
1426
|
};
|
|
1427
1427
|
}
|
|
1428
1428
|
|
|
1429
|
+
// src/core/version.ts
|
|
1430
|
+
var ELEMENTS_VERSION = true ? "0.44.0" : "0.0.0-dev";
|
|
1431
|
+
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1432
|
+
|
|
1429
1433
|
// src/stream/types.ts
|
|
1430
1434
|
var StreamError = class extends Error {
|
|
1431
1435
|
constructor(message, code, status, cause) {
|
|
@@ -1749,7 +1753,7 @@ var AgentTransport = class {
|
|
|
1749
1753
|
}
|
|
1750
1754
|
/** Build the per-request envelope from the current transport state. */
|
|
1751
1755
|
envelope() {
|
|
1752
|
-
const out = {};
|
|
1756
|
+
const out = { [ELEMENTS_VERSION_PARAM]: ELEMENTS_VERSION };
|
|
1753
1757
|
if (this.visitorId) out.visitorId = this.visitorId;
|
|
1754
1758
|
if (this.conversationId) out.conversationId = this.conversationId;
|
|
1755
1759
|
if (this.locale) out.locale = this.locale;
|
|
@@ -7861,6 +7865,7 @@ function createTracker(bus, deps) {
|
|
|
7861
7865
|
if (++windowHits > MAX_HITS_PER_MINUTE) return;
|
|
7862
7866
|
const params = new URLSearchParams();
|
|
7863
7867
|
params.set("v", PROTOCOL_VERSION);
|
|
7868
|
+
params.set(ELEMENTS_VERSION_PARAM, ELEMENTS_VERSION);
|
|
7864
7869
|
params.set("e", event);
|
|
7865
7870
|
if (tracking.token) params.set("tk", tracking.token);
|
|
7866
7871
|
if (publicKey) params.set("pk", publicKey);
|