@helpai/elements 0.15.0 → 0.16.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/package.json CHANGED
@@ -80,5 +80,5 @@
80
80
  ],
81
81
  "type": "module",
82
82
  "types": "./index.d.ts",
83
- "version": "0.15.0"
83
+ "version": "0.16.0"
84
84
  }
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, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartConversationResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startConversationResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-P3CoZ-BV.js';
1
+ export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartConversationResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startConversationResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-DvzmRV7E.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";
59
60
  expanded: "expanded";
60
61
  auto: "auto";
61
- normal: "normal";
62
62
  }>>;
63
63
  autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
64
64
  }, z.core.$loose>>;
@@ -148,9 +148,9 @@ declare const launcherSizeSchema: z.ZodEnum<{
148
148
  }>;
149
149
  type LauncherSize = z.infer<typeof launcherSizeSchema>;
150
150
  declare const calloutShapeSchema: z.ZodEnum<{
151
- callout: "callout";
152
151
  pill: "pill";
153
152
  bubble: "bubble";
153
+ callout: "callout";
154
154
  }>;
155
155
  type CalloutShape = z.infer<typeof calloutShapeSchema>;
156
156
  declare const calloutPositionSchema: z.ZodEnum<{
@@ -162,9 +162,9 @@ type CalloutPosition = z.infer<typeof calloutPositionSchema>;
162
162
  declare const launcherCalloutSchema: z.ZodObject<{
163
163
  text: z.ZodDefault<z.ZodString>;
164
164
  shape: z.ZodDefault<z.ZodEnum<{
165
- callout: "callout";
166
165
  pill: "pill";
167
166
  bubble: "bubble";
167
+ callout: "callout";
168
168
  }>>;
169
169
  position: z.ZodDefault<z.ZodEnum<{
170
170
  auto: "auto";
@@ -195,9 +195,9 @@ declare const launcherOptionsSchema: z.ZodObject<{
195
195
  callout: z.ZodOptional<z.ZodObject<{
196
196
  text: z.ZodDefault<z.ZodString>;
197
197
  shape: z.ZodDefault<z.ZodEnum<{
198
- callout: "callout";
199
198
  pill: "pill";
200
199
  bubble: "bubble";
200
+ callout: "callout";
201
201
  }>>;
202
202
  position: z.ZodDefault<z.ZodEnum<{
203
203
  auto: "auto";
@@ -240,9 +240,9 @@ type LauncherOptions = z.infer<typeof launcherOptionsSchema>;
240
240
 
241
241
  declare const initialSizeSchema: z.ZodEnum<{
242
242
  fullscreen: "fullscreen";
243
+ normal: "normal";
243
244
  expanded: "expanded";
244
245
  auto: "auto";
245
- normal: "normal";
246
246
  }>;
247
247
  declare const resizeOptionsSchema: z.ZodObject<{
248
248
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -269,9 +269,9 @@ declare const sizeOptionsSchema: z.ZodObject<{
269
269
  inset: z.ZodOptional<z.ZodString>;
270
270
  initialSize: z.ZodDefault<z.ZodEnum<{
271
271
  fullscreen: "fullscreen";
272
+ normal: "normal";
272
273
  expanded: "expanded";
273
274
  auto: "auto";
274
- normal: "normal";
275
275
  }>>;
276
276
  autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
277
277
  }, z.core.$loose>;
@@ -323,40 +323,43 @@ type FeatureFlags = z.infer<typeof featureFlagsSchema>;
323
323
  */
324
324
 
325
325
  declare const actionNameSchema: z.ZodEnum<{
326
- close: "close";
327
326
  expand: "expand";
328
327
  fullscreen: "fullscreen";
329
328
  popOut: "popOut";
330
- clear: "clear";
331
- theme: "theme";
329
+ close: "close";
332
330
  language: "language";
331
+ theme: "theme";
332
+ textSize: "textSize";
333
333
  history: "history";
334
+ clear: "clear";
334
335
  sound: "sound";
335
336
  }>;
336
337
  type ActionName = z.infer<typeof actionNameSchema>;
337
338
  declare const headerActionsSchema: z.ZodArray<z.ZodEnum<{
338
- close: "close";
339
339
  expand: "expand";
340
340
  fullscreen: "fullscreen";
341
341
  popOut: "popOut";
342
- clear: "clear";
343
- theme: "theme";
342
+ close: "close";
344
343
  language: "language";
344
+ theme: "theme";
345
+ textSize: "textSize";
345
346
  history: "history";
347
+ clear: "clear";
346
348
  sound: "sound";
347
349
  }>>;
348
350
  type HeaderActions = z.infer<typeof headerActionsSchema>;
349
351
  /** Section wrapper — `actions` list wrapped under `header` in the dashboard form. */
350
352
  declare const headerSchema: z.ZodObject<{
351
353
  actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
352
- close: "close";
353
354
  expand: "expand";
354
355
  fullscreen: "fullscreen";
355
356
  popOut: "popOut";
356
- clear: "clear";
357
- theme: "theme";
357
+ close: "close";
358
358
  language: "language";
359
+ theme: "theme";
360
+ textSize: "textSize";
359
361
  history: "history";
362
+ clear: "clear";
360
363
  sound: "sound";
361
364
  }>>>;
362
365
  }, z.core.$loose>;
@@ -372,33 +375,33 @@ type HeaderOptions = z.infer<typeof headerSchema>;
372
375
  */
373
376
 
374
377
  declare const feedbackEventSchema: z.ZodEnum<{
375
- voiceStart: "voiceStart";
376
- voiceStop: "voiceStop";
377
378
  error: "error";
378
379
  messageReceived: "messageReceived";
379
380
  messageSent: "messageSent";
381
+ voiceStart: "voiceStart";
382
+ voiceStop: "voiceStop";
380
383
  }>;
381
384
  type FeedbackEvent = z.infer<typeof feedbackEventSchema>;
382
385
  declare const soundOptionsSchema: z.ZodObject<{
383
386
  enabled: z.ZodDefault<z.ZodBoolean>;
384
387
  volume: z.ZodDefault<z.ZodNumber>;
385
388
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
386
- voiceStart: "voiceStart";
387
- voiceStop: "voiceStop";
388
389
  error: "error";
389
390
  messageReceived: "messageReceived";
390
391
  messageSent: "messageSent";
392
+ voiceStart: "voiceStart";
393
+ voiceStop: "voiceStop";
391
394
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
392
395
  }, z.core.$loose>;
393
396
  type SoundOptions = z.infer<typeof soundOptionsSchema>;
394
397
  declare const hapticsOptionsSchema: z.ZodObject<{
395
398
  enabled: z.ZodDefault<z.ZodBoolean>;
396
399
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
397
- voiceStart: "voiceStart";
398
- voiceStop: "voiceStop";
399
400
  error: "error";
400
401
  messageReceived: "messageReceived";
401
402
  messageSent: "messageSent";
403
+ voiceStart: "voiceStart";
404
+ voiceStop: "voiceStop";
402
405
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
403
406
  }, z.core.$loose>;
404
407
  type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
@@ -407,21 +410,21 @@ declare const feedbackSchema: z.ZodObject<{
407
410
  enabled: z.ZodDefault<z.ZodBoolean>;
408
411
  volume: z.ZodDefault<z.ZodNumber>;
409
412
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
410
- voiceStart: "voiceStart";
411
- voiceStop: "voiceStop";
412
413
  error: "error";
413
414
  messageReceived: "messageReceived";
414
415
  messageSent: "messageSent";
416
+ voiceStart: "voiceStart";
417
+ voiceStop: "voiceStop";
415
418
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
416
419
  }, z.core.$loose>>;
417
420
  haptics: z.ZodOptional<z.ZodObject<{
418
421
  enabled: z.ZodDefault<z.ZodBoolean>;
419
422
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
420
- voiceStart: "voiceStart";
421
- voiceStop: "voiceStop";
422
423
  error: "error";
423
424
  messageReceived: "messageReceived";
424
425
  messageSent: "messageSent";
426
+ voiceStart: "voiceStart";
427
+ voiceStop: "voiceStop";
425
428
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
426
429
  }, z.core.$loose>>;
427
430
  }, z.core.$loose>;
@@ -562,16 +565,16 @@ type FooterOptions = z.infer<typeof footerSchema>;
562
565
 
563
566
  declare const fieldTypeSchema: z.ZodEnum<{
564
567
  number: "number";
565
- select: "select";
566
- textarea: "textarea";
567
- time: "time";
568
568
  text: "text";
569
- checkbox: "checkbox";
570
- radio: "radio";
571
569
  url: "url";
572
570
  email: "email";
573
571
  tel: "tel";
574
572
  date: "date";
573
+ time: "time";
574
+ textarea: "textarea";
575
+ select: "select";
576
+ radio: "radio";
577
+ checkbox: "checkbox";
575
578
  multiselect: "multiselect";
576
579
  }>;
577
580
  type FieldType = z.infer<typeof fieldTypeSchema>;
@@ -596,16 +599,16 @@ declare const formFieldSchema: z.ZodObject<{
596
599
  label: z.ZodString;
597
600
  type: z.ZodEnum<{
598
601
  number: "number";
599
- select: "select";
600
- textarea: "textarea";
601
- time: "time";
602
602
  text: "text";
603
- checkbox: "checkbox";
604
- radio: "radio";
605
603
  url: "url";
606
604
  email: "email";
607
605
  tel: "tel";
608
606
  date: "date";
607
+ time: "time";
608
+ textarea: "textarea";
609
+ select: "select";
610
+ radio: "radio";
611
+ checkbox: "checkbox";
609
612
  multiselect: "multiselect";
610
613
  }>;
611
614
  placeholder: z.ZodOptional<z.ZodString>;
@@ -656,16 +659,16 @@ declare const formDefSchema: z.ZodObject<{
656
659
  label: z.ZodString;
657
660
  type: z.ZodEnum<{
658
661
  number: "number";
659
- select: "select";
660
- textarea: "textarea";
661
- time: "time";
662
662
  text: "text";
663
- checkbox: "checkbox";
664
- radio: "radio";
665
663
  url: "url";
666
664
  email: "email";
667
665
  tel: "tel";
668
666
  date: "date";
667
+ time: "time";
668
+ textarea: "textarea";
669
+ select: "select";
670
+ radio: "radio";
671
+ checkbox: "checkbox";
669
672
  multiselect: "multiselect";
670
673
  }>;
671
674
  placeholder: z.ZodOptional<z.ZodString>;
@@ -714,16 +717,16 @@ declare const formsSchema: z.ZodArray<z.ZodObject<{
714
717
  label: z.ZodString;
715
718
  type: z.ZodEnum<{
716
719
  number: "number";
717
- select: "select";
718
- textarea: "textarea";
719
- time: "time";
720
720
  text: "text";
721
- checkbox: "checkbox";
722
- radio: "radio";
723
721
  url: "url";
724
722
  email: "email";
725
723
  tel: "tel";
726
724
  date: "date";
725
+ time: "time";
726
+ textarea: "textarea";
727
+ select: "select";
728
+ radio: "radio";
729
+ checkbox: "checkbox";
727
730
  multiselect: "multiselect";
728
731
  }>;
729
732
  placeholder: z.ZodOptional<z.ZodString>;
@@ -795,18 +798,18 @@ type I18nOptions = z.infer<typeof i18nSchema>;
795
798
  */
796
799
 
797
800
  declare const moduleLayoutSchema: z.ZodEnum<{
798
- home: "home";
799
801
  chat: "chat";
800
802
  help: "help";
803
+ home: "home";
801
804
  news: "news";
802
805
  }>;
803
806
  type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
804
807
  declare const moduleSchema: z.ZodObject<{
805
808
  label: z.ZodString;
806
809
  layout: z.ZodEnum<{
807
- home: "home";
808
810
  chat: "chat";
809
811
  help: "help";
812
+ home: "home";
810
813
  news: "news";
811
814
  }>;
812
815
  contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -832,9 +835,9 @@ type ModuleOptions = z.infer<typeof moduleSchema>;
832
835
  declare const modulesSchema: z.ZodArray<z.ZodObject<{
833
836
  label: z.ZodString;
834
837
  layout: z.ZodEnum<{
835
- home: "home";
836
838
  chat: "chat";
837
839
  help: "help";
840
+ home: "home";
838
841
  news: "news";
839
842
  }>;
840
843
  contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
package/schema.json CHANGED
@@ -719,7 +719,7 @@
719
719
  "properties": {
720
720
  "actions": {
721
721
  "description": "Which header actions are enabled (history/✕ buttons + ⋯ menu).",
722
- "maxItems": 9,
722
+ "maxItems": 10,
723
723
  "type": "array",
724
724
  "items": {
725
725
  "type": "string",
@@ -732,6 +732,7 @@
732
732
  "history",
733
733
  "language",
734
734
  "theme",
735
+ "textSize",
735
736
  "close"
736
737
  ]
737
738
  },
@@ -2472,7 +2473,7 @@
2472
2473
  "properties": {
2473
2474
  "actions": {
2474
2475
  "description": "Which header actions are enabled (history/✕ buttons + ⋯ menu).",
2475
- "maxItems": 9,
2476
+ "maxItems": 10,
2476
2477
  "type": "array",
2477
2478
  "items": {
2478
2479
  "type": "string",
@@ -2485,6 +2486,7 @@
2485
2486
  "history",
2486
2487
  "language",
2487
2488
  "theme",
2489
+ "textSize",
2488
2490
  "close"
2489
2491
  ]
2490
2492
  },
@@ -3850,6 +3852,31 @@
3850
3852
  "type": "array",
3851
3853
  "items": {}
3852
3854
  },
3855
+ "formSubmissions": {
3856
+ "type": "array",
3857
+ "items": {
3858
+ "type": "object",
3859
+ "properties": {
3860
+ "formId": {
3861
+ "type": "string"
3862
+ },
3863
+ "trigger": {
3864
+ "type": "string"
3865
+ },
3866
+ "skipped": {
3867
+ "type": "boolean"
3868
+ },
3869
+ "createdAt": {
3870
+ "type": "number"
3871
+ }
3872
+ },
3873
+ "required": [
3874
+ "formId",
3875
+ "trigger"
3876
+ ],
3877
+ "additionalProperties": {}
3878
+ }
3879
+ },
3853
3880
  "userPrefs": {
3854
3881
  "type": "object",
3855
3882
  "propertyNames": {
package/schema.mjs CHANGED
@@ -248,10 +248,11 @@ var actionNameSchema = z8.enum([
248
248
  "history",
249
249
  "language",
250
250
  "theme",
251
+ "textSize",
251
252
  "close"
252
253
  ]);
253
- var headerActionsSchema = z8.array(actionNameSchema).max(9).describe(
254
- "Which actions the header exposes. `history` + `close` are dedicated buttons; the rest appear in the \u22EF menu. Unlisted actions are hidden; order is irrelevant. Pick from: `clear`, `expand`, `fullscreen`, `popOut`, `sound`, `history`, `language`, `theme`, `close`. Per-mode defaults live in `DEFAULT_ACTIONS_BY_MODE`."
254
+ var headerActionsSchema = z8.array(actionNameSchema).max(10).describe(
255
+ "Which actions the header exposes. `history` + `close` are dedicated buttons; the rest appear in the \u22EF menu. Unlisted actions are hidden; order is irrelevant. Pick from: `clear`, `expand`, `fullscreen`, `popOut`, `sound`, `history`, `language`, `theme`, `textSize`, `close`. Per-mode defaults live in `DEFAULT_ACTIONS_BY_MODE`."
255
256
  ).meta({
256
257
  examples: [
257
258
  ["theme", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"],
@@ -771,6 +772,20 @@ var startConversationResponseSchema = z17.object({
771
772
  conversationId: z17.string(),
772
773
  canContinue: z17.boolean(),
773
774
  messages: z17.array(z17.unknown()),
775
+ /**
776
+ * Form submissions recorded for this conversation — echoed like
777
+ * `messages` so the widget reconstructs the collapsed "form submitted"
778
+ * timeline markers on resume. `createdAt` is epoch ms (same clock as
779
+ * message `createdAt`).
780
+ */
781
+ formSubmissions: z17.array(
782
+ z17.object({
783
+ formId: z17.string(),
784
+ trigger: z17.string(),
785
+ skipped: z17.boolean().optional(),
786
+ createdAt: z17.number().optional()
787
+ }).loose()
788
+ ).optional(),
774
789
  /**
775
790
  * Per-visitor preferences (locale picker, theme picker, sound
776
791
  * mute, dragged panel size). Distinct from `config` — this is