@helpai/elements 0.35.0 → 0.36.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/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-DRGLrW2j.js';
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-CNCSLVdz.js';
2
2
  import 'zod';
3
3
 
4
4
  /**
@@ -663,7 +663,12 @@ interface ModuleAvatar {
663
663
  }
664
664
  /** The Home status card. */
665
665
  interface ModuleStatus {
666
- text: string;
666
+ /**
667
+ * Status line. An i18n key or a literal (resolved via `localizeText`).
668
+ * Omit to use the built-in generic `homeStatus` string — so a deployment can
669
+ * show a localized status without authoring copy or a custom key per locale.
670
+ */
671
+ text?: string;
667
672
  /**
668
673
  * Status severity → status-icon colour. Free text; `operational` (default),
669
674
  * `degraded`, and `down` are styled, any other value uses the operational style.
package/index.mjs CHANGED
@@ -6273,6 +6273,7 @@ function HomeRoot(props2) {
6273
6273
  const greeting = resolveGreeting(props2);
6274
6274
  const avatars = config.userAvatars ?? [];
6275
6275
  const status = config.status;
6276
+ const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
6276
6277
  const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
6277
6278
  return /* @__PURE__ */ jsx29("div", { class: `${p25}-module ${p25}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-scroll`, children: [
6278
6279
  /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero`, children: [
@@ -6307,10 +6308,10 @@ function HomeRoot(props2) {
6307
6308
  status ? /* @__PURE__ */ jsx29(
6308
6309
  HomeCard,
6309
6310
  {
6310
- onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: localizeText(strings, status.text) }) : void 0,
6311
+ onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
6311
6312
  children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-status`, "data-level": status.level ?? "operational", children: [
6312
6313
  /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx29(StatusOkIcon, {}) }),
6313
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-text`, children: localizeText(strings, status.text) })
6314
+ /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-text`, children: statusText })
6314
6315
  ] })
6315
6316
  }
6316
6317
  ) : null,
package/package.json CHANGED
@@ -80,5 +80,5 @@
80
80
  ],
81
81
  "type": "module",
82
82
  "types": "./index.d.ts",
83
- "version": "0.35.0"
83
+ "version": "0.36.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, 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-DRGLrW2j.js';
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-CNCSLVdz.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>>;
@@ -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,43 +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";
333
332
  textSize: "textSize";
334
333
  history: "history";
334
+ clear: "clear";
335
335
  sound: "sound";
336
336
  }>;
337
337
  type ActionName = z.infer<typeof actionNameSchema>;
338
338
  declare const headerActionsSchema: z.ZodArray<z.ZodEnum<{
339
- close: "close";
340
339
  expand: "expand";
341
340
  fullscreen: "fullscreen";
342
341
  popOut: "popOut";
343
- clear: "clear";
344
- theme: "theme";
342
+ close: "close";
345
343
  language: "language";
344
+ theme: "theme";
346
345
  textSize: "textSize";
347
346
  history: "history";
347
+ clear: "clear";
348
348
  sound: "sound";
349
349
  }>>;
350
350
  type HeaderActions = z.infer<typeof headerActionsSchema>;
351
351
  /** Section wrapper — `actions` list wrapped under `header` in the dashboard form. */
352
352
  declare const headerSchema: z.ZodObject<{
353
353
  actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
354
- close: "close";
355
354
  expand: "expand";
356
355
  fullscreen: "fullscreen";
357
356
  popOut: "popOut";
358
- clear: "clear";
359
- theme: "theme";
357
+ close: "close";
360
358
  language: "language";
359
+ theme: "theme";
361
360
  textSize: "textSize";
362
361
  history: "history";
362
+ clear: "clear";
363
363
  sound: "sound";
364
364
  }>>>;
365
365
  }, z.core.$loose>;
@@ -375,33 +375,33 @@ type HeaderOptions = z.infer<typeof headerSchema>;
375
375
  */
376
376
 
377
377
  declare const feedbackEventSchema: z.ZodEnum<{
378
- voiceStart: "voiceStart";
379
- voiceStop: "voiceStop";
380
378
  error: "error";
381
379
  messageReceived: "messageReceived";
382
380
  messageSent: "messageSent";
381
+ voiceStart: "voiceStart";
382
+ voiceStop: "voiceStop";
383
383
  }>;
