@helpai/elements 0.14.2 → 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/configurator.mjs CHANGED
@@ -132,7 +132,7 @@ var behaviorSchema = z4.object({
132
132
  "Show tool/function calls the model makes (e.g. search) as inline chips in the transcript. `false` (default) hides them."
133
133
  ),
134
134
  popOutUrl: z4.string().min(1).max(2048).optional().describe(
135
- "URL the `popOut` action opens in a new tab (carries `?chat=<id>&widgetId=<id>` query params). Falls back to the brand's build-time default. Set this to point at your own dedicated chat page (e.g. `https://app.acme.com/chat`). Server-pushable on `/start-conversation.widget.behavior.popOutUrl`."
135
+ "URL the `popOut` action opens in a new tab (carries `?conversation=<id>&widgetId=<id>` query params). Falls back to the brand's build-time default. Set this to point at your own dedicated chat page (e.g. `https://app.acme.com/chat`). Server-pushable on `/start-conversation.widget.behavior.popOutUrl`."
136
136
  )
137
137
  }).loose().describe("Lifecycle + streaming behaviour. Doesn't affect visual presentation.").meta({
138
138
  examples: [
@@ -251,10 +251,11 @@ var actionNameSchema = z8.enum([
251
251
  "history",
252
252
  "language",
253
253
  "theme",
254
+ "textSize",
254
255
  "close"
255
256
  ]);
256
- var headerActionsSchema = z8.array(actionNameSchema).max(9).describe(
257
- "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`."
257
+ var headerActionsSchema = z8.array(actionNameSchema).max(10).describe(
258
+ "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`."
258
259
  ).meta({
259
260
  examples: [
260
261
  ["theme", "history", "close", "clear", "fullscreen", "popOut", "sound", "language"],
@@ -542,7 +543,7 @@ var moduleSchema = z15.object({
542
543
  }).loose()
543
544
  ).max(10).optional().describe("`home` \u2014 team/agent avatars shown in the hero."),
544
545
  showSearchBar: z15.boolean().optional().describe("`home` \u2014 show the 'Search for help' bar (default true)."),
545
- showRecentMessages: z15.boolean().optional().describe("`home` \u2014 show the visitor's most recent conversation card (default true)."),
546
+ showRecentConversations: z15.boolean().optional().describe("`home` \u2014 show the visitor's most recent conversation card (default true)."),
546
547
  status: z15.object({
547
548
  text: z15.string().min(1).max(120),
548
549
  level: z15.string().max(40).optional().describe(
@@ -556,18 +557,18 @@ var modulesSchema = z15.array(moduleSchema).max(4).describe(
556
557
  "Messenger tabs \u2014 an ordered list of up to 4 tabs, each picking a `layout` + optional content `contentTags` (the content scope) + a translatable `label`. One tab \u2192 no tab bar (just that content); zero \u2192 an empty state. Floating / drawer / modal only."
557
558
  ).meta({
558
559
  examples: [
559
- [{ label: "tabMessages", layout: "chat" }],
560
+ [{ label: "tabConversations", layout: "chat" }],
560
561
  [
561
562
  {
562
563
  label: "tabHome",
563
564
  layout: "home",
564
565
  brandName: "Acme",
565
566
  showSearchBar: true,
566
- showRecentMessages: true,
567
+ showRecentConversations: true,
567
568
  contentBlockTitle: "Popular articles",
568
569
  contentTags: ["popular"]
569
570
  },
570
- { label: "tabMessages", layout: "chat" },
571
+ { label: "tabConversations", layout: "chat" },
571
572
  { label: "tabHelp", layout: "help", contentTags: ["help", "guides"] },
572
573
  { label: "tabNews", layout: "news", contentTags: ["news"] }
573
574
  ]
@@ -774,6 +775,20 @@ var startConversationResponseSchema = z17.object({
774
775
  conversationId: z17.string(),
775
776
  canContinue: z17.boolean(),
776
777
  messages: z17.array(z17.unknown()),
778
+ /**
779
+ * Form submissions recorded for this conversation — echoed like
780
+ * `messages` so the widget reconstructs the collapsed "form submitted"
781
+ * timeline markers on resume. `createdAt` is epoch ms (same clock as
782
+ * message `createdAt`).
783
+ */
784
+ formSubmissions: z17.array(
785
+ z17.object({
786
+ formId: z17.string(),
787
+ trigger: z17.string(),
788
+ skipped: z17.boolean().optional(),
789
+ createdAt: z17.number().optional()
790
+ }).loose()
791
+ ).optional(),
777
792
  /**
778
793
  * Per-visitor preferences (locale picker, theme picker, sound
779
794
  * mute, dragged panel size). Distinct from `config` — this is