@cimulate/copilot-widget 1.60.2 → 1.61.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.
@@ -222,7 +222,7 @@
222
222
  "searchDividerLabel": "Search: \"{label}\""
223
223
  },
224
224
  "errors": {
225
- "genericRetry": "Something went wrong. Please try again.",
225
+ "genericRetry": "Couldn't send your message. Please try again.",
226
226
  "rateLimited": "We're getting a lot of requests right now. Please try again in a moment.",
227
227
  "offline": "You're offline or we couldn't reach the assistant. Check your connection and try again.",
228
228
  "messagingUnavailable": "Messaging is unavailable"
@@ -69,7 +69,7 @@ export declare const AgentForceWidget: (props: CopilotWidgetProps) => JSX_2.Elem
69
69
  * UIStateContext >
70
70
  * MessagingProvider (Agentforce/SCRT2 SDK)
71
71
  */
72
- export declare const AgentforceWidgetProvider: ({ mode, apiKey, apiToken, baseUrl, logoUrl, headerText, headerConfig, theme, openLinksInNewTab, onNavigate, globalClassName, isDevelopment, componentType, componentConfig, initialEntry, entryMessage, disclaimerText, disclaimerMarkdown, clientContext, searchPlaceholder, searchButtonLabel, searchConfig, suggestionButtonConfig, messageAlignment, autoScroll, promptsConfig, showProductDescription, resetConversationMessage, conversationHistory, messagingConfig, translations, overrides, overridesUrl, inlineOverrides, __features, children, }: CopilotWidgetProps & {
72
+ export declare const AgentforceWidgetProvider: ({ mode, apiKey, apiToken, baseUrl, logoUrl, headerText, headerConfig, theme, openLinksInNewTab, onNavigate, globalClassName, isDevelopment, componentType, componentConfig, initialEntry, entryMessage, disclaimerText, disclaimerMarkdown, clientContext, searchPlaceholder, searchButtonLabel, searchConfig, suggestionButtonConfig, messageAlignment, autoScroll, promptsConfig, showProductDescription, resetConversationMessage, conversationHistory, messagingConfig, locale, translations, translationOverrides, overrides, overridesUrl, inlineOverrides, __features, children, }: CopilotWidgetProps & {
73
73
  overridesUrl?: string;
74
74
  inlineOverrides?: ComponentOverrides;
75
75
  children: ReactNode;
@@ -543,6 +543,13 @@ declare interface CopilotWidgetProps extends CimCopilotSdkConfig {
543
543
  * Configuration for messaging mode. Required when mode is 'messaging'.
544
544
  */
545
545
  messagingConfig?: MessagingModeConfig;
546
+ /**
547
+ * BCP-47 locale code for the widget language (e.g. `"fr-FR"`). Sets the
548
+ * `lang` attribute on widget root elements. Pair with `translations` to
549
+ * supply the catalog. CDN auto-loading from this code alone is coming in
550
+ * W-24965756.
551
+ */
552
+ locale?: LocaleCode;
546
553
  /**
547
554
  * Translated or customized widget copy. Pass a full locale catalog (e.g.
548
555
  * imported from `@cimulate/copilot-widget/locales/fr-FR`) or a partial
@@ -550,6 +557,13 @@ declare interface CopilotWidgetProps extends CimCopilotSdkConfig {
550
557
  * bundled English (`en-US`) default.
551
558
  */
552
559
  translations?: WidgetMessageCatalog;
560
+ /**
561
+ * Merchant-specific string overrides applied on top of `translations`. Use
562
+ * for brand wording that differs from the locale catalog (e.g. renaming
563
+ * "Chat" to "Talk to us"). Wins over `translations` key-by-key; missing
564
+ * keys still fall back through `translations` then to English.
565
+ */
566
+ translationOverrides?: WidgetMessageCatalog;
553
567
  overrides?: ComponentOverrides;
554
568
  overridesUrl?: string;
555
569
  inlineOverrides?: ComponentOverrides;
@@ -748,6 +762,12 @@ declare interface InjectMessagingWidgetOptions extends Omit<CopilotWidgetProps,
748
762
  overrides?: ComponentOverrides;
749
763
  }
750
764
 
765
+ /**
766
+ * BCP-47 locale codes for the 16 confirmed widget locales plus the
767
+ * bundled English (`en-US`) fallback.
768
+ */
769
+ declare type LocaleCode = "da-DK" | "de-DE" | "en-US" | "es-ES" | "es-MX" | "fi-FI" | "fr-FR" | "it-IT" | "ja-JP" | "ko-KR" | "nb-NO" | "nl-NL" | "pl" | "pt-BR" | "sv-SE" | "zh-CN" | "zh-TW";
770
+
751
771
  declare type MarkdownResponse = {
752
772
  type: "markdown";
753
773
  index: number;