384
384
  type FeedbackEvent = z.infer<typeof feedbackEventSchema>;
385
385
  declare const soundOptionsSchema: z.ZodObject<{
386
386
  enabled: z.ZodDefault<z.ZodBoolean>;
387
387
  volume: z.ZodDefault<z.ZodNumber>;
388
388
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
389
- voiceStart: "voiceStart";
390
- voiceStop: "voiceStop";
391
389
  error: "error";
392
390
  messageReceived: "messageReceived";
393
391
  messageSent: "messageSent";
392
+ voiceStart: "voiceStart";
393
+ voiceStop: "voiceStop";
394
394
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
395
395
  }, z.core.$loose>;
396
396
  type SoundOptions = z.infer<typeof soundOptionsSchema>;
397
397
  declare const hapticsOptionsSchema: z.ZodObject<{
398
398
  enabled: z.ZodDefault<z.ZodBoolean>;
399
399
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
400
- voiceStart: "voiceStart";
401
- voiceStop: "voiceStop";
402
400
  error: "error";
403
401
  messageReceived: "messageReceived";
404
402
  messageSent: "messageSent";
403
+ voiceStart: "voiceStart";
404
+ voiceStop: "voiceStop";
405
405
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
406
406
  }, z.core.$loose>;
407
407
  type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
@@ -410,21 +410,21 @@ declare const feedbackSchema: z.ZodObject<{
410
410
  enabled: z.ZodDefault<z.ZodBoolean>;
411
411
  volume: z.ZodDefault<z.ZodNumber>;
412
412
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
413
- voiceStart: "voiceStart";
414
- voiceStop: "voiceStop";
415
413
  error: "error";
416
414
  messageReceived: "messageReceived";
417
415
  messageSent: "messageSent";
416
+ voiceStart: "voiceStart";
417
+ voiceStop: "voiceStop";
418
418
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
419
419
  }, z.core.$loose>>;
420
420
  haptics: z.ZodOptional<z.ZodObject<{
421
421
  enabled: z.ZodDefault<z.ZodBoolean>;
422
422
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
423
- voiceStart: "voiceStart";
424
- voiceStop: "voiceStop";
425
423
  error: "error";
426
424
  messageReceived: "messageReceived";
427
425
  messageSent: "messageSent";
426
+ voiceStart: "voiceStart";
427
+ voiceStop: "voiceStop";
428
428
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
429
429
  }, z.core.$loose>>;
430
430
  }, z.core.$loose>;
@@ -859,18 +859,18 @@ type I18nOptions = z.infer<typeof i18nSchema>;
859
859
  */
860
860
 
861
861
  declare const moduleLayoutSchema: z.ZodEnum<{
862
- home: "home";
863
862
  chat: "chat";
864
863
  help: "help";
864
+ home: "home";
865
865
  news: "news";
866
866
  }>;
867
867
  type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
