# Changelog

All notable changes to @embedmetrics/sdk will be documented in this file.

This project adheres to Keep a Changelog and Semantic Versioning.

## [Unreleased]

- Added:
- Improved/Changed:
- Fixed:

## [0.1.6] - 2025-10-07

- Improved/Changed:
  - Streaming reliability improvements for long responses; reduced risk of timeouts during extended processing.

## [0.1.5] - 2025-10-06

- Improved/Changed:
  - README: clarified Shadow DOM isolation and theming via `--em-*-override` variables.
  - README: added typed theming usage (ThemeOverrides, THEME_TOKEN_KEYS).
  - README: updated EmbedConfig sample with chatRail.enabled.
- Fixed:
  - Streaming auth refresh: prevent transient error; show “Refreshing your session...” and retry seamlessly.
  - README theming examples now use correct `-override` variable names.
- Added:
  - ThemeOverrides and THEME_TOKEN_KEYS exports for TypeScript autocomplete.

## [0.1.4] - 2025-10-05

- Added:
  - Themed Analytics Toolkit UI (modal, header, and pill buttons).
  - Chat sidebar with collapsible interface and conversation management.
  - New action buttons for expand/collapse and chat creation.
  - `embedmetrics:ready` custom event emitted after the widget mounts. Hosts can listen on the container to hide preloaders. See README for usage.
- Improved/Changed:
  - Hide Analytics Toolkit button when the toolkit is disabled or not configured (no sections).
  - Seamless authentication token refresh without widget re-renders or interruptions.
  - Enhanced token expiration handling with automatic retry on authentication errors.
- Fixed:
  - Theming inconsistencies in SDK components.
  - Widget re-mounting when authentication tokens are refreshed, preserving chat history and UI state.
  - Chat rail flicker when selecting conversations: stop toggling top-level loading state and use chat-level loader to keep the rail mounted.

## [0.1.2] - 2025-10-03

- Added:
  - Themed styles for Comparison, KPI, Table, and Chart visualizations.
  - Themed answer summary (narrative).
- Fixed:
  - Theming inconsistencies in SDK components.

## [0.1.1] - 2025-09-30

- Added:
  - Initial public SDK package structure with React and Vanilla entry points.
