@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.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/cimulate-copilot-widget.d.ts +21 -1
- package/dist/cimulate-copilot-widget.es.js +5966 -5946
- package/dist/cimulate-copilot-widget.umd.js +27 -27
- package/dist/copilot.es.js +5964 -5944
- package/dist/copilot.umd.js +27 -27
- package/dist/locales/en-US.json +1 -1
- package/dist/messaging.d.ts +21 -1
- package/dist/messaging.es.js +7724 -7704
- package/dist/messaging.umd.js +28 -28
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
`@cimulate/copilot-widget` follows [Semantic Versioning](https://semver.org/). Each entry is a released `package.json` version (deployed on merge to `master`), newest first.
|
|
4
4
|
|
|
5
|
+
## 1.61.0 — 2026-11-23
|
|
6
|
+
|
|
7
|
+
- Add `locale` prop (`LocaleCode`) to `CopilotWidget` and `AgentForceWidget` to declare the active BCP-47 language code. CDN auto-loading from this prop is coming in a future release.
|
|
8
|
+
- Add `translationOverrides` prop (`WidgetMessageCatalog`) for merchant-specific string overrides. Applied on top of `translations` namespace by namespace — wins over the locale catalog key-by-key while missing keys continue to fall back through `translations` then to English.
|
|
9
|
+
- Set `lang` attribute on the widget root element (dialog content / modal positioner / embed container) from the `locale` prop so screen readers apply correct language phonetics without touching the host page's `<html lang>`.
|
|
10
|
+
|
|
5
11
|
## 1.60.2 — 2026-11-23
|
|
6
12
|
|
|
7
13
|
- Restore the messaging composer and remove the processing indicator when an agent turn reaches the existing completion timeout without sending `typing_stopped` or a final response.
|
package/README.md
CHANGED
|
@@ -700,7 +700,7 @@ Optionally set `messagingConfig.storefrontCartPageUrl` to embed your cart page,
|
|
|
700
700
|
|
|
701
701
|
## Localization
|
|
702
702
|
|
|
703
|
-
>
|
|
703
|
+
> **Coming soon.** Multi-locale support is under active development and is not yet available in a released version. The widget currently renders English (`en-US`) only. This section documents the planned API — do not use it in production yet.
|
|
704
704
|
|
|
705
705
|
The widget will ship with English (`en-US`) copy embedded in the bundle. All visible and accessible labels will fall back to English when no catalog is supplied. A `translations` prop will let you switch languages or override individual strings.
|
|
706
706
|
|
|
@@ -328,6 +328,13 @@ declare interface CopilotWidgetProps extends CimCopilotSdkConfig {
|
|
|
328
328
|
* Configuration for messaging mode. Required when mode is 'messaging'.
|
|
329
329
|
*/
|
|
330
330
|
messagingConfig?: MessagingModeConfig;
|
|
331
|
+
/**
|
|
332
|
+
* BCP-47 locale code for the widget language (e.g. `"fr-FR"`). Sets the
|
|
333
|
+
* `lang` attribute on widget root elements. Pair with `translations` to
|
|
334
|
+
* supply the catalog. CDN auto-loading from this code alone is coming in
|
|
335
|
+
* W-24965756.
|
|
336
|
+
*/
|
|
337
|
+
locale?: LocaleCode;
|
|
331
338
|
/**
|
|
332
339
|
* Translated or customized widget copy. Pass a full locale catalog (e.g.
|
|
333
340
|
* imported from `@cimulate/copilot-widget/locales/fr-FR`) or a partial
|
|
@@ -335,6 +342,13 @@ declare interface CopilotWidgetProps extends CimCopilotSdkConfig {
|
|
|
335
342
|
* bundled English (`en-US`) default.
|
|
336
343
|
*/
|
|
337
344
|
translations?: WidgetMessageCatalog;
|
|
345
|
+
/**
|
|
346
|
+
* Merchant-specific string overrides applied on top of `translations`. Use
|
|
347
|
+
* for brand wording that differs from the locale catalog (e.g. renaming
|
|
348
|
+
* "Chat" to "Talk to us"). Wins over `translations` key-by-key; missing
|
|
349
|
+
* keys still fall back through `translations` then to English.
|
|
350
|
+
*/
|
|
351
|
+
translationOverrides?: WidgetMessageCatalog;
|
|
338
352
|
overrides?: ComponentOverrides;
|
|
339
353
|
overridesUrl?: string;
|
|
340
354
|
inlineOverrides?: ComponentOverrides;
|
|
@@ -359,7 +373,7 @@ declare interface CopilotWidgetProps extends CimCopilotSdkConfig {
|
|
|
359
373
|
* PromptsExtensionContext >
|
|
360
374
|
* CopilotProvider (SocketSdk: copilot-sdk)
|
|
361
375
|
*/
|
|
362
|
-
declare const CopilotWidgetProvider: ({ mode, apiKey, apiToken, baseUrl, customerId, tenantId, logoUrl, headerText, headerConfig, theme, openLinksInNewTab, onNavigate, globalClassName, isDevelopment, componentType, componentConfig, entryType, initialEntry, entryMessage, disclaimerText, disclaimerMarkdown, clientContext, baseCatalogParams, searchPlaceholder, searchButtonLabel, searchConfig, suggestionButtonConfig, messageAlignment, autoScroll, promptsConfig, resetConversationMessage, conversationHistory, onConnect, onCopilotEvent, onRefinedSearch, onRefinedBrowse, translations, __features, children, }: CopilotWidgetProps & {
|
|
376
|
+
declare const CopilotWidgetProvider: ({ mode, apiKey, apiToken, baseUrl, customerId, tenantId, logoUrl, headerText, headerConfig, theme, openLinksInNewTab, onNavigate, globalClassName, isDevelopment, componentType, componentConfig, entryType, initialEntry, entryMessage, disclaimerText, disclaimerMarkdown, clientContext, baseCatalogParams, searchPlaceholder, searchButtonLabel, searchConfig, suggestionButtonConfig, messageAlignment, autoScroll, promptsConfig, resetConversationMessage, conversationHistory, onConnect, onCopilotEvent, onRefinedSearch, onRefinedBrowse, locale, translations, translationOverrides, __features, children, }: CopilotWidgetProps & {
|
|
363
377
|
children: ReactNode;
|
|
364
378
|
}) => JSX_2.Element;
|
|
365
379
|
|
|
@@ -449,6 +463,12 @@ declare const injectCopilotWidget: ({ timeout, elementId, ...props }: CopilotWid
|
|
|
449
463
|
|
|
450
464
|
declare const loadConversation: (payload: ConversationEvents) => void;
|
|
451
465
|
|
|
466
|
+
/**
|
|
467
|
+
* BCP-47 locale codes for the 16 confirmed widget locales plus the
|
|
468
|
+
* bundled English (`en-US`) fallback.
|
|
469
|
+
*/
|
|
470
|
+
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";
|
|
471
|
+
|
|
452
472
|
declare type Message = {
|
|
453
473
|
type: "group" | "individual";
|
|
454
474
|
eventSourceId?: string;
|