feat: add sound settings support to AbacusReact component

- Add soundEnabled and soundVolume props to AbacusConfig interface
- Allow direct prop overrides for sound settings in component
- Maintain backward compatibility with context-based configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock 2025-09-29 09:42:57 -05:00
parent 3fa314aaa5
commit 90b9ffa0d8
2 changed files with 440 additions and 1210 deletions

View File

@ -234,6 +234,8 @@ export interface AbacusConfig {
interactive?: boolean;
gestures?: boolean;
showNumbers?: boolean;
soundEnabled?: boolean;
soundVolume?: number;
// Advanced customization
customStyles?: AbacusCustomStyles;
@ -1302,6 +1304,8 @@ export const AbacusReact: React.FC<AbacusConfig> = ({
interactive,
gestures,
showNumbers,
soundEnabled,
soundVolume,
// Advanced customization props
customStyles,
callbacks,
@ -1337,8 +1341,8 @@ export const AbacusReact: React.FC<AbacusConfig> = ({
interactive: interactive ?? contextConfig.interactive,
gestures: gestures ?? contextConfig.gestures,
showNumbers: showNumbers ?? contextConfig.showNumbers,
soundEnabled: contextConfig.soundEnabled,
soundVolume: contextConfig.soundVolume
soundEnabled: soundEnabled ?? contextConfig.soundEnabled,
soundVolume: soundVolume ?? contextConfig.soundVolume
};
// Calculate effective columns first, without depending on columnStates
const effectiveColumns = useMemo(() => {

File diff suppressed because it is too large Load Diff