refactor(core)!: tighten constrained jsx boundary

This commit is contained in:
Rahim
2026-06-20 15:37:34 -07:00
parent 5fcab69d34
commit 99613ad768
31 changed files with 314 additions and 400 deletions
@@ -1,11 +1,5 @@
import {
createDoubleTapGesture,
createTapGesture,
type GestureActionName,
type GesturePointerType,
type GestureRegion,
resolveGestureAction,
} from '@videojs/core/dom';
import type { GestureProps } from '@videojs/core';
import { createDoubleTapGesture, createTapGesture, resolveGestureAction } from '@videojs/core/dom';
import type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';
import { ContextConsumer } from '@videojs/element/context';
@@ -25,11 +19,11 @@ export class GestureElement extends MediaElement {
disabled: { type: Boolean },
};
type: 'tap' | 'doubletap' | (string & {}) = '';
action: GestureActionName | (string & {}) = '';
value: number | undefined = undefined;
pointer: GesturePointerType | undefined = undefined;
region: GestureRegion | undefined = undefined;
type: GestureProps['type'] = '';
action: GestureProps['action'] = '';
value: GestureProps['value'] = undefined;
pointer: GestureProps['pointer'] = undefined;
region: GestureProps['region'] = undefined;
disabled = false;
readonly #player = new PlayerController(this, playerContext);
@@ -1,4 +1,5 @@
import { createHotkey, type HotkeyActionName, isHotkeyToggleAction, resolveHotkeyAction } from '@videojs/core/dom';
import type { HotkeyProps } from '@videojs/core';
import { createHotkey, isHotkeyToggleAction, resolveHotkeyAction } from '@videojs/core/dom';
import type { PropertyDeclarationMap, PropertyValues } from '@videojs/element';
import { ContextConsumer } from '@videojs/element/context';
@@ -17,11 +18,11 @@ export class HotkeyElement extends MediaElement {
target: { type: String },
};
keys = '';
action: HotkeyActionName | (string & {}) = '';
value: number | undefined = undefined;
keys: HotkeyProps['keys'] = '';
action: HotkeyProps['action'] = '';
value: HotkeyProps['value'] = undefined;
disabled = false;
target: 'player' | 'document' = 'player';
target: NonNullable<HotkeyProps['target']> = 'player';
readonly #player = new PlayerController(this, playerContext);
readonly #container = new ContextConsumer(this, {