Releases: kirilinsky/react-ai-chat-actions
Releases · kirilinsky/react-ai-chat-actions
Release list
v0.3.0
Minor Changes
-
897304e: Controlled active state, custom actions, built-in copy/speak handlers, and an accessibility pass.
- Controlled active state: new
activeActions,defaultActiveActions, andonActiveActionsChangeprops let you persist like/dislike/pin state (e.g. from your server). Uncontrolled mode with internal state remains the default. - Custom actions: the
actionsarray now accepts{ id, icon, label, toggle? }objects alongside built-in action names. Custom ids work inloading,disabled, andactiveActions. - Built-in handlers: optional
copyTextprop enables clipboard copy with "Copied" feedback on thecopybutton; optionalspeakTextenables text-to-speech via the Web Speech API on thespeakbutton. - Accessibility: WAI-ARIA toolbar pattern —
role="toolbar"withariaLabelprop, roving tabindex with arrow-key/Home/End navigation, visible:focus-visibleoutline, tooltips on keyboard focus,aria-busyon loading buttons,role="separator"on dividers, and hover-modeActionBarWrappernow reveals the bar on keyboard focus.
Behavior changes to note:
onActionnow also fires when a toggle action is switched off (previously silent), so feedback can be persisted correctly.onAction's action parameter type widened fromActionTypetoActionId(ActionTypeFiltered | string) to support custom actions — explicitly typed callbacks may need the parameter type updated.
- Controlled active state: new