868
868
  declare const moduleSchema: z.ZodObject<{
869
869
  label: z.ZodString;
870
870
  layout: z.ZodEnum<{
871
- home: "home";
872
871
  chat: "chat";
873
872
  help: "help";
873
+ home: "home";
874
874
  news: "news";
875
875
  }>;
876
876
  contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -886,7 +886,7 @@ declare const moduleSchema: z.ZodObject<{
886
886
  showSearchBar: z.ZodOptional<z.ZodBoolean>;
887
887
  showRecentConversations: z.ZodOptional<z.ZodBoolean>;
888
888
  status: z.ZodOptional<z.ZodObject<{
889
- text: z.ZodString;
889
+ text: z.ZodOptional<z.ZodString>;
890
890
  level: z.ZodOptional<z.ZodString>;
891
891
  url: z.ZodOptional<z.ZodString>;
892
892
  }, z.core.$strip>>;
@@ -896,9 +896,9 @@ type ModuleOptions = z.infer<typeof moduleSchema>;
896
896
  declare const modulesSchema: z.ZodArray<z.ZodObject<{
897
897
  label: z.ZodString;
898
898
  layout: z.ZodEnum<{
899
- home: "home";
900
899
  chat: "chat";
901
900
  help: "help";
901
+ home: "home";
902
902
  news: "news";
903
903
  }>;
904
904
  contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -914,7 +914,7 @@ declare const modulesSchema: z.ZodArray<z.ZodObject<{
914
914
  showSearchBar: z.ZodOptional<z.ZodBoolean>;
915
915
  showRecentConversations: z.ZodOptional<z.ZodBoolean>;
916
916
  status: z.ZodOptional<z.ZodObject<{
917
- text: z.ZodString;
917
+ text: z.ZodOptional<z.ZodString>;
918
918
  level: z.ZodOptional<z.ZodString>;
919
919
  url: z.ZodOptional<z.ZodString>;
920
920
  }, z.core.$strip>>;
package/schema.json CHANGED
@@ -1882,6 +1882,7 @@
1882
1882
  "type": "object",
1883
1883
  "properties": {
1884
1884
  "text": {
1885
+ "description": "`home` — status line; an i18n key or a literal (resolved via `localizeText`). Omit to use the built-in generic `homeStatus` string (localized, no custom key needed).",
1885
1886
  "type": "string",
1886
1887
  "minLength": 1,
1887
1888
  "maxLength": 120
@@ -1902,9 +1903,6 @@
1902
1903
  "maxLength": 2048
1903
1904
  }
1904
1905
  },
1905
- "required": [
1906
- "text"
1907
- ],
1908
1906
  "additionalProperties": false
1909
1907
  },
1910
1908
  "contentBlockTitle": {
@@ -3287,6 +3285,7 @@
3287
3285
  "type": "object",
3288
3286
  "properties": {
3289
3287
  "text": {
3288
+ "description": "`home` — status line; an i18n key or a literal (resolved via `localizeText`). Omit to use the built-in generic `homeStatus` string (localized, no custom key needed).",
3290
3289
  "type": "string",
3291
3290
  "minLength": 1,
3292
3291
  "maxLength": 120
@@ -3307,9 +3306,6 @@
3307
3306
  "maxLength": 2048
3308
3307
  }
3309
3308
  },
3310
- "required": [
3311
- "text"
3312
- ],
3313
3309
  "additionalProperties": false
3314
3310
  },
3315
3311
  "contentBlockTitle": {
package/schema.mjs CHANGED
@@ -559,7 +559,9 @@ var moduleSchema = z14.object({
559
559
  showSearchBar: z14.boolean().optional().describe("`home` \u2014 show the 'Search for help' bar (default true)."),
560
560
  showRecentConversations: z14.boolean().optional().describe("`home` \u2014 show the visitor's most recent conversation card (default true)."),
561
561
  status: z14.object({
562
- text: z14.string().min(1).max(120),
562
+ text: z14.string().min(1).max(120).optional().describe(
563
+ "`home` \u2014 status line; an i18n key or a literal (resolved via `localizeText`). Omit to use the built-in generic `homeStatus` string (localized, no custom key needed)."
564
+ ),
563
565
  level: z14.string().max(40).optional().describe(
564
566
  "`home` \u2014 status severity, drives the status icon colour. Free text; `operational` (green, default), `degraded` (amber), and `down` (red) are styled, any other value falls back to the operational style."
565
567
  ).meta({ examples: ["operational", "degraded", "down"] }),
package/web-component.mjs CHANGED
@@ -6232,6 +6232,7 @@ function HomeRoot(props2) {
6232
6232
  const greeting = resolveGreeting(props2);
6233
6233
  const avatars = config.userAvatars ?? [];
6234
6234
  const status = config.status;
6235
+ const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
6235
6236
  const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
6236
6237
  return /* @__PURE__ */ jsx29("div", { class: `${p25}-module ${p25}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-scroll`, children: [
6237
6238
  /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-hero`, children: [
@@ -6266,10 +6267,10 @@ function HomeRoot(props2) {
6266
6267
  status ? /* @__PURE__ */ jsx29(
6267
6268
  HomeCard,
6268
6269
  {
6269
- onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: localizeText(strings, status.text) }) : void 0,
6270
+ onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
6270
6271
  children: /* @__PURE__ */ jsxs24("div", { class: `${p25}-home-status`, "data-level": status.level ?? "operational", children: [
6271
6272
  /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx29(StatusOkIcon, {}) }),
6272
- /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-text`, children: localizeText(strings, status.text) })
6273
+ /* @__PURE__ */ jsx29("span", { class: `${p25}-home-status-text`, children: statusText })
6273
6274
  ] })
6274
6275
  }
6275
6276
  ) : null,