mirror of
https://github.com/zoriya/v10.git
synced 2026-08-05 13:48:14 +00:00
- Create generic toConnectedHTMLComponent factory with hooks pattern - Implement usePlayButtonState/Props/Events hooks for state, attributes, and event handling - Implement useMuteButtonState/Props/Events hooks for mute functionality - Replace old connected/ components with new hook-style architecture - Fix button interactivity by using MediaPlayButton/MediaMuteButton base classes - Maintain backward compatibility through connected-with-defaults/ registration - Components now mirror React hooks architecture with separated concerns 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
10 lines
458 B
TypeScript
10 lines
458 B
TypeScript
import { PlayButton } from '../PlayButton.js';
|
|
|
|
// NOTE: In this architecture it will be important to decouple component class definitions from their registration in the CustomElementsRegistry. (CJP)
|
|
if (!globalThis.customElements.get('media-play-button')) {
|
|
// @ts-ignore - Custom element constructor compatibility
|
|
globalThis.customElements.define('media-play-button', PlayButton);
|
|
}
|
|
|
|
export { PlayButton as MediaPlayButton };
|
|
export default PlayButton; |