chore: consistent formatting (#47)

This commit is contained in:
Christian Pillsbury
2025-10-09 12:18:31 -07:00
committed by GitHub
parent 9c6eaef2aa
commit 9c5b29a15b
35 changed files with 193 additions and 180 deletions
@@ -1,6 +1,7 @@
import type { Placement } from '@floating-ui/dom';
import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom';
import { uniqueId } from '../utils/element-utils';
export class MediaPopoverRoot extends HTMLElement {
@@ -60,7 +60,7 @@ export class TimeSliderRootBase extends HTMLElement {
}
get orientation(): 'horizontal' | 'vertical' {
return this.getAttribute('orientation') as 'horizontal' | 'vertical' || 'horizontal';
return (this.getAttribute('orientation') as 'horizontal' | 'vertical') || 'horizontal';
}
attributeChangedCallback(name: string, _oldValue: string | null, _newValue: string | null): void {
@@ -2,6 +2,7 @@ import type { Placement } from '@floating-ui/dom';
import type { MediaContainer } from '@/media-container';
import { arrow, autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom';
import { uniqueId } from '../utils/element-utils';
export class MediaTooltipRoot extends HTMLElement {
@@ -62,7 +62,7 @@ export class VolumeSliderRootBase extends HTMLElement {
}
get orientation(): 'horizontal' | 'vertical' {
return this.getAttribute('orientation') as 'horizontal' | 'vertical' || 'horizontal';
return (this.getAttribute('orientation') as 'horizontal' | 'vertical') || 'horizontal';
}
attributeChangedCallback(name: string, _oldValue: string | null, _newValue: string | null): void {
@@ -1,6 +1,6 @@
import { MediaSkin } from '../media-skin';
import { uniqueId } from '../utils/element-utils';
import '../media-container';
import '../components/media-play-button';
import '../components/media-mute-button';
@@ -26,7 +26,12 @@ export interface ConnectedComponentConstructor<State> {
* @param displayName - Display name for debugging
* @returns Connected custom element class with media store integration
*/
export function toConnectedHTMLComponent<State = any>(BaseClass: CustomElementConstructor, stateHook: StateHook<State>, propsHook: PropsHook<State>, displayName?: string): ConnectedComponentConstructor<State> {
export function toConnectedHTMLComponent<State = any>(
BaseClass: CustomElementConstructor,
stateHook: StateHook<State>,
propsHook: PropsHook<State>,
displayName?: string,
): ConnectedComponentConstructor<State> {
const ConnectedComponent = class extends ConsumerMixin(BaseClass) {
static get observedAttributes(): string[] {
return [