@cimulate/copilot-widget 1.61.1 → 1.62.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 CHANGED
@@ -2,13 +2,17 @@
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.62.0 — 2026-11-24
6
+
7
+ - When a `locale` prop is set without a manual `translations` prop, the widget automatically fetches the matching locale JSON from the CDN and applies it. English is served while the fetch is in-flight; English is also the silent fallback on failure. The catalog is cached for the page lifetime so locale-prop changes never trigger a re-fetch of an already-loaded catalog.
8
+
5
9
  ## 1.61.1 — 2026-11-24
6
10
 
7
11
  - Messaging prompts can opt into a `form` layout via `promptsConfig.layout`. It stacks an optional title and subtitle, suggestion chips, and a bordered field with a text submit button. Omitting the layout keeps the existing composer.
8
12
 
9
13
  ## 1.61.0 — 2026-11-23
10
14
 
11
- - 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.
15
+ - Add `locale` prop (`LocaleCode`) to `CopilotWidget` and `AgentForceWidget` to declare the active BCP-47 language code. CDN auto-loading from this prop is delivered in 1.62.0.
12
16
  - 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.
13
17
  - 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>`.
14
18
 
@@ -180,6 +180,7 @@ declare type ComponentType = "chat" | "dialog" | "modal";
180
180
  declare namespace copilot {
181
181
  export {
182
182
  CopilotWidget,
183
+ version,
183
184
  CopilotWidgetProvider,
184
185
  useCopilot,
185
186
  CopilotEmbed,
@@ -330,16 +331,17 @@ declare interface CopilotWidgetProps extends CimCopilotSdkConfig {
330
331
  messagingConfig?: MessagingModeConfig;
331
332
  /**
332
333
  * 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.
334
+ * `lang` attribute on widget root elements and automatically fetches the
335
+ * matching locale catalog from the CDN. Supply `translations` directly to
336
+ * skip the CDN fetch and use your own catalog instead.
336
337
  */
337
338
  locale?: LocaleCode;
338
339
  /**
339
340
  * Translated or customized widget copy. Pass a full locale catalog (e.g.
340
341
  * imported from `@cimulate/copilot-widget/locales/fr-FR`) or a partial
341
342
  * object to override individual strings. Any key omitted falls back to the
342
- * bundled English (`en-US`) default.
343
+ * bundled English (`en-US`) default. When set, the CDN auto-load triggered
344
+ * by `locale` is skipped.
343
345
  */
344
346
  translations?: WidgetMessageCatalog;
345
347
  /**
@@ -957,6 +959,9 @@ declare const updateSearchQuery: (query: string) => void;
957
959
 
958
960
  declare const useCopilot: () => SocketSdkContextType;
959
961
 
962
+ /** The semver version of this widget build, e.g. `"1.62.0"`. */
963
+ declare const version: string;
964
+
960
965
  declare interface WidgetComponentConfig {
961
966
  isOpen?: boolean;
962
967
  isMinimized?: boolean;