diff --git a/docs/assets/ts/artplayer.d.ts b/docs/assets/ts/artplayer.d.ts index 6f298d4f7..e8ab30f4c 100644 --- a/docs/assets/ts/artplayer.d.ts +++ b/docs/assets/ts/artplayer.d.ts @@ -44,20 +44,29 @@ export interface Utils { errorHandle: (condition: T, msg: string) => T extends true ? T : never silencePromise: (value: T) => T extends Promise ? Promise : T - def: (obj: object, name: string, value: unknown) => void + def: { + /** Historical string-key signature; runtime returns obj. */ + (obj: object, name: string, value: unknown): void + (obj: T, name: PropertyKey, value: PropertyDescriptor & ThisType): T + } has: (obj: object, name: PropertyKey) => boolean get: (obj: object, name: PropertyKey) => PropertyDescriptor | undefined mergeDeep: (...args: T) => T[number] - sleep: (ms: number) => Promise + sleep: (ms?: number) => Promise + /** Historical return type; runtime discards the callback result and ignores context. */ debounce: any>(func: F, wait: number, context?: object) => (...args: Parameters) => ReturnType + /** Historical return type; runtime discards the callback result. */ throttle: any>(func: F, wait: number) => (...args: Parameters) => ReturnType clamp: (num: number, a: number, b: number) => number secondToTime: (second: number) => string escape: (str: string) => string + unescape: (str: string) => string capitalize: (str: string) => string + ArtPlayerError: new (message?: string, context?: ((...args: never[]) => unknown) | (abstract new (...args: never[]) => object)) => Error + getIcon: (key?: string, html?: string | HTMLElement) => HTMLElement getComposedPath: (event: Event) => EventTarget[] supportsFlex: () => boolean @@ -330,6 +339,7 @@ export declare class Player { pause(): void play(): Promise + /** Legacy signature; runtime preserves pause's synchronous result or play's Promise. */ toggle(): void attr(key: string, value?: unknown): unknown @@ -389,6 +399,14 @@ export interface Thumbnails { scale?: number } +/** Constructor input; Option retains its historical required URL/read types. */ +export interface OptionInput extends Omit { + url?: string + controls?: ComponentInput[] + layers?: ComponentInput[] + contextmenu?: ComponentInput[] +} + export interface Option { /** * The player id @@ -752,6 +770,12 @@ export type I18n = Partial>> export type Bar = 'loaded' | 'played' | 'hover' +/** Actual built-in subtitle update payloads; legacy Events keeps its scalar types. */ +export interface SubtitleUpdateEvents { + subtitleBeforeUpdate: [cues: VTTCue[]] + subtitleAfterUpdate: [cues: VTTCue[]] +} + export interface Events { 'document:click': [event: Event] 'document:mouseup': [event: Event] @@ -807,7 +831,9 @@ export interface Events { 'destroy': [] 'subtitleOffset': [offset: number] + /** Legacy contextual type; annotate listeners with VTTCue[] for the runtime payload. */ 'subtitleBeforeUpdate': [cue: VTTCue] + /** Legacy contextual type; annotate listeners with VTTCue[] for the runtime payload. */ 'subtitleAfterUpdate': [cue: VTTCue] 'subtitleLoad': [cues: VTTCue[], option: Subtitle] @@ -845,6 +871,15 @@ export interface Events { 'keydown': [event: KeyboardEvent] } +/** The event bus exposed by Artplayer.Emitter; no new runtime export. */ +export interface Emitter> { + e?: { [Name in keyof Events]?: { fn: (...args: [...Events[Name]]) => unknown, ctx: unknown }[] } + on: (name: Name, fn: (this: Context, ...args: [...Events[Name]]) => unknown, ctx?: Context) => this + once: (name: Name, fn: (this: Context, ...args: [...Events[Name]]) => unknown, ctx?: Context) => this + emit: (name: Name, ...args: [...Events[Name]]) => this + off: (name: Name, fn?: (...args: [...Events[Name]]) => unknown) => this +} + export interface CssVar { '--art-theme': string '--art-font-color': string @@ -973,6 +1008,11 @@ export interface Config { ] } +/** Input accepted by the existing HTML renderer, including numeric content. */ +export interface ComponentInput extends Omit { + html?: string | HTMLElement | number +} + export interface Selector { /** * Whether the default is selected @@ -1029,7 +1069,10 @@ export interface Component { /** * Dynamic add a component */ - add: (option: ComponentOption | ((art: Artplayer) => ComponentOption)) => HTMLElement | undefined + add: { + (option: ComponentOption | ((art: Artplayer) => ComponentOption)): HTMLElement | undefined + (option: ComponentInput | ((art: Artplayer) => ComponentInput)): HTMLElement | undefined + } /** * Dynamic remove a component by name @@ -1039,7 +1082,10 @@ export interface Component { /** * Dynamic update a component */ - update: (option: ComponentOption) => HTMLElement | undefined + update: { + (option: ComponentOption): HTMLElement | undefined + (option: ComponentInput): HTMLElement | undefined + } } export interface ComponentOption { @@ -1106,20 +1152,24 @@ export interface ComponentOption { export type { Config, + Emitter, Events, I18n, Icons, Option, + OptionInput, Player, Setting, SettingOption, Subtitle, + SubtitleUpdateEvents, Template, Utils, } export default class Artplayer extends Player { constructor(option: Option, readyCallback?: (this: Artplayer, art: Artplayer) => unknown) + constructor(option: OptionInput, readyCallback?: (this: Artplayer, art: Artplayer) => unknown) static readonly instances: Artplayer[] static readonly version: string @@ -1128,7 +1178,7 @@ export default class Artplayer extends Player { static readonly config: Config static readonly utils: Utils static readonly scheme: Record - static readonly Emitter: new (...args: unknown[]) => unknown + static readonly Emitter: new >(...args: unknown[]) => Emitter static readonly validator: (option: T, scheme: object) => T static readonly kindOf: (item: unknown) => string static readonly html: Artplayer['template']['html'] @@ -1186,15 +1236,19 @@ export default class Artplayer extends Player { torrent?: unknown on(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): this + on(name: T, fn: (...args: SubtitleUpdateEvents[T]) => unknown, ctx?: object): this on(name: string, fn: (...args: unknown[]) => unknown, ctx?: object): this once(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): this + once(name: T, fn: (...args: SubtitleUpdateEvents[T]) => unknown, ctx?: object): this once(name: string, fn: (...args: unknown[]) => unknown, ctx?: object): this emit(name: T, ...args: Events[T]): this + emit(name: T, ...args: SubtitleUpdateEvents[T]): this emit(name: string, ...args: unknown[]): this off(name: T, callback?: (...args: Events[T]) => unknown): this + off(name: T, callback?: (...args: SubtitleUpdateEvents[T]) => unknown): this off(name: string, callback?: (...args: unknown[]) => unknown): this query: Artplayer['template']['query'] @@ -1280,13 +1334,18 @@ export default class Artplayer extends Player { readonly setting: { option: SettingOption[] updateStyle: (width?: number) => void + /** Legacy return signature; a missing runtime entry is null. */ find: (name: string) => SettingOption | undefined + /** Legacy return signature; runtime returns the formatted input item. */ add: (setting: Setting) => Artplayer['setting'] + /** Legacy return signature; runtime returns the updated or added item. */ update: (settings: Setting) => Artplayer['setting'] + /** Legacy return signature; runtime returns undefined. */ remove: (name: string) => Artplayer['setting'] } & Component readonly plugins: { + /** Legacy signature: synchronous factories return this registry directly; Promise factories return a Promise of it. */ add: ( plugin: (this: Artplayer, art: Artplayer) => unknown | Promise, ) => Promise diff --git a/packages/artplayer/ARCHITECTURE.md b/packages/artplayer/ARCHITECTURE.md index 18ac2fee0..0488bb84a 100644 --- a/packages/artplayer/ARCHITECTURE.md +++ b/packages/artplayer/ARCHITECTURE.md @@ -13,7 +13,7 @@ The entry passes Artplayer.option to `option/resolve.ts`, which performs the exi deep merge, restores input.container by reference and invokes the same option-validator function. Allocation of the instance id still precedes validation; DOM mounting follows it. -`option/types.ts` reuses the public Option as the typed input contract. ResolvedOption +`option/types.ts` reuses the public OptionInput as the typed input contract. ResolvedOption requires top-level defaults and subtitle/thumbnail defaults, while explicitly allowing proxy to remain undefined. ResolvedInput preserves extra typed application fields without adding a global any index signature. The one assertion after validation connects the @@ -30,12 +30,14 @@ The public Artplayer.validator and scheme references remain available as before. Merge behavior includes unknown own keys, collection item references, two reads of an enumerable input container getter, and restoration of an inherited container. Explicit -undefined can still fail the existing schema instead of being silently defaulted. This -task changes neither validation rules nor public consumer declarations. +undefined can still fail the existing schema instead of being silently defaulted. +Runtime validation is unchanged; public input expansions are described below. -Two verified declaration gaps are tracked as BASE-TYPE-06 for CORE-07: existing JS can -omit url and use numeric control HTML, while the current public types reject those forms. -The historical rejection fixtures must become positive consumer checks when reconciled. +CORE-07 adds OptionInput for omitted URL and numeric component HTML. Historical Option +keeps its required URL/read types; the constructor accepts both via overloads. Source +fixtures now accept the expanded inputs, and declaration-legacy.ts protects old reads. +The additive declarations and remaining return conflicts are tracked in +[types/COMPATIBILITY.md](./types/COMPATIBILITY.md). Other permissive validator cases are not blanket guarantees that later DOM/media code can consume every accepted value. Preserve failure stages while migrating those consumers. @@ -257,11 +259,10 @@ documented cast to the pre-existing generic return contract. No file-wide any or type-check suppression was added. The main public declarations remain a separate compatibility surface; see [types/README.md](./types/README.md). -Existing declaration discrepancies are still tracked for CORE-07: Utils lacks some -runtime exports, def is declared void, debounce/throttle declare the callback return -instead of void, and debounce's old optional context argument is ignored at runtime. -Sleep's declaration also requires a delay while runtime defaults to zero. These were -not silently tightened during source migration; use the actual source types internally. +Public return discrepancies remain after CORE-07. It adds unescape/ArtPlayerError, +optional sleep and a symbol/PropertyKey def overload; old string def and debounce/throttle return declarations +remain for source compatibility. The old debounce context argument is ignored at runtime. +BASE-TYPE-05 remains open through CORE-21; use the actual source types internally. Lifecycle-owned timer cancellation is part of CORE-04/17 and the existing BASE-PERF-01 finding, not a claim that a standalone debounce can know when its owner is destroyed. diff --git a/packages/artplayer/src/option/resolve.ts b/packages/artplayer/src/option/resolve.ts index 281bd8925..ac954a5db 100644 --- a/packages/artplayer/src/option/resolve.ts +++ b/packages/artplayer/src/option/resolve.ts @@ -1,9 +1,9 @@ -import type { Option, ResolvedInput, ResolvedOption } from './types' +import type { OptionInput, ResolvedInput, ResolvedOption } from './types' import validator from 'option-validator' import scheme from '../scheme' import { mergeDeep } from '../utils/property' -export default function resolveOption(input: Input, defaults: ResolvedOption): ResolvedInput { +export default function resolveOption(input: Input, defaults: ResolvedOption): ResolvedInput { const merged = mergeDeep(defaults, input) merged.container = input.container // Keep the existing runtime validator. It checks the known schema, not extension data. diff --git a/packages/artplayer/src/option/types.ts b/packages/artplayer/src/option/types.ts index d2884dd56..95982d2c3 100644 --- a/packages/artplayer/src/option/types.ts +++ b/packages/artplayer/src/option/types.ts @@ -1,13 +1,13 @@ -import type { Option, Thumbnails } from '../../types/option' +import type { OptionInput, Thumbnails } from '../../types/option' import type { Subtitle } from '../../types/subtitle' -export type { Option } from '../../types/option' +export type { Option, OptionInput } from '../../types/option' // A successfully merged typed input, not a general guard for arbitrary JS objects. -export interface ResolvedOption extends Omit, 'proxy' | 'subtitle' | 'thumbnails'> { - proxy: Option['proxy'] +export interface ResolvedOption extends Omit, 'proxy' | 'subtitle' | 'thumbnails'> { + proxy: OptionInput['proxy'] subtitle: Required thumbnails: Required } -export type ResolvedInput = ResolvedOption & Omit +export type ResolvedInput = ResolvedOption & Omit diff --git a/packages/artplayer/types/COMPATIBILITY.md b/packages/artplayer/types/COMPATIBILITY.md new file mode 100644 index 000000000..30e75d915 --- /dev/null +++ b/packages/artplayer/types/COMPATIBILITY.md @@ -0,0 +1,72 @@ +# Public type compatibility boundaries + +The declarations preserve legal historical TypeScript consumers as well as runtime +calls. Some old return and callback declarations were inaccurate. Changing a +return from Promise to a union, or an inferred callback parameter from cue to cue +array, can break old source even when runtime behavior is unchanged. Do not hide +that conflict with `any`, an impossible intersection, or a runtime Promise wrapper. + +## Additive declarations + +- Option retains its required string URL and existing component read types. + OptionInput accepts omitted URL and numeric component HTML. Constructor overloads + accept both; Component.add/update also accept ComponentInput. Use OptionInput for + new configurations that require these forms. Instance/static option read types + retain their old surface; internal ResolvedOption models the expanded input. +- Artplayer.Emitter now returns the named Emitter interface. It supports optional + typed event maps, correlated payloads, explicit callback context, symbols and + chaining. Constructor arguments remain accepted and ignored at runtime. +- SubtitleUpdateEvents describes the real before/after update cue arrays. Extra + on/once/off/emit overloads accept explicit array callbacks. Historical Events + and the first overload retain old contextual inference for compatibility: + +```ts +art.on('subtitleBeforeUpdate', (cues: VTTCue[]) => { + cues.forEach(cue => console.log(cue.text)) +}) +``` + +- Utils includes existing unescape and ArtPlayerError exports and optional sleep + delay. A PropertyKey/identity def overload supports symbol keys while the old + string-key signature remains first. These are type additions, not new runtime + functions or exports. + +## Retained conflicts and owners + +| Surface | Actual runtime | Retained historical declaration | Follow-up | +| ------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------- | ------------------------ | +| plugins.add | Registry for a synchronous factory; Promise of registry for a Promise factory | Always Promise | CORE-08/21, BASE-TYPE-04 | +| toggle | Pause result or original play Promise, including rejection | void | CORE-10/21, BASE-TYPE-04 | +| debounce/throttle | Wrapper returns undefined; debounce ignores its old context argument | Callback return type | CORE-21, BASE-TYPE-05 | +| def with string key | Native defineProperty returns the target | void, arbitrary descriptor input accepted | CORE-21, BASE-TYPE-05 | +| setting.find | Item or null | Item or undefined | CORE-14/21, BASE-TYPE-07 | +| setting.add/update/remove | Item/item/undefined | Setting registry | CORE-14/21, BASE-TYPE-07 | +| subtitle update events | VTTCue array | Scalar contextual inference unless explicitly annotated | CORE-15/21, BASE-TYPE-07 | +| notice.show getter | Boolean visibility | Historical message/false union | CORE-18/21, BASE-TYPE-07 | + +These remain open declaration work, not release waivers. CORE-21 must resolve the +public/generated facade strategy against both actual returns and historical source +consumers. Migrated implementation modules must use their accurate internal types. +For existing application code, awaiting plugins.add or toggle works for synchronous +and Promise results; ignore timer results, guard setting.find with a truthiness +check, and explicitly annotate cue-array listeners. Do not rely on the inaccurate +return types to call Promise methods on synchronous results or chain settings. + +## Evidence and maintenance + +declaration-legacy.ts is a compile-only regression fixture, not recommended runtime +usage. It retains the historical assignments that make direct return tightening +incompatible. declaration-inputs.ts covers the additions with old and current TS, +Node10/NodeNext/Bundler, and actual installed packages. emitter-source.ts also checks +the public Emitter shape against the real implementation. + +Browser declarations.spec.js compares published/candidate plugin registration, +rejection identity, actual toggle playback, settings return identity, notice state, +static Emitter context and native subtitle cue events. The generated VTT is test +content; explicit Blob URL teardown there does not certify subtitle resource cleanup +(CORE-15). options.spec.js verifies numeric content and omitted URL in the real DOM. + +Run yarn typecheck, yarn ci:check, yarn build:ts and yarn test:package:release, then +the installed-artifact browser suite. Keep the exact historical TS 4.3.5 notice +getter/setter error isolated to the frozen 5.4.0 package. Current declarations must +remain free of diagnostics in every supported compiler mode. diff --git a/packages/artplayer/types/README.md b/packages/artplayer/types/README.md index f6f6884f6..f566081d0 100644 --- a/packages/artplayer/types/README.md +++ b/packages/artplayer/types/README.md @@ -26,16 +26,24 @@ When changing types, run `yarn typecheck`, `yarn test:baseline` and chapter/legacy factories, language data, invalid inputs, NodeNext/Bundler and old TS 4.3.5 consumers. Run `yarn build:ts` to refresh editor declarations. Full editor behavior and other core declaration/runtime mismatches have CORE-07/SITE tasks. + ## Configuration migration boundary -CORE-05 keeps the public Option unchanged. Internal src/option/types.ts distinguishes -typed input from defaults-filled ResolvedOption; it is not a new public export. The -existing public url requirement and exclusion of numeric control HTML differ from -verified JS behavior (BASE-TYPE-06, CORE-07). test/types/options-source.ts records the -current rejection; replace those two negative cases with positive consumer coverage -when expanding the public declarations. Do not change runtime validation to match a -narrower historical declaration. Other optional fields and callback signatures remain -subject to the existing public compatibility contract. +Option retains its historical required URL and component read types. OptionInput is +an additive constructor input: URL is optional and numeric component HTML is accepted. +The constructor keeps its old overload and adds OptionInput; Component.add/update +similarly retain their old signatures and add ComponentInput. Internal ResolvedOption +uses the expanded input with defaults filled. It is not a new public runtime export. +This preserves assignments such as `const url: string = option.url` for existing +Option consumers while matching the verified JS input forms (BASE-TYPE-06). + +Use OptionInput for newly typed configurations that omit URL or use numeric HTML. +test/types/options-source.ts and declaration-inputs.ts cover those forms positively; +declaration-legacy.ts preserves old reads and historically legal return assumptions. +Do not change runtime validation to match a narrower declaration. The additions, +retained conflicts and follow-up owners are detailed in [COMPATIBILITY.md](./COMPATIBILITY.md). +CORE-07 coordinates the differences; it does not close every conflicting old return +signature. CORE-21 remains responsible for the generated/public declaration strategy. ## Internal media migration diff --git a/packages/artplayer/types/artplayer.d.cts b/packages/artplayer/types/artplayer.d.cts index 3617a3775..e039bd3c8 100644 --- a/packages/artplayer/types/artplayer.d.cts +++ b/packages/artplayer/types/artplayer.d.cts @@ -1,18 +1,23 @@ import type * as Definition from './artplayer.js' declare const Artplayer: typeof Definition.default +// eslint-disable-next-line ts/no-redeclare -- CJS constructor value and instance type share the export. type Artplayer = Definition.default +// eslint-disable-next-line ts/no-redeclare -- Namespace merging carries named types on export =. declare namespace Artplayer { type Config = Definition.Config + type Emitter> = Definition.Emitter type Events = Definition.Events type I18n = Definition.I18n type Icons = Definition.Icons type Option = Definition.Option + type OptionInput = Definition.OptionInput type Player = Definition.Player type Setting = Definition.Setting type SettingOption = Definition.SettingOption type Subtitle = Definition.Subtitle + type SubtitleUpdateEvents = Definition.SubtitleUpdateEvents type Template = Definition.Template type Utils = Definition.Utils } diff --git a/packages/artplayer/types/artplayer.d.mts b/packages/artplayer/types/artplayer.d.mts index 420fe4b99..bb3b9be0c 100644 --- a/packages/artplayer/types/artplayer.d.mts +++ b/packages/artplayer/types/artplayer.d.mts @@ -1,2 +1,2 @@ export { default } from './artplayer.cjs' -export type { Config, Events, I18n, Icons, Option, Player, Setting, SettingOption, Subtitle, Template, Utils } from './artplayer.js' +export type { Config, Emitter, Events, I18n, Icons, Option, OptionInput, Player, Setting, SettingOption, Subtitle, SubtitleUpdateEvents, Template, Utils } from './artplayer.js' diff --git a/packages/artplayer/types/artplayer.d.ts b/packages/artplayer/types/artplayer.d.ts index 10b1b59ba..6d18a97a1 100644 --- a/packages/artplayer/types/artplayer.d.ts +++ b/packages/artplayer/types/artplayer.d.ts @@ -1,9 +1,10 @@ import type { Component } from './component' import type { Config } from './config' -import type { Events } from './events' +import type { Emitter } from './emitter' +import type { Events, SubtitleUpdateEvents } from './events' import type { I18n } from './i18n' import type { Icons } from './icons' -import type { Option } from './option' +import type { Option, OptionInput } from './option' import type { Player } from './player' import type { Setting, SettingOption } from './setting' import type { Subtitle } from './subtitle' @@ -12,20 +13,24 @@ import type { Utils } from './utils' export type { Config, + Emitter, Events, I18n, Icons, Option, + OptionInput, Player, Setting, SettingOption, Subtitle, + SubtitleUpdateEvents, Template, Utils, } export default class Artplayer extends Player { constructor(option: Option, readyCallback?: (this: Artplayer, art: Artplayer) => unknown) + constructor(option: OptionInput, readyCallback?: (this: Artplayer, art: Artplayer) => unknown) static readonly instances: Artplayer[] static readonly version: string @@ -34,7 +39,7 @@ export default class Artplayer extends Player { static readonly config: Config static readonly utils: Utils static readonly scheme: Record - static readonly Emitter: new (...args: unknown[]) => unknown + static readonly Emitter: new >(...args: unknown[]) => Emitter static readonly validator: (option: T, scheme: object) => T static readonly kindOf: (item: unknown) => string static readonly html: Artplayer['template']['html'] @@ -92,15 +97,19 @@ export default class Artplayer extends Player { torrent?: unknown on(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): this + on(name: T, fn: (...args: SubtitleUpdateEvents[T]) => unknown, ctx?: object): this on(name: string, fn: (...args: unknown[]) => unknown, ctx?: object): this once(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): this + once(name: T, fn: (...args: SubtitleUpdateEvents[T]) => unknown, ctx?: object): this once(name: string, fn: (...args: unknown[]) => unknown, ctx?: object): this emit(name: T, ...args: Events[T]): this + emit(name: T, ...args: SubtitleUpdateEvents[T]): this emit(name: string, ...args: unknown[]): this off(name: T, callback?: (...args: Events[T]) => unknown): this + off(name: T, callback?: (...args: SubtitleUpdateEvents[T]) => unknown): this off(name: string, callback?: (...args: unknown[]) => unknown): this query: Artplayer['template']['query'] @@ -186,13 +195,18 @@ export default class Artplayer extends Player { readonly setting: { option: SettingOption[] updateStyle: (width?: number) => void + /** Legacy return signature; a missing runtime entry is null. */ find: (name: string) => SettingOption | undefined + /** Legacy return signature; runtime returns the formatted input item. */ add: (setting: Setting) => Artplayer['setting'] + /** Legacy return signature; runtime returns the updated or added item. */ update: (settings: Setting) => Artplayer['setting'] + /** Legacy return signature; runtime returns undefined. */ remove: (name: string) => Artplayer['setting'] } & Component readonly plugins: { + /** Legacy signature: synchronous factories return this registry directly; Promise factories return a Promise of it. */ add: ( plugin: (this: Artplayer, art: Artplayer) => unknown | Promise, ) => Promise diff --git a/packages/artplayer/types/component.d.ts b/packages/artplayer/types/component.d.ts index d729edaad..7fdf4213d 100644 --- a/packages/artplayer/types/component.d.ts +++ b/packages/artplayer/types/component.d.ts @@ -1,5 +1,10 @@ import type Artplayer from './artplayer' +/** Input accepted by the existing HTML renderer, including numeric content. */ +export interface ComponentInput extends Omit { + html?: string | HTMLElement | number +} + export interface Selector { /** * Whether the default is selected @@ -56,7 +61,10 @@ export interface Component { /** * Dynamic add a component */ - add: (option: ComponentOption | ((art: Artplayer) => ComponentOption)) => HTMLElement | undefined + add: { + (option: ComponentOption | ((art: Artplayer) => ComponentOption)): HTMLElement | undefined + (option: ComponentInput | ((art: Artplayer) => ComponentInput)): HTMLElement | undefined + } /** * Dynamic remove a component by name @@ -66,7 +74,10 @@ export interface Component { /** * Dynamic update a component */ - update: (option: ComponentOption) => HTMLElement | undefined + update: { + (option: ComponentOption): HTMLElement | undefined + (option: ComponentInput): HTMLElement | undefined + } } export interface ComponentOption { diff --git a/packages/artplayer/types/emitter.d.ts b/packages/artplayer/types/emitter.d.ts new file mode 100644 index 000000000..f9bb749c1 --- /dev/null +++ b/packages/artplayer/types/emitter.d.ts @@ -0,0 +1,8 @@ +/** The event bus exposed by Artplayer.Emitter; no new runtime export. */ +export interface Emitter> { + e?: { [Name in keyof Events]?: { fn: (...args: [...Events[Name]]) => unknown, ctx: unknown }[] } + on: (name: Name, fn: (this: Context, ...args: [...Events[Name]]) => unknown, ctx?: Context) => this + once: (name: Name, fn: (this: Context, ...args: [...Events[Name]]) => unknown, ctx?: Context) => this + emit: (name: Name, ...args: [...Events[Name]]) => this + off: (name: Name, fn?: (...args: [...Events[Name]]) => unknown) => this +} diff --git a/packages/artplayer/types/events.d.ts b/packages/artplayer/types/events.d.ts index 95e26e03a..226ad4063 100644 --- a/packages/artplayer/types/events.d.ts +++ b/packages/artplayer/types/events.d.ts @@ -3,6 +3,12 @@ import type { Subtitle } from './subtitle' export type Bar = 'loaded' | 'played' | 'hover' +/** Actual built-in subtitle update payloads; legacy Events keeps its scalar types. */ +export interface SubtitleUpdateEvents { + subtitleBeforeUpdate: [cues: VTTCue[]] + subtitleAfterUpdate: [cues: VTTCue[]] +} + export interface Events { 'document:click': [event: Event] 'document:mouseup': [event: Event] @@ -58,7 +64,9 @@ export interface Events { 'destroy': [] 'subtitleOffset': [offset: number] + /** Legacy contextual type; annotate listeners with VTTCue[] for the runtime payload. */ 'subtitleBeforeUpdate': [cue: VTTCue] + /** Legacy contextual type; annotate listeners with VTTCue[] for the runtime payload. */ 'subtitleAfterUpdate': [cue: VTTCue] 'subtitleLoad': [cues: VTTCue[], option: Subtitle] diff --git a/packages/artplayer/types/option.d.ts b/packages/artplayer/types/option.d.ts index 6e52f86de..9a69165cc 100644 --- a/packages/artplayer/types/option.d.ts +++ b/packages/artplayer/types/option.d.ts @@ -1,5 +1,5 @@ import type Artplayer from './artplayer' -import type { ComponentOption } from './component' +import type { ComponentInput, ComponentOption } from './component' import type { CssVar } from './cssVar' import type { I18n } from './i18n' import type { Icons } from './icons' @@ -48,6 +48,14 @@ export interface Thumbnails { scale?: number } +/** Constructor input; Option retains its historical required URL/read types. */ +export interface OptionInput extends Omit { + url?: string + controls?: ComponentInput[] + layers?: ComponentInput[] + contextmenu?: ComponentInput[] +} + export interface Option { /** * The player id diff --git a/packages/artplayer/types/player.d.ts b/packages/artplayer/types/player.d.ts index eba4c6034..14051a790 100644 --- a/packages/artplayer/types/player.d.ts +++ b/packages/artplayer/types/player.d.ts @@ -93,6 +93,7 @@ export declare class Player { pause(): void play(): Promise + /** Legacy signature; runtime preserves pause's synchronous result or play's Promise. */ toggle(): void attr(key: string, value?: unknown): unknown diff --git a/packages/artplayer/types/utils.d.ts b/packages/artplayer/types/utils.d.ts index 3d4b1bd0d..63229ca7f 100644 --- a/packages/artplayer/types/utils.d.ts +++ b/packages/artplayer/types/utils.d.ts @@ -44,20 +44,29 @@ export interface Utils { errorHandle: (condition: T, msg: string) => T extends true ? T : never silencePromise: (value: T) => T extends Promise ? Promise : T - def: (obj: object, name: string, value: unknown) => void + def: { + /** Historical string-key signature; runtime returns obj. */ + (obj: object, name: string, value: unknown): void + (obj: T, name: PropertyKey, value: PropertyDescriptor & ThisType): T + } has: (obj: object, name: PropertyKey) => boolean get: (obj: object, name: PropertyKey) => PropertyDescriptor | undefined mergeDeep: (...args: T) => T[number] - sleep: (ms: number) => Promise + sleep: (ms?: number) => Promise + /** Historical return type; runtime discards the callback result and ignores context. */ debounce: any>(func: F, wait: number, context?: object) => (...args: Parameters) => ReturnType + /** Historical return type; runtime discards the callback result. */ throttle: any>(func: F, wait: number) => (...args: Parameters) => ReturnType clamp: (num: number, a: number, b: number) => number secondToTime: (second: number) => string escape: (str: string) => string + unescape: (str: string) => string capitalize: (str: string) => string + ArtPlayerError: new (message?: string, context?: ((...args: never[]) => unknown) | (abstract new (...args: never[]) => object)) => Error + getIcon: (key?: string, html?: string | HTMLElement) => HTMLElement getComposedPath: (event: Event) => EventTarget[] supportsFlex: () => boolean diff --git a/refactor/baselines/declaration-inputs-validation.json b/refactor/baselines/declaration-inputs-validation.json new file mode 100644 index 000000000..35a3d2a86 --- /dev/null +++ b/refactor/baselines/declaration-inputs-validation.json @@ -0,0 +1,576 @@ +{ + "task": "CORE-07", + "status": "partial", + "validatedScope": "additive option inputs, missing utilities, historical return consumers", + "node": "v24.21.0", + "types": { + "packages/artplayer/types/artplayer.d.cts": "949be8471bc369f4be21654f20c32eb8319944241b5389d1ba91f0d92b2d0195", + "packages/artplayer/types/artplayer.d.mts": "52bd9520a975f9b69d0169b2ef362dca8f8a3101127041930d3d81d8c7a6c51a", + "packages/artplayer/types/artplayer.d.ts": "e09779cdbc55fbab50928d01a12f737206b6bb0221f158e9733289a60f23fbe9", + "packages/artplayer/types/component.d.ts": "aa1c43be67322781b4b355b143bc69d9f29d22e578e4974d6a13e957a7c0334f", + "packages/artplayer/types/config.d.ts": "c4fd8681bf32b10c743e3e561c532520c8f32e43fd765524850b15e55cb91c72", + "packages/artplayer/types/cssVar.d.ts": "e027d82fb4f01c9ce7559cf679b2d5ee1962d3f7e5b4dd64ca21f472b933efb6", + "packages/artplayer/types/events.d.ts": "98c74aebb82455accc0b3523af5a1145bc9119da58c884200adc36e70a164b02", + "packages/artplayer/types/i18n.d.ts": "3e14759caf71f97f01650839248c8737c42d2c2979dabc43ad92b724da648708", + "packages/artplayer/types/icons.d.ts": "0d8e8e52e52130dd4a29bab551dd7a2a954797e42e92a6e068c85d583e23e6a4", + "packages/artplayer/types/language.d.cts": "1c9e0c47fae3c2d68c3e144d95a55071318a03bb31554dd049109efd3d0f95a4", + "packages/artplayer/types/language.d.mts": "c391e863012c77769e661afbf8fa949e9373aa88d17f58cbba7f5696edb8077f", + "packages/artplayer/types/option.d.ts": "2407f08755cfe854821a65fb8c74b7ea5078d5b8f9cd9bdd3e67904529840585", + "packages/artplayer/types/player.d.ts": "986382bb6b4e82746fd2405092e69d0ef413988887a557a0fd4db85d64b78d54", + "packages/artplayer/types/quality.d.ts": "7ed6ed78cea52991b2f6ddd2bd3b7bd8c5146fdfff7486fe8b814c3e632f1567", + "packages/artplayer/types/setting.d.ts": "d12a75b656fff70cbb30be4bffec46d9c4273636e8722bce971a4d2b188712a1", + "packages/artplayer/types/subtitle.d.ts": "d25b470e47d6a9bd696d9c1ad8adb58e56a208f05695186d513bc8c43c2e8acf", + "packages/artplayer/types/template.d.ts": "68aed9e97d006d6be4fabb8504ca84dafab770b0925f4d6e7319e67c82f21b0d", + "packages/artplayer/types/utils.d.ts": "3957fa840e472b4da260a3179878550dd3b99ecd2ef27e85821abf446fa4d95e" + }, + "ci": { + "total": 112, + "unit": 83, + "engineering": 4, + "baseline": 25, + "logSha256": "0002c9e307dfbf18f5e2a5f0f6b3b84b52c5ebe8be3ed61fa90b36ff5845f73a" + }, + "packages": [ + { + "name": "artplayer", + "version": "5.4.1", + "archive": "artplayer.tgz", + "sha256": "7596ef220b89295bf641d924aa556ea03ba1e854b275ed89db7a3e358747f2a3", + "files": { + "package/ARCHITECTURE.md": "47faff9250a85ce2a1ce8452628d5c81e26db7ff16a78134d83536104707d68a", + "package/README.md": "1e185e65f67fc2081b4182bbc6c4558ea05b6e3fa3acc5dd0c3ac7df1d542b09", + "package/dist/artplayer.js": "ce632f30f93eb81b856191082fccdfb2cab81aa39277eee4b89b6dfebb0ccd49", + "package/dist/artplayer.legacy.js": "9b5d7c77785f556c667a77ecbae70fdc562c8362dd0476c55310859b4f0b1dc7", + "package/dist/artplayer.mjs": "1fec67e1029191869da1e4895c0d6fecfe72811f0fb26e3159a9403a6f8d107c", + "package/dist/i18n/ar.js": "61c43469ee95a00dc624583f418653e3dcbf48b24ae6a4c203ad986234852365", + "package/dist/i18n/ar.mjs": "68922fdc9f80d3321ea0654c8ff8f5875b6715103d2b14ffcf17f93738b39cf9", + "package/dist/i18n/cs.js": "ad7bbf8853204a6955ef84bfbd932cab3f141a7e73a8145f28ba7a5b2b83b7c0", + "package/dist/i18n/cs.mjs": "29a489be767fda9d46b59c9adbaad323f17a5e67daf7f7aa78b7ce8fb5b4d63c", + "package/dist/i18n/es.js": "aaa95cc9645b734c58fba06fdbcdda962c4cb3a0e7eb6206f06d6168208cd86b", + "package/dist/i18n/es.mjs": "331d2ef74da2eec8f3304fec0b5340c795d9c1eec24e08167c9a7b66bf30973b", + "package/dist/i18n/fa.js": "c998467261cbdfd2c3fb16c0ae4b2c48c409f42f41aea35ed94766f1e12819d5", + "package/dist/i18n/fa.mjs": "b4c98894b46975cebf5ea9088bcf0b5bdfd408bc3c82f4e2e9128133c7de2d4d", + "package/dist/i18n/fr.js": "6b06e16b1fb01c8695fb5c10b32a00421399180de5dc5d845ce17010f2fd3e66", + "package/dist/i18n/fr.mjs": "abe8e3548fa7304f302e2c74818a6176edee8c3b65e33cb6f62e96d130749ee5", + "package/dist/i18n/id.js": "a5832c4bfc03c7f16418bf4b324d9773895541dc823ece9114741794737aad74", + "package/dist/i18n/id.mjs": "a40a433be6ca1ac1ee1810fe805ee60784d349e59b9ad82ea80201d660db4e68", + "package/dist/i18n/pl.js": "2491487062bdfc91d60f17c6e9a83ee196c991216d15f525fe3536b98873da2c", + "package/dist/i18n/pl.mjs": "ad8ea2c03785edbfe1f35761bec21b8a04213f9fa88a794d850bb3973564930f", + "package/dist/i18n/ru.js": "2d3a9ee6533cb6fa961f0a24a25ce63cc76992fca17e1769b6fa75104f8a1529", + "package/dist/i18n/ru.mjs": "a89b8c36cfd7c181c2b31aa823deda3d7c37b56b2b81746338c52ea1c1d93352", + "package/dist/i18n/tr.js": "438b06a4c3f479a2901b0085eaa7bdba8eaef87bdb07ff3faa559c85403fe433", + "package/dist/i18n/tr.mjs": "cc96f9cbb9c1587d5cd8f25b0b9800678ad76e93de089ae42c38dee16e6fe8fa", + "package/dist/i18n/vi.js": "1ffbd62843a902ea2967eab46432d3fc548f5633e53eed104314b523cacc46a8", + "package/dist/i18n/vi.mjs": "7872ded84622bcda20e8c1d70c597c2ba071b50701900efa47cc4683ee17f1a2", + "package/dist/i18n/zh-tw.js": "2d43577f98456488196921e1ec721695a95e1b8c827077286b02ce3fb987e8ff", + "package/dist/i18n/zh-tw.mjs": "7ec638b4babe59d3ab1d3e64abdd74a96fefb260a50e2cd7240f8d50a1340925", + "package/package.json": "b343df9955df9ac0ea71ea775bd0743c6b26c06d3bb7699128f7eac484fa769f", + "package/types/README.md": "4cc8175527081ef03cc5ff4616463da356159444be156dd7972a558eab5fc2f6", + "package/types/artplayer.d.cts": "949be8471bc369f4be21654f20c32eb8319944241b5389d1ba91f0d92b2d0195", + "package/types/artplayer.d.mts": "52bd9520a975f9b69d0169b2ef362dca8f8a3101127041930d3d81d8c7a6c51a", + "package/types/artplayer.d.ts": "e09779cdbc55fbab50928d01a12f737206b6bb0221f158e9733289a60f23fbe9", + "package/types/component.d.ts": "aa1c43be67322781b4b355b143bc69d9f29d22e578e4974d6a13e957a7c0334f", + "package/types/config.d.ts": "c4fd8681bf32b10c743e3e561c532520c8f32e43fd765524850b15e55cb91c72", + "package/types/cssVar.d.ts": "e027d82fb4f01c9ce7559cf679b2d5ee1962d3f7e5b4dd64ca21f472b933efb6", + "package/types/events.d.ts": "98c74aebb82455accc0b3523af5a1145bc9119da58c884200adc36e70a164b02", + "package/types/i18n.d.ts": "3e14759caf71f97f01650839248c8737c42d2c2979dabc43ad92b724da648708", + "package/types/icons.d.ts": "0d8e8e52e52130dd4a29bab551dd7a2a954797e42e92a6e068c85d583e23e6a4", + "package/types/language.d.cts": "1c9e0c47fae3c2d68c3e144d95a55071318a03bb31554dd049109efd3d0f95a4", + "package/types/language.d.mts": "c391e863012c77769e661afbf8fa949e9373aa88d17f58cbba7f5696edb8077f", + "package/types/legacy/language.d.ts": "c452ffd764ff9b29b819b3475c42395d2ea7a33560d8c186ef5df3844b9524c3", + "package/types/option.d.ts": "2407f08755cfe854821a65fb8c74b7ea5078d5b8f9cd9bdd3e67904529840585", + "package/types/player.d.ts": "986382bb6b4e82746fd2405092e69d0ef413988887a557a0fd4db85d64b78d54", + "package/types/quality.d.ts": "7ed6ed78cea52991b2f6ddd2bd3b7bd8c5146fdfff7486fe8b814c3e632f1567", + "package/types/setting.d.ts": "d12a75b656fff70cbb30be4bffec46d9c4273636e8722bce971a4d2b188712a1", + "package/types/subtitle.d.ts": "d25b470e47d6a9bd696d9c1ad8adb58e56a208f05695186d513bc8c43c2e8acf", + "package/types/template.d.ts": "68aed9e97d006d6be4fabb8504ca84dafab770b0925f4d6e7319e67c82f21b0d", + "package/types/utils.d.ts": "3957fa840e472b4da260a3179878550dd3b99ecd2ef27e85821abf446fa4d95e" + } + }, + { + "name": "artplayer-plugin-chapter", + "version": "1.1.0", + "archive": "artplayer-plugin-chapter.tgz", + "sha256": "dbb3077746b1270d55b2add8ca0b28759732b87dcfe2ae3d0599abafbe9eb33e", + "files": { + "package/ARCHITECTURE.md": "20743bad87a174b0450e0d876b6aa6b2a9f47df296d479511ce7cc9298fdb57c", + "package/README.md": "b95400ff3d525621a15268bb56a2d353aacaaadefde7e735d7abd91a34edd96f", + "package/dist/artplayer-plugin-chapter.js": "6ac3dfe28f46084ac7caedd571b1a97dcee3cf9d708112f1b8bbd6566e1dc5c5", + "package/dist/artplayer-plugin-chapter.legacy.js": "6d9bff885412169e701670961aa00c2e46c4b42c9b9647ff4e6d198777d2a359", + "package/dist/artplayer-plugin-chapter.mjs": "26415cecab2c0198c566cef0232e20123413782d5bad7534a32939b3298617af", + "package/package.json": "24eec6907b3218439189adab6af3f932c1497c47c2d41209311c01042b07fd4f", + "package/types/artplayer-plugin-chapter.d.cts": "4f07514b37453cd6cea8e5aa28fa018ff31738e0d423c11a3b5eccd50ed30bcc", + "package/types/artplayer-plugin-chapter.d.mts": "610179754db36276e161a07bccf4eaba8b4480f053e716a2bcc5a1574871a171", + "package/types/artplayer-plugin-chapter.d.ts": "581aa2862e709601c87a23585f54a969ebd350be56a7469a31ff53f1311b578d" + } + } + ], + "packageRuntimeChecks": 27, + "typeModes": [ + { + "compiler": "5.9.3", + "mode": "node10-commonjs", + "diagnostics": [], + "declarations": [ + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.decorators.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.decorators.legacy.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.dom.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.collection.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.core.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.generator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.date.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.regexp.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.array.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.bigint.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.date.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.number.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es5.d.ts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.ts", + "node_modules/artplayer/types/artplayer.d.ts", + "node_modules/artplayer/types/component.d.ts", + "node_modules/artplayer/types/config.d.ts", + "node_modules/artplayer/types/cssVar.d.ts", + "node_modules/artplayer/types/events.d.ts", + "node_modules/artplayer/types/i18n.d.ts", + "node_modules/artplayer/types/icons.d.ts", + "node_modules/artplayer/types/legacy/language.d.ts", + "node_modules/artplayer/types/option.d.ts", + "node_modules/artplayer/types/player.d.ts", + "node_modules/artplayer/types/quality.d.ts", + "node_modules/artplayer/types/setting.d.ts", + "node_modules/artplayer/types/subtitle.d.ts", + "node_modules/artplayer/types/template.d.ts", + "node_modules/artplayer/types/utils.d.ts" + ] + }, + { + "compiler": "5.9.3", + "mode": "nodenext-cjs", + "diagnostics": [], + "declarations": [ + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.decorators.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.decorators.legacy.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.dom.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.collection.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.core.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.generator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.date.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.regexp.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.array.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.bigint.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.date.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.number.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es5.d.ts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.cts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.ts", + "node_modules/artplayer/types/artplayer.d.cts", + "node_modules/artplayer/types/artplayer.d.ts", + "node_modules/artplayer/types/component.d.ts", + "node_modules/artplayer/types/config.d.ts", + "node_modules/artplayer/types/cssVar.d.ts", + "node_modules/artplayer/types/events.d.ts", + "node_modules/artplayer/types/i18n.d.ts", + "node_modules/artplayer/types/icons.d.ts", + "node_modules/artplayer/types/language.d.cts", + "node_modules/artplayer/types/option.d.ts", + "node_modules/artplayer/types/player.d.ts", + "node_modules/artplayer/types/quality.d.ts", + "node_modules/artplayer/types/setting.d.ts", + "node_modules/artplayer/types/subtitle.d.ts", + "node_modules/artplayer/types/template.d.ts", + "node_modules/artplayer/types/utils.d.ts" + ] + }, + { + "compiler": "5.9.3", + "mode": "bundler-esm", + "diagnostics": [], + "declarations": [ + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.decorators.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.decorators.legacy.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.dom.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.collection.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.core.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.generator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.date.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.regexp.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.array.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.bigint.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.date.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.number.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es5.d.ts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.cts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.mts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.ts", + "node_modules/artplayer/types/artplayer.d.cts", + "node_modules/artplayer/types/artplayer.d.mts", + "node_modules/artplayer/types/artplayer.d.ts", + "node_modules/artplayer/types/component.d.ts", + "node_modules/artplayer/types/config.d.ts", + "node_modules/artplayer/types/cssVar.d.ts", + "node_modules/artplayer/types/events.d.ts", + "node_modules/artplayer/types/i18n.d.ts", + "node_modules/artplayer/types/icons.d.ts", + "node_modules/artplayer/types/language.d.cts", + "node_modules/artplayer/types/language.d.mts", + "node_modules/artplayer/types/option.d.ts", + "node_modules/artplayer/types/player.d.ts", + "node_modules/artplayer/types/quality.d.ts", + "node_modules/artplayer/types/setting.d.ts", + "node_modules/artplayer/types/subtitle.d.ts", + "node_modules/artplayer/types/template.d.ts", + "node_modules/artplayer/types/utils.d.ts" + ] + }, + { + "compiler": "4.3.5", + "mode": "node10-commonjs", + "diagnostics": [], + "declarations": [ + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.dom.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.collection.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.core.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.generator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.iterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.proxy.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.reflect.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2015.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2016.array.include.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2016.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2017.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2017.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2017.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2017.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2017.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2017.typedarrays.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2018.asyncgenerator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2018.asynciterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2018.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2018.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2018.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2018.regexp.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2019.array.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2019.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2019.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2019.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2019.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2020.bigint.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2020.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2020.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2020.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2020.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2020.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es2020.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript-compat/lib/lib.es5.d.ts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.ts", + "node_modules/artplayer/types/artplayer.d.ts", + "node_modules/artplayer/types/component.d.ts", + "node_modules/artplayer/types/config.d.ts", + "node_modules/artplayer/types/cssVar.d.ts", + "node_modules/artplayer/types/events.d.ts", + "node_modules/artplayer/types/i18n.d.ts", + "node_modules/artplayer/types/icons.d.ts", + "node_modules/artplayer/types/legacy/language.d.ts", + "node_modules/artplayer/types/option.d.ts", + "node_modules/artplayer/types/player.d.ts", + "node_modules/artplayer/types/quality.d.ts", + "node_modules/artplayer/types/setting.d.ts", + "node_modules/artplayer/types/subtitle.d.ts", + "node_modules/artplayer/types/template.d.ts", + "node_modules/artplayer/types/utils.d.ts" + ] + }, + { + "compiler": "5.9.3", + "mode": "nodenext-esm", + "diagnostics": [], + "declarations": [ + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.decorators.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.decorators.legacy.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.dom.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.collection.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.core.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.generator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.iterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.proxy.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.reflect.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.array.include.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2016.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.date.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2018.regexp.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.array.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.object.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2019.symbol.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.bigint.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.date.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.intl.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.number.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.promise.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.string.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts", + "D:/github/ArtPlayer/node_modules/typescript/lib/lib.es5.d.ts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.cts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.mts", + "node_modules/artplayer-plugin-chapter/types/artplayer-plugin-chapter.d.ts", + "node_modules/artplayer/types/artplayer.d.cts", + "node_modules/artplayer/types/artplayer.d.mts", + "node_modules/artplayer/types/artplayer.d.ts", + "node_modules/artplayer/types/component.d.ts", + "node_modules/artplayer/types/config.d.ts", + "node_modules/artplayer/types/cssVar.d.ts", + "node_modules/artplayer/types/events.d.ts", + "node_modules/artplayer/types/i18n.d.ts", + "node_modules/artplayer/types/icons.d.ts", + "node_modules/artplayer/types/language.d.cts", + "node_modules/artplayer/types/language.d.mts", + "node_modules/artplayer/types/option.d.ts", + "node_modules/artplayer/types/player.d.ts", + "node_modules/artplayer/types/quality.d.ts", + "node_modules/artplayer/types/setting.d.ts", + "node_modules/artplayer/types/subtitle.d.ts", + "node_modules/artplayer/types/template.d.ts", + "node_modules/artplayer/types/utils.d.ts" + ] + } + ], + "browser": { + "stats": { + "startTime": "2026-09-10T17:27:57.881Z", + "duration": 7643.864, + "expected": 18, + "skipped": 0, + "unexpected": 0, + "flaky": 0 + }, + "cases": [ + { + "title": "published: expanded option input preserves historical JS forms", + "engine": "chromium", + "browser": "153.0.8010.12" + }, + { + "title": "published: configuration errors occur before mounting and preserve allocation timing", + "engine": "chromium", + "browser": "153.0.8010.12" + }, + { + "title": "published: container identity, partial defaults, custom fields and normal callbacks", + "engine": "chromium", + "browser": "153.0.8010.12" + }, + { + "title": "candidate: expanded option input preserves historical JS forms", + "engine": "chromium", + "browser": "153.0.8010.12" + }, + { + "title": "candidate: configuration errors occur before mounting and preserve allocation timing", + "engine": "chromium", + "browser": "153.0.8010.12" + }, + { + "title": "candidate: container identity, partial defaults, custom fields and normal callbacks", + "engine": "chromium", + "browser": "153.0.8010.12" + }, + { + "title": "published: expanded option input preserves historical JS forms", + "engine": "firefox", + "browser": "155.0" + }, + { + "title": "published: configuration errors occur before mounting and preserve allocation timing", + "engine": "firefox", + "browser": "155.0" + }, + { + "title": "published: container identity, partial defaults, custom fields and normal callbacks", + "engine": "firefox", + "browser": "155.0" + }, + { + "title": "candidate: expanded option input preserves historical JS forms", + "engine": "firefox", + "browser": "155.0" + }, + { + "title": "candidate: configuration errors occur before mounting and preserve allocation timing", + "engine": "firefox", + "browser": "155.0" + }, + { + "title": "candidate: container identity, partial defaults, custom fields and normal callbacks", + "engine": "firefox", + "browser": "155.0" + }, + { + "title": "published: expanded option input preserves historical JS forms", + "engine": "webkit", + "browser": "26.6" + }, + { + "title": "published: configuration errors occur before mounting and preserve allocation timing", + "engine": "webkit", + "browser": "26.6" + }, + { + "title": "published: container identity, partial defaults, custom fields and normal callbacks", + "engine": "webkit", + "browser": "26.6" + }, + { + "title": "candidate: expanded option input preserves historical JS forms", + "engine": "webkit", + "browser": "26.6" + }, + { + "title": "candidate: configuration errors occur before mounting and preserve allocation timing", + "engine": "webkit", + "browser": "26.6" + }, + { + "title": "candidate: container identity, partial defaults, custom fields and normal callbacks", + "engine": "webkit", + "browser": "26.6" + } + ] + }, + "historicalTypeDiagnostic": { + "version": "4.3.5", + "package": "artplayer@5.4.0", + "file": "types/artplayer.d.ts", + "line": 155, + "code": 2380, + "scope": "frozen published notice getter/setter only; candidate requires zero diagnostics" + }, + "remaining": [ + "plugins/toggle/timer return compatibility", + "setting returns and cue event shapes", + "static Emitter type", + "final complete task audit and commit" + ] +} diff --git a/refactor/baselines/declarations-validation.json b/refactor/baselines/declarations-validation.json new file mode 100644 index 000000000..3fc23c646 --- /dev/null +++ b/refactor/baselines/declarations-validation.json @@ -0,0 +1,1603 @@ +{ + "task": "CORE-07", + "date": "2026-09-11", + "status": "reconciliation-validated-with-open-return-conflicts", + "node": "v24.21.0", + "parentCommit": "ee859e48044118853817ac51f8996922c94188d2", + "source": { + "packages/artplayer/src/config/index.js": "d6d2bd612daaf6c5c6e982158acbdf724b16d3c35bb5f1a5c923284665a8de79", + "packages/artplayer/src/contextmenu/aspectRatio.js": "bac04419497c2949d0bed8417930e2b6d2c2fc40d31a853a736f4fa81409fb34", + "packages/artplayer/src/contextmenu/close.js": "3aaaf06927882b76e88460aa79ae5b6e075d5fab5c40e4995c0a82dc5dbbdcd0", + "packages/artplayer/src/contextmenu/flip.js": "93221aacd5bfa9fa4b0ba7641cd4c2496f1e54eb12a004eff6e1e16c35519847", + "packages/artplayer/src/contextmenu/index.js": "d9691244110920060c2418c2c50d74efdd486e96a4fa316f84b848d35076793f", + "packages/artplayer/src/contextmenu/info.js": "7d2d23a63aa7fa319896f3ea8adb4739604d60696d3e8f0519a36ba241d30e85", + "packages/artplayer/src/contextmenu/playbackRate.js": "c2b15147d2f0f62f1a490f84ca2f8ecd23fcc37113806c364ab7ce128765fcfe", + "packages/artplayer/src/contextmenu/version.js": "b35e652e3b55628ec3ad2cd3a874009a03e277835e91ff5f291f286003d1726c", + "packages/artplayer/src/control/airplay.js": "1f4d6d793b73ff4b814161ded1f59a8aff5a13bf04c7fffc328ea29b69536e4c", + "packages/artplayer/src/control/fullscreen.js": "31a4cf1079e6c9e44d76252b791d8a51bd99c9cb64e39e897c61e820abe69728", + "packages/artplayer/src/control/fullscreenWeb.js": "8c69c403ed80d911dc7389c05894ed41827c4aac9cf53e12a41a43a9cb9148ce", + "packages/artplayer/src/control/index.js": "4114a06ddce38fdc2738868d9a9dd0fe2141d1ca905fdf4663f350d44504c9cb", + "packages/artplayer/src/control/pip.js": "bd8a1187214f6fce5599db9d4ca93141cde82d51f0db372e54e0c7ba199a1031", + "packages/artplayer/src/control/playAndPause.js": "0020d1bfac5609fdd5a8d3900646622dbf48d74ff3d60fc34c180b10ef117e3b", + "packages/artplayer/src/control/progress.js": "2064d0766b7f40a4ce812f92333a3dd728ba71b5b920e3fa3cbc67dd2bc38e2e", + "packages/artplayer/src/control/screenshot.js": "07044ef4d0c8c172447391cd2b5e5c4fcb98ee813a71d3270e0f2cfbaa3db900", + "packages/artplayer/src/control/setting.js": "2e5c4a6d3f463d7dd7a81698929acaf45d1f3966f86b9a226011da9f46e3ded7", + "packages/artplayer/src/control/time.js": "c39fb755a848ad77b1681adb3bad35fdc6ec9458ee57efa99ad31bd4d963d9b7", + "packages/artplayer/src/control/volume.js": "3572668f5c56b9b5f76b4e002a545e7e6dab199eb47686c8385a7751426ad118", + "packages/artplayer/src/events/clickInit.js": "bc680c921a958c25705962577513677d5d97de94e4eff6a04ba20d2f60e6a1be", + "packages/artplayer/src/events/gestureInit.js": "a5dcdb4216c8e3544fc85a1b4d3ebd929ec6f7d51ab17f2cee713030ae7ad464", + "packages/artplayer/src/events/globalInit.js": "5d8c3147f17755b0d35504cfc69cf8cbff510b66b2a52686d8f2a235a6c5b9df", + "packages/artplayer/src/events/hoverInit.js": "7ed5666e01972dc0955d1c1b4006001c99dd55ed133ca026f685b71d6b4d01c6", + "packages/artplayer/src/events/index.js": "94ddb9ad5ceb21901fbbc974d983fec60c488314474c89138e4ab2b40e205d5a", + "packages/artplayer/src/events/moveInit.js": "782d627260c9fdf46c0766876138f05836860bc9c2fa2c519d22b43f3d24de15", + "packages/artplayer/src/events/resizeInit.js": "26fc9628490e6c45ef741e7bc7c1353097b21da1dc83aae65dc80783226e36bc", + "packages/artplayer/src/events/updateInit.js": "1b4ef85c819ae68eb0de1791241b2c3d4e22bb108746518fa67f7c322591e55a", + "packages/artplayer/src/events/viewInit.js": "2b4ce508812b8f03cf5801a5e3a7eaa4a5a8b05d6be500d217aeb6231fb93a51", + "packages/artplayer/src/hotkey.js": "689fb87b2ed8a424cbc2880c8f70610b3695dc5b0346c9a5833699996682c0d6", + "packages/artplayer/src/i18n/ar.js": "61294854675d72444a370f06a16c8d84bcdc782e88010b3c5a59326a98d3af56", + "packages/artplayer/src/i18n/cs.js": "f44e651be5d24dfce25122ebae03c76bedb83b145aadec134f0438e85c08e17c", + "packages/artplayer/src/i18n/es.js": "93785fd99ecbc906abd396d525f6ae715cddcce4a7b9d556838b98e927abc693", + "packages/artplayer/src/i18n/fa.js": "0a6b8f61ff7d5ec1e2839caa5f790c8681462a553c64d38ca7ec1988309e02f1", + "packages/artplayer/src/i18n/fr.js": "90421a72e6f8e82503a067d6c28cbc8ab91331de1342d367c3bd86e0fb62f621", + "packages/artplayer/src/i18n/id.js": "1a48adf6c940ef24870faa9cf1025fb6de45a63dc13ad54fe1d18222be0f481c", + "packages/artplayer/src/i18n/index.js": "35a07de6ed556f88637b129a9affe4f1ae1168cac7dce1171c197e023e714bfd", + "packages/artplayer/src/i18n/pl.js": "7f2c358f4aca1acbfc5e9edacc6619512fffcd81081c49830b276ed7f7e5e22c", + "packages/artplayer/src/i18n/ru.js": "26ca6dd2468847d656d283cc817dd8b78fe332f39a7eee9e630c72078ccc3459", + "packages/artplayer/src/i18n/tr.js": "c85a257270df2ce213d722a33bf342098b140defa321c0f197356fea419f6624", + "packages/artplayer/src/i18n/vi.js": "0c957375d7b0f4804d7bcc46b766a0e2c2a2d8d72616f9d20da69bd83b93533d", + "packages/artplayer/src/i18n/zh-cn.js": "cd58122e0e38846741775bf10bb71e2529a45f1157f8eb1083116ae3d4e1c897", + "packages/artplayer/src/i18n/zh-tw.js": "cbf6d2d14d5242f32c32e13e346c741fc074c10c164e78a2dd5f65cfff68c9aa", + "packages/artplayer/src/icons/airplay.svg": "8c75a40f1bfacee2be2a425e132ff51f3712eba60679010f7b1349d4a04374bc", + "packages/artplayer/src/icons/arrow-left.svg": "8b9d544b7bd728d01747005fc7a2d63f822eed3b605393e2435b6733861b585f", + "packages/artplayer/src/icons/arrow-right.svg": "68c63d6d5810173ec9192c9e96ee7b6aefdc3b79d3c1329fb4d6c750f859fe10", + "packages/artplayer/src/icons/aspect-ratio.svg": "987752a87701523057d8dfa7c45a6a139c4542b96fdcfaf8665722bbeb41f3b2", + "packages/artplayer/src/icons/check.svg": "963ce0aee2337fdee951aa6c917cc75ee0b4e75158887ccc16baebfd3925942b", + "packages/artplayer/src/icons/close.svg": "ebabfe8044f48d5df4d13f4f906a163fd55a4d6f1dedb3b5ba95601209bc8888", + "packages/artplayer/src/icons/config.svg": "e1884d5411296b5cd1bfec7803b558b0afa5ab64478393977b07a662e2e0f15c", + "packages/artplayer/src/icons/error.svg": "b40c01e511a599c9dd369aeb9a3b2a0d1a76ef3c5ede8124cbbc23f8e4e7248c", + "packages/artplayer/src/icons/fast-forward.svg": "abef6fe4d75ffa74d3a84683373b4702a4eda2a5b4045952f969ee62cc68b0be", + "packages/artplayer/src/icons/flip.svg": "474a9d53a97add71e3fb7bc6530a68580ce63a1d83f9b75d1c2908a7cf494152", + "packages/artplayer/src/icons/fullscreen-off.svg": "71125ac56586897e2c0e52035a4d65cff34cf52043a95b45d186e0d268671399", + "packages/artplayer/src/icons/fullscreen-on.svg": "d46cdf265cac729c9b7382722ebe7a4c76d71ad4e5a27c2d5ed8323fd595ebf5", + "packages/artplayer/src/icons/fullscreen-web-off.svg": "52a6862ecd7cba12ab7042de5064c498bc2e9f86b430358c912401fafe4f4a98", + "packages/artplayer/src/icons/fullscreen-web-on.svg": "5cfaae62b61456251e771bff01356fad8376ebedb10a4b8819740f60e6e5a073", + "packages/artplayer/src/icons/index.js": "2f258d42bf8dceb7a1b60fd8b3d20e9c338d06db8ce6bc5a7f80e84e935c275d", + "packages/artplayer/src/icons/loading.svg": "485472153890eff3ed49963f7bf7d841f66ca2f40894c01d6e8bcf1bf4ad1c58", + "packages/artplayer/src/icons/lock.svg": "431e9a25fae051016be0efa286387ec3e5f7651c3ecf569bf0ece9842f57156c", + "packages/artplayer/src/icons/pause.svg": "57405dba81dd3d9f329d957fdc704101cbb6f6654325eb0083c03324c4453a68", + "packages/artplayer/src/icons/pip.svg": "1e922140e0941e5b9ef53dc0b4776813e1c470ea229fe3ec786fd148148c3352", + "packages/artplayer/src/icons/play.svg": "41a961c629a55cb25a813e115a25204e492d4e935a0879177e65d6e1ddfd6796", + "packages/artplayer/src/icons/playback-rate.svg": "872deecac0365ab04aeb5ccb1cdd9a0c88589a1442709fdac7c0ed12a241ff2b", + "packages/artplayer/src/icons/screenshot.svg": "538b5cd0c6b20afb98bd850e15019072d652d191075c2869f2fc0f28b597b131", + "packages/artplayer/src/icons/setting.svg": "2976b00d1f03e78f28d0e55ebcb01d5a0746ec1a6ff8de97a5e8294bacdd1fad", + "packages/artplayer/src/icons/state.svg": "620a127f74bb5e249993bd7008c027373263eacb4a44af8adeaa0d7523346887", + "packages/artplayer/src/icons/switch-off.svg": "95a8d81a4a3bfcf7c016d5f71d46a72be73c5e94790c55fd1d31023416ef5deb", + "packages/artplayer/src/icons/switch-on.svg": "cccd0f9c1e54d9ac50c323360da944d8ff44633a82ff17889914b6bc8b1652ae", + "packages/artplayer/src/icons/unlock.svg": "fc058db3d99a475fb9ffbbbb6248978a95990a9c532b83d0955ac28eaa626c60", + "packages/artplayer/src/icons/volume-close.svg": "f7e100fd9e9f3f6e06afe5bc994d5d9305ee4d1ee23fae37e4108cf286dab379", + "packages/artplayer/src/icons/volume.svg": "3a78f40d8b48595e8f15d9189e4d767e0c7abbf0338d3f2db1ac810049dd3942", + "packages/artplayer/src/index.js": "1d7df75d280a43e25b4e2277445a2e6b6de3c5e95eb22eabd17c4a3b9af66c17", + "packages/artplayer/src/info.js": "6dcdb4457d63ddb74fb6268df64522722420d6c0eb7b1654d6fb7703466d3b8c", + "packages/artplayer/src/layer.js": "e96173ca177e0446738205dd753e267aa433d595f719d9a5bcd747dea3d32f66", + "packages/artplayer/src/libs/screenfull.js": "2332b50c0c6364d5c99080be0f5739255e4b9e465d2cca40f761adce9a1908f8", + "packages/artplayer/src/lifecycle/instance.ts": "9eed31a766953dbb5d83a44a290b7686ad8b2a40e7dcf7f0ee674b4f1102f80a", + "packages/artplayer/src/lifecycle/resources.ts": "399ea5e84545c973f8967e8ffd7326dad7b3168ca6f96f77286995a5b62ee389", + "packages/artplayer/src/lifecycle/scope.ts": "e2188e8544b27cf8c7ac149e7146af628a2d6166c82b719a247adef5d85be5db", + "packages/artplayer/src/lifecycle/template-rollback.ts": "7a83da6739bcec1587b02f8157934988910d7f9103fe489a0d6f4f65290c3d77", + "packages/artplayer/src/loading.js": "4b08a8f9fa69f71d054cdf1508bbb9e92c075c8df1eda0fa8a79efbf08eb8c40", + "packages/artplayer/src/mask.js": "094162e28ec76c81f73bb7bfe276bf5832080ffb7aa9d9dc9dc013479659c2e5", + "packages/artplayer/src/media/hosts.ts": "7129cb93290a250e932464b71a4e4abce8a98e83935d4fd6c36a59fc6357b6af", + "packages/artplayer/src/media/types.ts": "96d4a7f066cbb6fb9138165dd736b4ca500cb19c827bd7702134d61c44cc0e87", + "packages/artplayer/src/notice.js": "72e97833e0499993d8d133111e32f32f031b911426117397be2003e824023664", + "packages/artplayer/src/option/defaults.ts": "f357ef80cf32085fcbc3409d92dfa27b31c13fbcf823f576052c0347911c0cca", + "packages/artplayer/src/option/resolve.ts": "53a73627cd540e3f21349c0a43beda35ea5195647a31e3f5b30ac292390b4b1b", + "packages/artplayer/src/option/types.ts": "f2ce01c01acf45fac6cbb34685b8e6c321bcad6b0da2526f3f189eb5962ea0e5", + "packages/artplayer/src/player/airplayMix.js": "b9ce49489e75045b6a1df4d8ed28f123c1b105ac4c04fefaabcffe4353ad004d", + "packages/artplayer/src/player/aspectRatioMix.js": "c0a4cbd84bd0d70f078d87fc2ed082ee81fd33eed12b6265fa2d6f043b8f0f97", + "packages/artplayer/src/player/attrMix.js": "c873d587ff71e024cfda5b5464d0c70a09a6a319da3f18fbaa7451a16c9ae055", + "packages/artplayer/src/player/autoHeightMix.js": "e7400a46eeb01416d5ac7c6b787295cd9b9f90b38ce640a737ef5a34a8affd6d", + "packages/artplayer/src/player/autoSizeMix.js": "341e8c6a6a1b451c43f758a7774d1cd6cdf9e1f9e818692e03eb58c2fbda4525", + "packages/artplayer/src/player/cssVarMix.js": "93e641dd760e8f844a643a0b7d8af92b73a7f205e55087d9501934d218701bd2", + "packages/artplayer/src/player/currentTimeMix.js": "4733317778fefe6155f9d5ef46652b4267178d0c08003467eeaff6bc9955b41d", + "packages/artplayer/src/player/durationMix.ts": "60a9d665cf302dcb6b3e37e2f057e31720935e5e588fd7709231f691f6014191", + "packages/artplayer/src/player/eventInit.js": "faee770b0cbe5a6f9dd3259518ba91f00c2df290348ed3829c809f3875aa6338", + "packages/artplayer/src/player/flipMix.js": "f5abb8d079d0a9c4f9eaa31c4940723bf407ba422ac713dc73443dfa6cb6ac4f", + "packages/artplayer/src/player/fullscreenMix.js": "fe28104d9b3ab5f197204b69950b14c274d17b7a918dc9c45f749884f2e41cb8", + "packages/artplayer/src/player/fullscreenWebMix.js": "85f8800b4ed9027cdfdf79387b2dc95ed130fb03de267b85ac37badc15967661", + "packages/artplayer/src/player/index.js": "c3eaeab0aa5015a51dfeeb4de6f25b02b8cd66e1f8471940367d628b5fd0bdec", + "packages/artplayer/src/player/loadedMix.js": "08dda96239d054848a34063479da94af98834ef334276d7d22fe49be1e94f62b", + "packages/artplayer/src/player/miniMix.js": "7355a66a23de47be91ab08dd28e8d54116aa2a603bd47b687014e4ab4736094e", + "packages/artplayer/src/player/optionInit.js": "9d1d9d276da2403a580498c62f947373e000d9cd6e4bef5831d272c3055b5592", + "packages/artplayer/src/player/pauseMix.ts": "5bbb68eab7dcf2170c944cabb8d4b82be4e6d7623e37ad6ea464b81c1028bc0b", + "packages/artplayer/src/player/pipMix.js": "15322751e235a70e6f9dc4d5e2b6b0ee6a8b93080370c6a90cd96268e101a8ab", + "packages/artplayer/src/player/playbackRateMix.js": "531f25b5a9d86a5d0a884dac1b812a9ebfb588d3be785a0459e52f181c1de2a0", + "packages/artplayer/src/player/playedMix.js": "a5e664643666c3692c4e473d0d6c1c8ed72d6126346b9630cc3e0cce1b9344c8", + "packages/artplayer/src/player/playingMix.ts": "968c9f6e6d23c233c77d62a593db64adcc6d1a2411f5f1c61a35c6996d6a54d9", + "packages/artplayer/src/player/playMix.ts": "a88d2a0a15caab25d093e9f4b6a0669fde73f16a004e610827d09a7019c4af41", + "packages/artplayer/src/player/posterMix.js": "a96b0a9f5817919e373a5a55b43fe7ea94af357051c01ddd6ce9c68bc932ecba", + "packages/artplayer/src/player/qualityMix.js": "53d28d000bd0417e757e585d5c3460c5198d6d5067e7ea3d797244abd45b2832", + "packages/artplayer/src/player/rectMix.ts": "a741ee09fa3271df84363c5d73eac1b2e5adb39491f95f8112af81f1219ffed4", + "packages/artplayer/src/player/screenshotMix.js": "c64871270b224233ea67ff31c3fbc0c2e2eb35635da5e4d5a263b930fb96e6e7", + "packages/artplayer/src/player/seekMix.js": "6d3779a19220358523c846275971f43157e11e1dd172049ac9de6c7b4fdeea8a", + "packages/artplayer/src/player/stateMix.js": "06968c1697487670e02af73045caaa676a01088e76d047cc87802d3df80f7251", + "packages/artplayer/src/player/subtitleOffsetMix.js": "c0ebf552e025dc5ede6ff3e5c2a82ff3382610268130941e5f56746568ac5baf", + "packages/artplayer/src/player/switchMix.js": "67560d22033945a0888860b2d50a5258342ca7901a837ed543996df7012761cd", + "packages/artplayer/src/player/themeMix.js": "382acfaf113fbd1ee77c63dba72953d984ea715f2d99748a12b9eae70c081d49", + "packages/artplayer/src/player/thumbnailsMix.js": "43bdbd9b62a803f4966103c6718305a9ef665d25df26f735d3e34558ddf339bf", + "packages/artplayer/src/player/toggleMix.js": "d29c407906c8407975756bf26090e0550f8cc38f0c6389836163161cf99a299c", + "packages/artplayer/src/player/typeMix.js": "70920c8f785dca6d4bd66d82b996c37f1b69265190d7747ae8de298afae3604e", + "packages/artplayer/src/player/urlMix.js": "2666333c9d7051d8c33250f6376662efd2abf0dced70618dc30f820d35879969", + "packages/artplayer/src/player/volumeMix.js": "38b9dd4a11cff3287769cace6fc161579eefb75af74c410b470083db6aba3251", + "packages/artplayer/src/plugins/autoOrientation.js": "6ceb81bb3a778323f88ecaa78ef5646b642dad3f7d3176031c4ce53815a8d153", + "packages/artplayer/src/plugins/autoPlayback.js": "26f4a21691a2b2f767304b7d2fe40a35c599575651b9ace0c55a709a2be279b8", + "packages/artplayer/src/plugins/fastForward.js": "d1f396efb22a279f9450fd02f85dc2245d274dbf0d36c99e87a5e5f895cc0029", + "packages/artplayer/src/plugins/index.js": "ed125ff960624655bbd55115b06289a3e5137cbad3dee2af60b2c056eefa416c", + "packages/artplayer/src/plugins/lock.js": "843caf8c7981463e8dadf1510cd028e7e70049f5a10038bd66dfccbc63bb7886", + "packages/artplayer/src/plugins/miniProgressBar.js": "3bf48d30c209105a0144c17062d6ea4e2bdd351b1bc928df73ea1680b78462e2", + "packages/artplayer/src/scheme/index.ts": "dc4a3b5e08478cf72b46b0b59c023359ad5f79b891ea8a6a119ce24a5251821a", + "packages/artplayer/src/setting/aspectRatio.js": "c07e382eb4a2dd29d6bbf5c697274809777bd72091239e108ddc3ca15b60fa64", + "packages/artplayer/src/setting/flip.js": "d9972868640ec6ad1e6600aa97ed8cf75702552ecaafed49f16002939fd8f832", + "packages/artplayer/src/setting/index.js": "9c16ee2161e100e0223d2878ffc40dd6b410afa35acd5b1908d18242049f9675", + "packages/artplayer/src/setting/playbackRate.js": "063e196324bd6f0e0cd841292b70f469593949073b60c9999b250addf1208e81", + "packages/artplayer/src/setting/subtitleOffset.js": "d1a18118c34e6121dd030e464bfe9047330ea7a60a83045aa762272d0b4b455f", + "packages/artplayer/src/storage.js": "92067265b7f1104c4680e27e35726cf033811c6551e7c38d66028f2dd5300491", + "packages/artplayer/src/style/artplayer.less": "4e8513138d5d10c05b66986977d24ed17f1de3c0df3816dec6d90db7a97b5da3", + "packages/artplayer/src/style/aspectRatio.less": "091931a0cdc83e65a669332811ef3276b85bca9e55f7fff42aa46893d728c1ef", + "packages/artplayer/src/style/backdrop.less": "6c2cd0fa200d1f3525df98c3c56dbdc553445724aece3feb0386949245813343", + "packages/artplayer/src/style/bottom.less": "6fb307d8449fd04b804d5e72ea0f175f8aa9c9dd2bf1efbf756f800b39ac97ab", + "packages/artplayer/src/style/contextmenu.less": "70f6c7e26dc96652b659c7bf6fdad92737ed477dea69d253c57dc7266c76586d", + "packages/artplayer/src/style/controls.less": "4ff79f7bdb166f4e65455726c1879d003deb504cc175ea0d371ca6753ef0f155", + "packages/artplayer/src/style/danmuku.less": "e4215ee9fa2f1d0599e7311a2415cc975138265b7c6af0448d27d21b6c9e3511", + "packages/artplayer/src/style/flip.less": "5d3c7a81df9be455c2f683ebf48f39597d218dc2144addacb72ee1736bac3b7f", + "packages/artplayer/src/style/fullscreen.less": "dd350d3a0fc556d59b622a53c786b8c2a583e8fb28176e4b9e91baff90479496", + "packages/artplayer/src/style/fullscreenWeb.less": "d74e785c2fbbb2976e131620e751326f622f2916eceff9f2333059ca3296cdc9", + "packages/artplayer/src/style/hideCursor.less": "09a4607c8b0005dc199828172aa8dda395f861e407769b9696d793476c4a7823", + "packages/artplayer/src/style/hint.less": "ae9f3115dfdb1e2d7b8249497c080e6a25f9667f915f6e89820338d67bbc2d85", + "packages/artplayer/src/style/icon.less": "52d8f75c1d193e6160f57ca6997c3f9135adad8eb2338ed60c1eb8e5fe443be5", + "packages/artplayer/src/style/index.less": "ec67999b458d5545a4f17eeda922872823d655da012fa69113902629ad847548", + "packages/artplayer/src/style/info.less": "fa56d1b8c8936218e581b2426026e4ba85cd5fea20d045c4f69aca96be4059be", + "packages/artplayer/src/style/layers.less": "9653c581190bb22d60a706109819cd010908898740701c9526957b5682991c5f", + "packages/artplayer/src/style/loading.less": "185b0f05274196ba71fdb1d088b55af568f3342a495490c99c3f0e058a40659e", + "packages/artplayer/src/style/mask.less": "d1239a171b71ea6184cb4aee6660d74d6ffc0c48f7c47c3cf5fbe52d2e93ac92", + "packages/artplayer/src/style/mini.less": "a352e7a63f9529f18e6e389202fc277c500bc70acb38c7aa6eea9d7dba831c0f", + "packages/artplayer/src/style/mixins.less": "c6be95aa682f266749fe37cb89796fbec6488abc537174f817da79bdac6e00b5", + "packages/artplayer/src/style/mobile.less": "ff3f64fca5d2dd7ddd50385d88d9b2fa1a645909488ab7a0978ba4f1670b7c0e", + "packages/artplayer/src/style/notice.less": "72a935c0effc557a9d7ab3baccb2c3b77fc3a1783450b4e3178a40a5325fe369", + "packages/artplayer/src/style/plugins.less": "a59d0fedb13eb79ea5c0251273e6d603363922e389faf43d051cb03c590a6788", + "packages/artplayer/src/style/poster.less": "36b38fe138f8c9537ff4e93f7ec4f2dbdba1ec41d243d741ddf1da7c6581e546", + "packages/artplayer/src/style/progress.less": "59b9d95d49dbcb1be40752d7086239b6de5925b0574da231199d999e22ff4990", + "packages/artplayer/src/style/selector.less": "295012ba379a7e957a24476616a0c3623d6a06e82ebbdaa45b916dd6412d7f4f", + "packages/artplayer/src/style/setting.less": "409dbdc3dae8b7b9e16c2e41f53b2801514545fc07af0bef752221cbd8b4e35e", + "packages/artplayer/src/style/subtitle.less": "43b72a07292a01cef45adffbd94ee9d9419e2997e0295d38e230fea2c1c0e0ca", + "packages/artplayer/src/style/variables.less": "703739b2bdfc77bfde063d8788ef6b6a55b8730764baae8e7d755b7c54d8ecc7", + "packages/artplayer/src/style/video.less": "b89c6f6e27592d49825c68c9ab98d46e81cb1e5add855863f89d19637f98e35f", + "packages/artplayer/src/style/volume.less": "a3954794a9478d3872202b90d349c873cbb51639dcd7d1e3d73a55ce635fcd99", + "packages/artplayer/src/subtitle.js": "7f926d99cc581f38804a9400bfe7159d0c4ef4c15c887811f9443bbb5ae7dd20", + "packages/artplayer/src/template.js": "ef60334f381f419cffb4628ee460ae0d0159de1ed0a3296a43863ff49b44d263", + "packages/artplayer/src/utils/compatibility.js": "51290838ef62be8e4251f4db8ecdd45a626cecd8c732e4e53a1c55df8d454a13", + "packages/artplayer/src/utils/component.js": "b9b190d31e9275d357396f6617a3dae87530227a6c8ef22b5ffe7c541246b546", + "packages/artplayer/src/utils/dom.js": "d72f934f55db3cd91db93eb388fc958a653c959a5ef776fb146c114bf523b21e", + "packages/artplayer/src/utils/emitter.ts": "26a93d3ff35b53e71a5f3bb22c252a854559d8151ede50a66a28d9eefae6c008", + "packages/artplayer/src/utils/error.ts": "ba303c7d4e4228919088f9d608fa364596f5853ee646eda2008deee354866f38", + "packages/artplayer/src/utils/file.ts": "ea71d7fc0e818d473bf5a596211ba9d571e4febdf1878014eadefa8d0a98d4cc", + "packages/artplayer/src/utils/format.ts": "891df5b7542b713aef46bf2b93924f42e68eee574afd802db3e6c62ff2655ede", + "packages/artplayer/src/utils/index.ts": "5211af833dddb2937d25dcc772740d62f9d5c5039ce5505bffff0796d4afd756", + "packages/artplayer/src/utils/property.ts": "c737d4582a4382f4038d12dafdf8b43418e508c9b8b859b2f0cc17c20f370343", + "packages/artplayer/src/utils/subtitle.ts": "f058851d11a418e321a8a498472b67fa535fec2c7b5d3df739b6b4f263d00337", + "packages/artplayer/src/utils/time.ts": "b8ce3d50865f6c343e8e3ce9f5c87de565a87b4e9fbcbccbe7030e30e80b93fe" + }, + "tests": { + "test/types/declaration-inputs.ts": "24279eec4ed375febc6f791cf40913d290ec8b62f2a67a62288476b14b0bedfe", + "test/types/declaration-legacy.ts": "0d3ee4556c16967ef6d16c9777caeed012872623e88a0ed53b0d48ac9e8e2af4", + "test/types/emitter-source.ts": "d6111dc541deabbe952446a6bbd99bfe2ec3dc23c097d042cb08ddc7d5a0cfb8", + "test/browser/declarations.spec.js": "7340de5f8e34f71cf8d7dbf5f428c3e1c20677a44cc5f561199c9e55d21dc44a", + "test/browser/options.spec.js": "17733db5056f04f829ecaa925b021d339d0f6f6960cfb8bd277c68cf8c4e119a", + "test/browser/media/declaration-cues.vtt": "5d149d4e641ce41cbb83376835c03daf1fb89f3b9f568fa59e064d51e2b57704", + "refactor/scripts/types.test.mjs": "bfe84d620f78be949e95a24dff75ad04a5fede4e1696e47b28b2b27e02b1dbfc" + }, + "ci": { + "command": "yarn ci:check", + "passed": 112, + "unit": 83, + "engineering": 4, + "baseline": 25, + "strictSourceFiles": 28, + "logSha256": "074bad7a0c7a3609801b5641a9bf921e7e4811e88780fc73f2706feb337264bf" + }, + "packages": [ + { + "name": "artplayer", + "version": "5.4.1", + "archive": "artplayer.tgz", + "sha256": "f9bb786d6380baa5282dfb854a101911b8ffa7828099506db03f618a16b29732", + "files": { + "package/ARCHITECTURE.md": "e6dbb28bbd68c341ec4c20af0a7c890fed45f9381895e2d137964bb36491bc73", + "package/README.md": "1e185e65f67fc2081b4182bbc6c4558ea05b6e3fa3acc5dd0c3ac7df1d542b09", + "package/dist/artplayer.js": "ce632f30f93eb81b856191082fccdfb2cab81aa39277eee4b89b6dfebb0ccd49", + "package/dist/artplayer.legacy.js": "9b5d7c77785f556c667a77ecbae70fdc562c8362dd0476c55310859b4f0b1dc7", + "package/dist/artplayer.mjs": "1fec67e1029191869da1e4895c0d6fecfe72811f0fb26e3159a9403a6f8d107c", + "package/dist/i18n/ar.js": "61c43469ee95a00dc624583f418653e3dcbf48b24ae6a4c203ad986234852365", + "package/dist/i18n/ar.mjs": "68922fdc9f80d3321ea0654c8ff8f5875b6715103d2b14ffcf17f93738b39cf9", + "package/dist/i18n/cs.js": "ad7bbf8853204a6955ef84bfbd932cab3f141a7e73a8145f28ba7a5b2b83b7c0", + "package/dist/i18n/cs.mjs": "29a489be767fda9d46b59c9adbaad323f17a5e67daf7f7aa78b7ce8fb5b4d63c", + "package/dist/i18n/es.js": "aaa95cc9645b734c58fba06fdbcdda962c4cb3a0e7eb6206f06d6168208cd86b", + "package/dist/i18n/es.mjs": "331d2ef74da2eec8f3304fec0b5340c795d9c1eec24e08167c9a7b66bf30973b", + "package/dist/i18n/fa.js": "c998467261cbdfd2c3fb16c0ae4b2c48c409f42f41aea35ed94766f1e12819d5", + "package/dist/i18n/fa.mjs": "b4c98894b46975cebf5ea9088bcf0b5bdfd408bc3c82f4e2e9128133c7de2d4d", + "package/dist/i18n/fr.js": "6b06e16b1fb01c8695fb5c10b32a00421399180de5dc5d845ce17010f2fd3e66", + "package/dist/i18n/fr.mjs": "abe8e3548fa7304f302e2c74818a6176edee8c3b65e33cb6f62e96d130749ee5", + "package/dist/i18n/id.js": "a5832c4bfc03c7f16418bf4b324d9773895541dc823ece9114741794737aad74", + "package/dist/i18n/id.mjs": "a40a433be6ca1ac1ee1810fe805ee60784d349e59b9ad82ea80201d660db4e68", + "package/dist/i18n/pl.js": "2491487062bdfc91d60f17c6e9a83ee196c991216d15f525fe3536b98873da2c", + "package/dist/i18n/pl.mjs": "ad8ea2c03785edbfe1f35761bec21b8a04213f9fa88a794d850bb3973564930f", + "package/dist/i18n/ru.js": "2d3a9ee6533cb6fa961f0a24a25ce63cc76992fca17e1769b6fa75104f8a1529", + "package/dist/i18n/ru.mjs": "a89b8c36cfd7c181c2b31aa823deda3d7c37b56b2b81746338c52ea1c1d93352", + "package/dist/i18n/tr.js": "438b06a4c3f479a2901b0085eaa7bdba8eaef87bdb07ff3faa559c85403fe433", + "package/dist/i18n/tr.mjs": "cc96f9cbb9c1587d5cd8f25b0b9800678ad76e93de089ae42c38dee16e6fe8fa", + "package/dist/i18n/vi.js": "1ffbd62843a902ea2967eab46432d3fc548f5633e53eed104314b523cacc46a8", + "package/dist/i18n/vi.mjs": "7872ded84622bcda20e8c1d70c597c2ba071b50701900efa47cc4683ee17f1a2", + "package/dist/i18n/zh-tw.js": "2d43577f98456488196921e1ec721695a95e1b8c827077286b02ce3fb987e8ff", + "package/dist/i18n/zh-tw.mjs": "7ec638b4babe59d3ab1d3e64abdd74a96fefb260a50e2cd7240f8d50a1340925", + "package/package.json": "b343df9955df9ac0ea71ea775bd0743c6b26c06d3bb7699128f7eac484fa769f", + "package/types/COMPATIBILITY.md": "926ac48955ff3d7e48ed92897a6725f518637daa07de7d56b51338914c3e33e2", + "package/types/README.md": "0be058471d2715e5d85b4e7e7d1dca06ca7330729bc174699fe6104acc801926", + "package/types/artplayer.d.cts": "56546896a862bfa5ccbe7c4094bd7d5601d80d03e1fee14c691895fe03f72103", + "package/types/artplayer.d.mts": "c77ebf669319eae5516176ebd0b42022cd15ebbc061c9d616ac9963897cfdca4", + "package/types/artplayer.d.ts": "9cb6b059d452953007b17bd38e96e591e18c01e1ec834cb181d6d280bd1d0674", + "package/types/component.d.ts": "aa1c43be67322781b4b355b143bc69d9f29d22e578e4974d6a13e957a7c0334f", + "package/types/config.d.ts": "c4fd8681bf32b10c743e3e561c532520c8f32e43fd765524850b15e55cb91c72", + "package/types/cssVar.d.ts": "e027d82fb4f01c9ce7559cf679b2d5ee1962d3f7e5b4dd64ca21f472b933efb6", + "package/types/emitter.d.ts": "9c62551cdcc6dd3966bed8a7a85dd477435db977c91a294d2ac8f162f9592537", + "package/types/events.d.ts": "53ace64a29cbef8e0c30e124d09c71e1dfa3ba6cdeecde8c7f928161b54084ef", + "package/types/i18n.d.ts": "3e14759caf71f97f01650839248c8737c42d2c2979dabc43ad92b724da648708", + "package/types/icons.d.ts": "0d8e8e52e52130dd4a29bab551dd7a2a954797e42e92a6e068c85d583e23e6a4", + "package/types/language.d.cts": "1c9e0c47fae3c2d68c3e144d95a55071318a03bb31554dd049109efd3d0f95a4", + "package/types/language.d.mts": "c391e863012c77769e661afbf8fa949e9373aa88d17f58cbba7f5696edb8077f", + "package/types/legacy/language.d.ts": "c452ffd764ff9b29b819b3475c42395d2ea7a33560d8c186ef5df3844b9524c3", + "package/types/option.d.ts": "2407f08755cfe854821a65fb8c74b7ea5078d5b8f9cd9bdd3e67904529840585", + "package/types/player.d.ts": "f1e50257df2ea592d0a0e1f36078dda77eaf2cf3b3d795307501396562d99f28", + "package/types/quality.d.ts": "7ed6ed78cea52991b2f6ddd2bd3b7bd8c5146fdfff7486fe8b814c3e632f1567", + "package/types/setting.d.ts": "d12a75b656fff70cbb30be4bffec46d9c4273636e8722bce971a4d2b188712a1", + "package/types/subtitle.d.ts": "d25b470e47d6a9bd696d9c1ad8adb58e56a208f05695186d513bc8c43c2e8acf", + "package/types/template.d.ts": "68aed9e97d006d6be4fabb8504ca84dafab770b0925f4d6e7319e67c82f21b0d", + "package/types/utils.d.ts": "494ec447ab467a07ddd7a2c2abf778b3fce69fd28a09aaa8ced9759f8de2e3f6" + } + }, + { + "name": "artplayer-plugin-chapter", + "version": "1.1.0", + "archive": "artplayer-plugin-chapter.tgz", + "sha256": "ad8576e5b5baf2b5ecec8684c4aec2cfe541e40d3cabfc98b48bf3895a9203ad", + "files": { + "package/ARCHITECTURE.md": "20743bad87a174b0450e0d876b6aa6b2a9f47df296d479511ce7cc9298fdb57c", + "package/README.md": "b95400ff3d525621a15268bb56a2d353aacaaadefde7e735d7abd91a34edd96f", + "package/dist/artplayer-plugin-chapter.js": "6ac3dfe28f46084ac7caedd571b1a97dcee3cf9d708112f1b8bbd6566e1dc5c5", + "package/dist/artplayer-plugin-chapter.legacy.js": "6d9bff885412169e701670961aa00c2e46c4b42c9b9647ff4e6d198777d2a359", + "package/dist/artplayer-plugin-chapter.mjs": "26415cecab2c0198c566cef0232e20123413782d5bad7534a32939b3298617af", + "package/package.json": "24eec6907b3218439189adab6af3f932c1497c47c2d41209311c01042b07fd4f", + "package/types/artplayer-plugin-chapter.d.cts": "4f07514b37453cd6cea8e5aa28fa018ff31738e0d423c11a3b5eccd50ed30bcc", + "package/types/artplayer-plugin-chapter.d.mts": "610179754db36276e161a07bccf4eaba8b4480f053e716a2bcc5a1574871a171", + "package/types/artplayer-plugin-chapter.d.ts": "581aa2862e709601c87a23585f54a969ebd350be56a7469a31ff53f1311b578d" + } + } + ], + "runtime": [ + "DIST.cjs", + "DIST.cjs-legacy", + "DIST.esm", + "DIST.esm-default-only", + "DIST.esm-legacy", + "DIST.global-core", + "DIST.amd-core", + "DIST.global-core-legacy", + "DIST.amd-core-legacy", + "DIST.global-chapter", + "DIST.amd-chapter", + "DIST.global-chapter-legacy", + "DIST.amd-chapter-legacy", + "SSR.import-template", + "SSR.constructor-browser-only", + "DIST.i18n-cjs-esm-global", + "DIST.exports-boundary", + "DIST.direct-esm-file", + "EVENT.lazy-registry", + "EVENT.symbol-number-channels", + "EVENT.context-removal", + "EVENT.once-throw-consumed", + "EVENT.chain-context-arguments", + "EVENT.once-reentry", + "EVENT.dispatch-snapshot", + "EVENT.off-original-once", + "EVENT.throw-propagation" + ], + "types": [ + { + "compiler": "5.9.3", + "mode": "node10-commonjs", + "diagnostics": [] + }, + { + "compiler": "5.9.3", + "mode": "nodenext-cjs", + "diagnostics": [] + }, + { + "compiler": "5.9.3", + "mode": "bundler-esm", + "diagnostics": [] + }, + { + "compiler": "4.3.5", + "mode": "node10-commonjs", + "diagnostics": [] + }, + { + "compiler": "5.9.3", + "mode": "nodenext-esm", + "diagnostics": [] + } + ], + "browser": { + "stats": { + "startTime": "2026-09-10T17:38:21.497Z", + "duration": 38952.431000000004, + "expected": 144, + "skipped": 0, + "unexpected": 0, + "flaky": 0 + }, + "candidateMember": "artplayer.js", + "candidateSha256": "ce632f30f93eb81b856191082fccdfb2cab81aa39277eee4b89b6dfebb0ccd49", + "versions": { + "chromium": "153.0.8010.12", + "firefox": "155.0", + "webkit": "26.6" + }, + "cases": [ + { + "file": "chapter.spec.js", + "title": "published-only observations: blank title, NaN and once-only metadata are historical defects", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate clears titles on blank chapters, zero hover and replacement", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate rejects NaN and can recover after an invalid update", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate releases only its listeners and DOM across multiple instances and early destruction", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate ignores pending metadata initialization after immediate destroy", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate deduplicates stylesheet injection while the document is loading", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "published-only observations: blank title, NaN and once-only metadata are historical defects", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate clears titles on blank chapters, zero hover and replacement", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate rejects NaN and can recover after an invalid update", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate releases only its listeners and DOM across multiple instances and early destruction", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate ignores pending metadata initialization after immediate destroy", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate deduplicates stylesheet injection while the document is loading", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "published-only observations: blank title, NaN and once-only metadata are historical defects", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate clears titles on blank chapters, zero hover and replacement", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate rejects NaN and can recover after an invalid update", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate releases only its listeners and DOM across multiple instances and early destruction", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate ignores pending metadata initialization after immediate destroy", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "candidate deduplicates stylesheet injection while the document is loading", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "factory, registration, input normalization and safe title text", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "progress bars, real hover, title edges and boundary seek", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "sync update, Infinity, object identity, empty lists and invalid data", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "explicit source update and core-owned destruction", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "factory, registration, input normalization and safe title text", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "progress bars, real hover, title edges and boundary seek", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "sync update, Infinity, object identity, empty lists and invalid data", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "explicit source update and core-owned destruction", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "factory, registration, input normalization and safe title text", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "progress bars, real hover, title edges and boundary seek", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "sync update, Infinity, object identity, empty lists and invalid data", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "explicit source update and core-owned destruction", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "factory, registration, input normalization and safe title text", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "progress bars, real hover, title edges and boundary seek", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "sync update, Infinity, object identity, empty lists and invalid data", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "explicit source update and core-owned destruction", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "factory, registration, input normalization and safe title text", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "progress bars, real hover, title edges and boundary seek", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "sync update, Infinity, object identity, empty lists and invalid data", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "explicit source update and core-owned destruction", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "factory, registration, input normalization and safe title text", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "progress bars, real hover, title edges and boundary seek", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "sync update, Infinity, object identity, empty lists and invalid data", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "chapter.spec.js", + "title": "explicit source update and core-owned destruction", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: plugin, toggle, setting and static runtime return contracts", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: native subtitle update events carry cue arrays", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: plugin, toggle, setting and static runtime return contracts", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: native subtitle update events carry cue arrays", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: plugin, toggle, setting and static runtime return contracts", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: native subtitle update events carry cue arrays", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: plugin, toggle, setting and static runtime return contracts", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: native subtitle update events carry cue arrays", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: plugin, toggle, setting and static runtime return contracts", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: native subtitle update events carry cue arrays", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: plugin, toggle, setting and static runtime return contracts", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: native subtitle update events carry cue arrays", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "emitter.spec.js", + "title": "published: emitter event names and once across nested dispatch", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "emitter.spec.js", + "title": "candidate: emitter event names and once across nested dispatch", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "emitter.spec.js", + "title": "published: emitter event names and once across nested dispatch", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "emitter.spec.js", + "title": "candidate: emitter event names and once across nested dispatch", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "emitter.spec.js", + "title": "published: emitter event names and once across nested dispatch", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "emitter.spec.js", + "title": "candidate: emitter event names and once across nested dispatch", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "published: repeated destroy preserves other live instances", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: repeated destroy preserves other live instances", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: constructor plugin failure restores original DOM and clears resources", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: early proxy failure restores SSR nodes, attributes and text", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: reentrant destroy keeps sequence and does not repeat callbacks", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: destroying cancels queued resize, notice, RAF, reconnect and mounted work", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: constructor can synchronously destroy without entering the registry", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: partial Events initialization releases listeners before its property is assigned", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: live resize still coalesces and destroy cancels the next burst", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: a container is reserved during reentrant initialization", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "published: repeated destroy preserves other live instances", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: repeated destroy preserves other live instances", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: constructor plugin failure restores original DOM and clears resources", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: early proxy failure restores SSR nodes, attributes and text", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: reentrant destroy keeps sequence and does not repeat callbacks", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: destroying cancels queued resize, notice, RAF, reconnect and mounted work", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: constructor can synchronously destroy without entering the registry", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: partial Events initialization releases listeners before its property is assigned", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: live resize still coalesces and destroy cancels the next burst", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: a container is reserved during reentrant initialization", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "published: repeated destroy preserves other live instances", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: repeated destroy preserves other live instances", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: constructor plugin failure restores original DOM and clears resources", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: early proxy failure restores SSR nodes, attributes and text", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: reentrant destroy keeps sequence and does not repeat callbacks", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: destroying cancels queued resize, notice, RAF, reconnect and mounted work", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: constructor can synchronously destroy without entering the registry", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: partial Events initialization releases listeners before its property is assigned", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: live resize still coalesces and destroy cancels the next burst", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "lifecycle.spec.js", + "title": "candidate: a container is reserved during reentrant initialization", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "media-hosts.spec.js", + "title": "published: existing canvas proxy keeps media identity, playback and layout", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "media-hosts.spec.js", + "title": "candidate: existing canvas proxy keeps media identity, playback and layout", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "media-hosts.spec.js", + "title": "published: existing canvas proxy keeps media identity, playback and layout", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "media-hosts.spec.js", + "title": "candidate: existing canvas proxy keeps media identity, playback and layout", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "media-hosts.spec.js", + "title": "published: existing canvas proxy keeps media identity, playback and layout", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "media-hosts.spec.js", + "title": "candidate: existing canvas proxy keeps media identity, playback and layout", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: expanded option input preserves historical JS forms", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: configuration errors occur before mounting and preserve allocation timing", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: container identity, partial defaults, custom fields and normal callbacks", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: expanded option input preserves historical JS forms", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: configuration errors occur before mounting and preserve allocation timing", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: container identity, partial defaults, custom fields and normal callbacks", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: expanded option input preserves historical JS forms", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: configuration errors occur before mounting and preserve allocation timing", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: container identity, partial defaults, custom fields and normal callbacks", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: expanded option input preserves historical JS forms", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: configuration errors occur before mounting and preserve allocation timing", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: container identity, partial defaults, custom fields and normal callbacks", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: expanded option input preserves historical JS forms", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: configuration errors occur before mounting and preserve allocation timing", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: container identity, partial defaults, custom fields and normal callbacks", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: expanded option input preserves historical JS forms", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: configuration errors occur before mounting and preserve allocation timing", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: container identity, partial defaults, custom fields and normal callbacks", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "published: real playback, pause, seek, switch and destroy", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "candidate: real playback, pause, seek, switch and destroy", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "controlled HTTP media failure emits a real video error", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "Range, media identity and docs candidate routes", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "published: real playback, pause, seek, switch and destroy", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "candidate: real playback, pause, seek, switch and destroy", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "controlled HTTP media failure emits a real video error", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "Range, media identity and docs candidate routes", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "published: real playback, pause, seek, switch and destroy", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "candidate: real playback, pause, seek, switch and destroy", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "controlled HTTP media failure emits a real video error", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "playback.spec.js", + "title": "Range, media identity and docs candidate routes", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "resource-scope.spec.js", + "title": "internal resource scope: native DOM, RAF, timer, fetch abort and URL release", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "resource-scope.spec.js", + "title": "internal resource scope: native DOM, RAF, timer, fetch abort and URL release", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "resource-scope.spec.js", + "title": "internal resource scope: native DOM, RAF, timer, fetch abort and URL release", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "published: subtitle object URL contains real VTT data", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "published: download starts and removes its temporary anchor", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "candidate: subtitle object URL contains real VTT data", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "candidate: download starts and removes its temporary anchor", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "candidate download releases the anchor even when click fails", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "published: subtitle object URL contains real VTT data", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "published: download starts and removes its temporary anchor", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "candidate: subtitle object URL contains real VTT data", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "candidate: download starts and removes its temporary anchor", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "candidate download releases the anchor even when click fails", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "published: subtitle object URL contains real VTT data", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "published: download starts and removes its temporary anchor", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "candidate: subtitle object URL contains real VTT data", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "candidate: download starts and removes its temporary anchor", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "utils.spec.js", + "title": "candidate download releases the anchor even when click fails", + "engine": "webkit", + "status": "passed", + "retry": 0 + } + ] + }, + "legacyBrowser": { + "stats": { + "startTime": "2026-09-10T17:39:01.017Z", + "duration": 11694.716, + "expected": 30, + "skipped": 0, + "unexpected": 0, + "flaky": 0 + }, + "candidateMember": "artplayer.legacy.js", + "candidateSha256": "9b5d7c77785f556c667a77ecbae70fdc562c8362dd0476c55310859b4f0b1dc7", + "versions": { + "chromium": "153.0.8010.12", + "firefox": "155.0", + "webkit": "26.6" + }, + "cases": [ + { + "file": "declarations.spec.js", + "title": "published: plugin, toggle, setting and static runtime return contracts", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: native subtitle update events carry cue arrays", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: plugin, toggle, setting and static runtime return contracts", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: native subtitle update events carry cue arrays", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: plugin, toggle, setting and static runtime return contracts", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: native subtitle update events carry cue arrays", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: plugin, toggle, setting and static runtime return contracts", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: native subtitle update events carry cue arrays", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: plugin, toggle, setting and static runtime return contracts", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "published: native subtitle update events carry cue arrays", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: plugin, toggle, setting and static runtime return contracts", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "declarations.spec.js", + "title": "candidate: native subtitle update events carry cue arrays", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: expanded option input preserves historical JS forms", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: configuration errors occur before mounting and preserve allocation timing", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: container identity, partial defaults, custom fields and normal callbacks", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: expanded option input preserves historical JS forms", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: configuration errors occur before mounting and preserve allocation timing", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: container identity, partial defaults, custom fields and normal callbacks", + "engine": "chromium", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: expanded option input preserves historical JS forms", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: configuration errors occur before mounting and preserve allocation timing", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: container identity, partial defaults, custom fields and normal callbacks", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: expanded option input preserves historical JS forms", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: configuration errors occur before mounting and preserve allocation timing", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: container identity, partial defaults, custom fields and normal callbacks", + "engine": "firefox", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: expanded option input preserves historical JS forms", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: configuration errors occur before mounting and preserve allocation timing", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "published: container identity, partial defaults, custom fields and normal callbacks", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: expanded option input preserves historical JS forms", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: configuration errors occur before mounting and preserve allocation timing", + "engine": "webkit", + "status": "passed", + "retry": 0 + }, + { + "file": "options.spec.js", + "title": "candidate: container identity, partial defaults, custom fields and normal callbacks", + "engine": "webkit", + "status": "passed", + "retry": 0 + } + ] + }, + "limits": [ + "No remote CI or physical device run", + "Legacy plugin/toggle/timer/setting/notice return signatures and implicit scalar cue contextual typing remain open in BASE-TYPE-04/05/07 through CORE-21", + "Actual cue arrays use additive explicitly annotated listener overloads; no claim of fully corrected default inference", + "Frozen published TS 4.3.5 notice getter error is checked exactly; candidate diagnostics remain zero", + "Native subtitle fixture explicitly revokes its Blob URL after destroy; production subtitle ownership remains CORE-15" + ] +} diff --git a/refactor/changes/2026-09-11-CORE-07-declarations.md b/refactor/changes/2026-09-11-CORE-07-declarations.md new file mode 100644 index 000000000..e00642c68 --- /dev/null +++ b/refactor/changes/2026-09-11-CORE-07-declarations.md @@ -0,0 +1,66 @@ +# CORE-07:公开声明逐项协调 + +本任务完成兼容扩展与逐项处置,不宣称所有历史返回类型已准确。BASE-TYPE-06 关闭; +BASE-TYPE-04/05/07 保持开放,并已接入后续模块任务及 CORE-21 声明出口。任务原验收允许 +每项形成兼容扩展或待决结论;这些待决项没有作为发布豁免,不能在最终重构验收中算已解决。 + +## 已实施的兼容扩展 + +新增 OptionInput 和 ComponentInput。保留 Option.url 的必填字符串与 ComponentOption.html +的历史读取类型,构造函数和组件 add/update 用额外重载接受省略 URL、数字 HTML。 +直接把 Option.url 改为可选会破坏旧的 `const url: string = option.url`,所以将新的输入形式 +与旧命名类型分开。内部 ResolvedOption 基于 OptionInput 补齐默认值,不改变运行时配置。 +原两项配置缺口负例已转为正例;旧 Option 读取另有正例保留。 + +Utils 新增已有运行时导出 unescape、ArtPlayerError,sleep 的 delay 改为可选;def 保留 +历史 string-key/void 签名,再补充 PropertyKey/对象 identity 重载。string-key 调用的旧 +void 类型仍优先,不将它描述为已全面精确化。没有返回类型交叉伪装或修改运行时来迎合声明。 + +declaration-inputs.ts 与 declaration-legacy.ts 已接入工作区及仓库外安装消费者。后者只编译, +记录历史合法但运行时不准确的用法,不作为推荐示例,也不实际执行错误的返回值假设。 + +## 逐项结论与接续条件 + +| 边界 | 源码事实 | 当前处理/剩余工作 | +| --- | --- | --- | +| plugins.add | 同步注册返回 registry,Promise 插件返回 Promise registry | 旧一律 Promise 与精确 union 无法同时满足旧赋值;保留旧签名,CORE-08/21 接续 BASE-TYPE-04 | +| toggle | pause 分支同步,play 分支返回原 Promise | 旧 void 赋值与 union 冲突;保留旧签名,CORE-10/21 接续 BASE-TYPE-04,拒绝不吞掉 | +| debounce/throttle | 回调结果被丢弃,debounce 第三参数不使用 | 旧 callback 返回赋值与 void 冲突;内部已精确,公开保留并注明实际行为,CORE-21 接续 BASE-TYPE-05 | +| def | Object.defineProperty 原函数,返回输入对象 | symbol/PropertyKey 入口补齐;string-key/void 优先级保留,CORE-21 接续 BASE-TYPE-05 | +| setting | find miss 为 null;add/update 返回 item;remove 为 undefined | 真实浏览器复现,旧返回赋值保留;CORE-14/21 接续 BASE-TYPE-07 | +| subtitle events | Before/AfterUpdate 发送 activeCues 数组 | 新增 SubtitleUpdateEvents 及显式数组监听重载;旧隐式 scalar 推断保持,CORE-15/21 接续 BASE-TYPE-07 | +| notice.show | getter 返回 boolean 显示状态 | 旧读取联合类型缺少 true;浏览器复现,CORE-18/21 接续 BASE-TYPE-07 | +| static Emitter | 可构造事件总线 | 新增类型 Emitter,支持 event map、payload/ctx、symbols、链式调用;保留构造参数接受范围 | + +不能使用 `Registry & Promise` 或 `Item & SettingRegistry` 来假装两个返回声明都 +正确,也不能把同步调用改为 async 以满足旧声明。保留的声明处已经标注真实运行时含义; +新的内部模块使用精确 source 类型。旧名字、重载顺序、方法运行时和错误传播保持。 +新的 Emitter 公开结构与真实 source 实例之间有直接可赋值检查,避免复制出漂移的空接口。 + +包内 [类型兼容说明](../../packages/artplayer/types/COMPATIBILITY.md) 是后续维护入口,记录 +旧/实际类型、可执行用法、责任任务与验证命令。没有增加新的运行时导出或依赖。 + +## 当前验证证据 + +五组工作区与仓库外安装类型模式通过,安装包 27 项运行时检查通过;完整安装 UMD 三浏览器 +144 项与 legacy 声明/配置 30 项通过,无重试/跳过。新增 12 项运行时对照验证原生字幕 cue、 +插件同步/异步注册、拒绝 identity、真实 toggle 播放/暂停、设置返回 identity/null/void、 +notice 可见值与静态事件 ctx。字幕 fixture 的 Blob URL 由测试额外回收,不证明生产资源清理。 + +yarn ci:check 共 112 项通过(83 单元、4 工程、25 冻结基线),28 个生产 TS 文件严格检查; +编辑器声明由 build:ts 生成,完整编辑器交互仍属 SITE/EX。本任务运行时 JS 产物与 CORE-06 +相同,所有最终类型及包内文档已核对 tarball 指纹,文档格式变化后重新打包。 +详见 [最终验证报告](../baselines/declarations-validation.json); +[前一批部分验证](../baselines/declaration-inputs-validation.json) 保留为实施过程,已由最终证据接续。 + +新增构造重载使错误 URL 的诊断由 TS2322 变为 TS2769;已核对两个编译器均拒绝两个重载, +测试检查准确的新错误代码和 number/string 原因,没有放宽有效性断言。 + +隔离的已发布 artplayer 5.4.0 在 TS 4.3.5 下于 types/artplayer.d.ts:155 报 TS2380: +notice.show 的 boolean getter 无法赋给旧 setter 类型。该错误发生在包声明,不在新增的 +历史消费样例。测试冻结此文件/行/代码/消息;TS 5.9.3 旧消费零诊断,候选声明在两版 TS +均必须零诊断。未更改冻结 tarball 或基线文件,也没有用 skipLibCheck 绕过错误。 + +本任务独立提交;回退该提交可恢复声明、消费者、生成编辑器类型、文档及任务状态。 +没有推送、发布、真机或远端 CI 通过结论。下一任务 CORE-08 插件管理器 TS 与扩展类型; +CORE-21 必须处理上表仍开放的声明方案,不能把本次协调完成当成它的验收证据。 diff --git a/refactor/plan.md b/refactor/plan.md index df9139b7d..7916bab3e 100644 --- a/refactor/plan.md +++ b/refactor/plan.md @@ -4,7 +4,7 @@ 基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 214 项,范围 22 个包及工作区/示例。 -状态:todo 172 / doing 0 / blocked 0 / done 42 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。 +状态:todo 171 / doing 0 / blocked 0 / done 43 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。 前置依赖是启动条件;验收是完成条件。任务可以继续拆分,但不能复用或悄悄删除旧 ID。 @@ -110,21 +110,21 @@ | CORE-04 | artplayer
修复初始化与销毁生命周期 | CORE-03, ENG-05, BASE-07 | 构造失败回收、重复/重入 destroy、instances 修复 | 事件顺序、removeHtml、多实例和销毁中异步有真实回归;处理 baselines/lifecycle-coverage.md 的 BASE-LIFE-04/05 并增加候选正向回归;协调 BASE-PERF-01 销毁后定时器与回调归属 | H | done | | CORE-05 | artplayer
区分输入配置和内部配置 | CORE-01, ENG-04 | Option/ResolvedOption、默认值与校验整理 | 配置合并/错误时机不变,JS 输入仍运行时校验 | M | done | | CORE-06 | artplayer
建立内部媒体与宿主类型 | CORE-05 | 原生 video、canvas shim、UI host 类型 | 不更改公开 art.video 用法,不以 HTMLVideoElement 断言掩盖 shim | M | done | -| CORE-07 | artplayer
逐项协调公开声明差异 | CORE-02, CORE-06, BASE-07 | plugins/toggle/cue/setting/static 的旧新类型对照 | 每项有兼容重载/扩展或待决结论,不能删除旧类型样例;处理 BASE-TYPE-01/04,分别保留旧合法声明消费并验证真实返回;协调 BASE-TYPE-05 的 Utils 导出、descriptor 和 timer 旧声明差异 | H | todo | -| CORE-08 | artplayer
整理插件管理器与扩展类型 | CORE-03, CORE-07 | 注册流程、同步/异步结果、插件/事件扩展接口 | 旧插件同步可见性、重名与命名、销毁中异步插件保持明确语义;处理 baselines/lifecycle-coverage.md 的 BASE-LIFE-03 并增加候选正向回归 | H | todo | +| CORE-07 | artplayer
逐项协调公开声明差异 | CORE-02, CORE-06, BASE-07 | plugins/toggle/cue/setting/static 的旧新类型对照 | 每项有兼容重载/扩展或待决结论,不能删除旧类型样例;处理 BASE-TYPE-01/04,分别保留旧合法声明消费并验证真实返回;协调 BASE-TYPE-05 的 Utils 导出、descriptor 和 timer 旧声明差异 | H | done | +| CORE-08 | artplayer
整理插件管理器与扩展类型 | CORE-03, CORE-07 | 注册流程、同步/异步结果、插件/事件扩展接口 | 旧插件同步可见性、重名与命名、销毁中异步插件保持明确语义;处理 baselines/lifecycle-coverage.md 的 BASE-LIFE-03 并增加候选正向回归;接续 CORE-07 / BASE-TYPE-04 的同步/异步注册返回声明冲突,内部返回类型精确,保留历史消费者 | H | todo | | CORE-09 | artplayer
整理 URL 与切源操作 | CORE-04, CORE-06, CORE-08 | url/switch/customType 的操作身份及取消方案 | 并发切源、错误、同 URL、销毁和 Promise 结算有契约;处理 baselines/lifecycle-coverage.md 的 BASE-LIFE-01/02/06 并增加候选正向回归 | H | todo | -| CORE-10 | artplayer
迁移播放与时间/状态属性 | CORE-09 | play/pause/toggle/seek/volume/rate/duration 等模块 | 旧返回值、拒绝、mutex、位置恢复、属性描述符与事件通过 | H | todo | +| CORE-10 | artplayer
迁移播放与时间/状态属性 | CORE-09 | play/pause/toggle/seek/volume/rate/duration 等模块 | 旧返回值、拒绝、mutex、位置恢复、属性描述符与事件通过;接续 CORE-07 / BASE-TYPE-04 的 toggle void 与实际 Promise 分支冲突,不吞拒绝 | H | todo | | CORE-11 | artplayer
整理媒体事件、ready 与重连 | CORE-10 | 媒体转发、重连、UI 响应职责分离 | readiness 次数/顺序、过期重连、原错误参数有回归 | H | todo | | CORE-12 | artplayer
迁移模板及公开资源入口 | CORE-06, CORE-04, BASE-04 | template/icons/i18n/style、SSR 与 proxy 挂载 | DOM/CSS/global/样式注入、i18n 子路径及 SSR import 保持;不把 SSR import/useSSR 保持扩大为服务端构造播放器;复跑 BASE-05 的 SSR import/模板、浏览器 useSSR 节点复用和非浏览器构造错误;接续 VENDOR-01/02,核对 screenfull/hint 复制版本、修改与分发通知,保留 DOM/CSS/fullscreen 行为 | H | todo | | CORE-13 | artplayer
迁移组件注册与控件 | CORE-12, CORE-08 | Component/control/layer/contextmenu 的资源与 TS 边界 | add/update/remove、name、selector、mounted/beforeUnmount 通过;处理 BASE-DOM-02 窄容器控件裁切,保留 controls.update 的旧 undefined 返回值 | H | todo | -| CORE-14 | artplayer
拆分设置树、渲染和布局 | CORE-13 | setting model/selection/render/layout 的分批实现 | 不强行统一控件返回值,嵌套选择、默认高亮、更新清理通过;结合 BASE-DOM-02 验证窄容器设置定位 | H | todo | -| CORE-15 | artplayer
迁移字幕获取、解析和渲染 | CORE-11, CORE-13 | subtitle 请求/track/DOM/URL 生命周期与类型 | 过期结果、偏移、cue 数组、原生全屏及错误路径通过 | H | todo | +| CORE-14 | artplayer
拆分设置树、渲染和布局 | CORE-13 | setting model/selection/render/layout 的分批实现 | 不强行统一控件返回值,嵌套选择、默认高亮、更新清理通过;结合 BASE-DOM-02 验证窄容器设置定位;接续 BASE-TYPE-07 的 find null、add/update item、remove undefined 声明冲突 | H | todo | +| CORE-15 | artplayer
迁移字幕获取、解析和渲染 | CORE-11, CORE-13 | subtitle 请求/track/DOM/URL 生命周期与类型 | 过期结果、偏移、cue 数组、原生全屏及错误路径通过;接续 BASE-TYPE-07 的真实 cue 数组与旧隐式 scalar 回调声明兼容 | H | todo | | CORE-16 | artplayer
迁移全屏、PiP、mini 与尺寸模式 | CORE-11, CORE-12 | 显示模式服务和原公开属性门面 | 模式互斥/恢复位置、手势权限、移动方向和退出失败通过 | H | todo | | CORE-17 | artplayer
迁移键盘、手势、焦点和全局事件 | CORE-13, CORE-16 | events/hotkey 的明确 document 与资源归属 | 跨 document 重绑、触摸/键盘、快捷键及销毁无重复响应;修复 BASE-PERF-01 pending resize debounce 销毁后执行,并验证正常 resize 不变 | H | todo | -| CORE-18 | artplayer
迁移内置插件和提示模块 | CORE-14, CORE-16, CORE-17 | autoPlayback/autoOrientation/fastForward/lock/miniProgressBar 及 info/notice/loading/mask | 默认启用条件、storage 格式、定时器/动画清理通过;结合 BASE-PERF-01 防止销毁后重新安排 notice timer | M | todo | +| CORE-18 | artplayer
迁移内置插件和提示模块 | CORE-14, CORE-16, CORE-17 | autoPlayback/autoOrientation/fastForward/lock/miniProgressBar 及 info/notice/loading/mask | 默认启用条件、storage 格式、定时器/动画清理通过;结合 BASE-PERF-01 防止销毁后重新安排 notice timer;接续 BASE-TYPE-07 的 notice.show boolean getter 与历史读类型冲突 | M | todo | | CORE-19 | artplayer
整理进度、质量、缩略图和截图 | CORE-10, CORE-13, CORE-16 | 相关 player/control 功能与纯计算分离 | 截图跨域失败、缩略图布局、quality/进度边界保持 | M | todo | | CORE-20 | artplayer
收敛核心入口与依赖方向 | CORE-14, CORE-15, CORE-18, CORE-19 | Artplayer 门面、初始化依赖与最终目录 | 所有核心自有源码迁移,公开描述符/静态接口/事件差分通过 | H | todo | -| CORE-21 | artplayer
生成核心声明并校验包内容 | CORE-20, ENG-07 | 由 TS 生成的既有入口声明与三种发布产物 | 内部类型不泄漏,旧 JS/TS 消费者与 i18n 通过 | H | todo | +| CORE-21 | artplayer
生成核心声明并校验包内容 | CORE-20, ENG-07 | 由 TS 生成的既有入口声明与三种发布产物 | 内部类型不泄漏,旧 JS/TS 消费者与 i18n 通过;逐项完成 CORE-07 留下的 BASE-TYPE-04/05/07 声明方案,旧合法消费者与实际返回分别留证;不能以虚假的交叉返回类型或改变运行时来掩盖冲突,未决项阻止核心声明出口 | H | todo | | CORE-23 | artplayer
检查并补齐键盘、焦点与可访问名称 | CORE-13, CORE-14, CORE-17, ENG-05, BASE-04 | 主要控件/设置/模式退出的键盘与焦点回归、名称和字幕可用性检查及必要兼容修正 | 保持旧快捷键和 DOM/CSS 钩子;真实浏览器验证,不以静态属性检查代替交互;处理 BASE-DOM-01 的主要控件 Tab 不可达,保留既有名称与快捷键 | H | todo | | CORE-22 | artplayer
核心阶段完整验收 | CORE-21, CORE-23, PILOT-01, ENG-08, ENG-10 | 核心与旧插件的可自动化完整回归、资源/性能及明确外部验证缺口 | 核心自动化和公开差异处置通过;真实环境缺口链接包集成/REL 门槛,阶段完成不代表可公开发布 | H | todo | @@ -441,6 +441,7 @@ - CORE-04: [记录](changes/2026-09-11-CORE-04-instance-lifecycle.md) [记录](baselines/instance-lifecycle-validation.json) - CORE-05: [记录](changes/2026-09-11-CORE-05-resolved-options.md) [记录](baselines/options-validation.json) - CORE-06: [记录](changes/2026-09-11-CORE-06-media-hosts.md) [记录](baselines/media-hosts-validation.json) +- CORE-07: [记录](changes/2026-09-11-CORE-07-declarations.md) [记录](baselines/declarations-validation.json) - PKG-CHAPTER-01: [记录](changes/2026-09-10-PKG-CHAPTER-01-contract.md) [记录](baselines/chapter-contract.md) - PKG-CHAPTER-02: [记录](changes/2026-09-10-PKG-CHAPTER-02-tests.md) [记录](baselines/chapter-validation.json) - PKG-CHAPTER-03: [记录](changes/2026-09-10-PKG-CHAPTER-03-typescript-modules.md) [记录](baselines/chapter-migration-validation.json) diff --git a/refactor/progress.md b/refactor/progress.md index 8f0552377..cff9e4024 100644 --- a/refactor/progress.md +++ b/refactor/progress.md @@ -1,5 +1,13 @@ # 进度与证据 +## 当前实施:CORE-07 公开声明逐项协调完成 + +OptionInput、数字组件输入、Utils 缺失项、静态 Emitter 和显式 cue 数组重载已补充,旧合法返回赋值样例保留。112 项 Node/基线、安装 UMD 三浏览器 144 项及 legacy 声明/配置 30 项通过;严格打包 27 项运行时与五组类型零诊断。见 [交付](changes/2026-09-11-CORE-07-declarations.md)。关闭 BASE-TYPE-06;BASE-TYPE-04/05/07 的返回/隐式推断冲突保持开放,已接入模块任务与 CORE-21 出口,不代表全部公开类型已精确化。当前 214 项,43 完成、171 待办;下一项 CORE-08 插件管理器与扩展类型。 + +## 当前实施:CORE-07 公开声明协调进行中 + +已补充 OptionInput/ComponentInput 和兼容重载,保留旧 Option 读取类型;补齐部分 Utils 声明,新增历史返回值消费样例。112 项 Node/基线、五组安装包类型及 18 项配置浏览器测试通过,见 [当前记录](changes/2026-09-11-CORE-07-declarations.md)。plugins/toggle/timer/setting/cue/static 仍需逐项协调,本任务保持 doing,尚未提交。当前 214 项,42 完成、1 实施、171 待办;上个完成任务 CORE-06 提交 ee859e48。 + ## 当前实施:CORE-06 媒体与宿主类型完成 建立原生 video/canvas 媒体及最小宿主类型,五个播放/布局 mixin 迁移 TS,保持公开 art.video 身份、描述符和返回时序。111 项 Node/基线、安装 UMD 三浏览器 132 项及 legacy 播放/生命周期/代理 48 项通过;严格打包 27 项运行时、五组类型零诊断。见 [交付](changes/2026-09-11-CORE-06-media-hosts.md)。当前 214 项,42 完成、172 待办;核心二十三个 TS 文件、chapter 五个。代理完整迁移和主入口静态集成尚未完成;下一项 CORE-07 逐项协调公开声明差异。 diff --git a/refactor/risk-table.md b/refactor/risk-table.md index 49300cc41..5267c52ed 100644 --- a/refactor/risk-table.md +++ b/refactor/risk-table.md @@ -16,7 +16,7 @@ | BASE-TYPE-01 | resolved / 已复现 | NodeNext ESM 默认导出与声明互操作失配 | ENG-04, CORE-07, PKG-CHAPTER-04 | | BASE-TYPE-02 | resolved / 已复现 | chapter 可选运行时参数被声明为必填 | PKG-CHAPTER-02 | | BASE-TYPE-03 | resolved / 已复现 | chapter legacy 缺旧模块解析的声明回退 | ENG-04, PKG-CHAPTER-04 | -| BASE-TYPE-04 | open / 源码/产物事实 | plugins.add / toggle 的旧声明返回值与运行时不同 | CORE-07 | +| BASE-TYPE-04 | open / 已复现 | plugins.add / toggle 的旧声明返回值与运行时不同 | CORE-07, CORE-08, CORE-10, CORE-21 | | BASE-DIST-01 | open / 源码/产物事实 | thumbnail tool 分发入口与类型文件缺失 | PKG-TOOL-THUMB-01, PKG-TOOL-THUMB-04 | | BASE-PERF-01 | resolved / 已复现 | 销毁后的 resize 防抖重新创建 notice timer | CORE-17, CORE-04, CORE-18 | | BASE-SOURCE-01 | open / 源码/产物事实 | 工作区 5.4.1 与采集时真实发布 5.4.0 不同 | BASE-08, REL-01 | @@ -46,7 +46,8 @@ | BUILD-AMD-01 | resolved / 已复现 | AMD 全局导出补丁误将固定参数 t 当作全局对象 | ENG-06 | | UTIL-MERGE-01 | resolved / 已复现 | mergeDeep lets a JSON __proto__ key replace the result prototype | CORE-01 | | UTIL-DOWNLOAD-01 | resolved / 源码/产物事实 | Temporary download anchor remains if click throws | CORE-01 | -| BASE-TYPE-05 | open / 源码/产物事实 | Public Utils declarations omit exports and misstate timer/descriptor signatures | CORE-07 | +| BASE-TYPE-05 | open / 源码/产物事实 | Public Utils declarations omit exports and misstate timer/descriptor signatures | CORE-07, CORE-21 | | EVENT-NAME-01 | resolved / 已复现 | Emitter event names collide with Object.prototype | CORE-02 | | EVENT-ONCE-01 | resolved / 已复现 | Nested dispatch snapshots invoke the same once registration twice | CORE-02 | -| BASE-TYPE-06 | open / 已复现 | Public Option requires url and excludes numeric control HTML accepted by existing JS | CORE-07 | +| BASE-TYPE-06 | resolved / 已复现 | Public Option requires url and excludes numeric control HTML accepted by existing JS | CORE-07 | +| BASE-TYPE-07 | open / 已复现 | Setting returns, subtitle contextual payloads and notice getter conflict with historical declarations | CORE-07, CORE-14, CORE-15, CORE-18, CORE-21 | diff --git a/refactor/risks.json b/refactor/risks.json index 9a9e1fc1f..2fc1f2405 100644 --- a/refactor/risks.json +++ b/refactor/risks.json @@ -232,19 +232,25 @@ { "id": "BASE-TYPE-04", "title": "plugins.add / toggle 的旧声明返回值与运行时不同", - "confirmation": "source-observed", + "confirmation": "reproduced", "status": "open", "owners": [ - "CORE-07" + "CORE-07", + "CORE-08", + "CORE-10", + "CORE-21" ], "evidence": [ "refactor/baselines/consumers.json", "refactor/baselines/public-api.json", - "refactor/baselines/lifecycle.json" + "refactor/baselines/lifecycle.json", + "test/types/declaration-legacy.ts", + "refactor/changes/2026-09-11-CORE-07-declarations.md", + "refactor/baselines/declarations-validation.json" ], "compatibleResolution": "保留旧声明接受范围并协调精确重载/扩展,不静默把同步注册改成 async。", "closureCriteria": "返回值类型与运行时差异逐项说明,旧合法消费和拒绝传播回归通过。", - "scopeNote": "plugins.add synchronous result is browser-reproduced; toggle return comparison also relies on current source/playback tests. Do not claim every declaration mismatch was independently browser-reproduced." + "scopeNote": "CORE-07 retains historical legal return assignments and records actual runtime separately; incompatible return tightening remains open through CORE-21. No release waiver." }, { "id": "BASE-DIST-01", @@ -726,16 +732,21 @@ "confirmation": "source-observed", "status": "open", "owners": [ - "CORE-07" + "CORE-07", + "CORE-21" ], "evidence": [ "packages/artplayer/types/utils.d.ts", "test/utils.test.js", "test/types/utils-source.ts", - "refactor/changes/2026-09-10-CORE-01-typed-utils.md" + "refactor/changes/2026-09-10-CORE-01-typed-utils.md", + "test/types/declaration-legacy.ts", + "refactor/changes/2026-09-11-CORE-07-declarations.md", + "refactor/baselines/declarations-validation.json" ], "compatibleResolution": "Coordinate compatible public overloads/exports separately; use accurate strict types in migrated source.", - "closureCriteria": "Cover missing unescape/ArtPlayerError, def identity/property keys, optional sleep, timer void returns and ignored debounce context; retain legal old consumers in new/old compilers." + "closureCriteria": "Cover missing unescape/ArtPlayerError, def identity/property keys, optional sleep, timer void returns and ignored debounce context; retain legal old consumers in new/old compilers.", + "scopeNote": "CORE-07 retains historical legal return assignments and records actual runtime separately; incompatible return tightening remains open through CORE-21. No release waiver." }, { "id": "EVENT-NAME-01", @@ -787,7 +798,7 @@ "id": "BASE-TYPE-06", "title": "Public Option requires url and excludes numeric control HTML accepted by existing JS", "confirmation": "reproduced", - "status": "open", + "status": "resolved", "owners": [ "CORE-07" ], @@ -798,7 +809,37 @@ "refactor/changes/2026-09-11-CORE-05-resolved-options.md" ], "compatibleResolution": "Expand public declarations for the verified legal JS forms; preserve existing typed inputs and runtime defaults.", - "closureCriteria": "Replace the two historical negative fixtures with positive public consumers and verify old/new TypeScript plus installed package modes." + "closureCriteria": "Replace the two historical negative fixtures with positive public consumers and verify old/new TypeScript plus installed package modes.", + "resolutionEvidence": [ + "refactor/changes/2026-09-11-CORE-07-declarations.md", + "refactor/baselines/declarations-validation.json", + "test/types/declaration-inputs.ts", + "test/browser/options.spec.js" + ], + "resolutionRationale": "Additive OptionInput/ComponentInput and constructor/component overloads accept omitted URL and numeric HTML while preserving historical Option reads. Five installed compiler modes and old/new core browser input cases pass." + }, + { + "id": "BASE-TYPE-07", + "title": "Setting returns, subtitle contextual payloads and notice getter conflict with historical declarations", + "confirmation": "reproduced", + "status": "open", + "owners": [ + "CORE-07", + "CORE-14", + "CORE-15", + "CORE-18", + "CORE-21" + ], + "evidence": [ + "test/browser/declarations.spec.js", + "test/types/declaration-legacy.ts", + "packages/artplayer/types/artplayer.d.ts", + "packages/artplayer/types/events.d.ts", + "refactor/baselines/declarations-validation.json" + ], + "compatibleResolution": "Keep legacy consumers; add explicit cue-array listener overloads, type internal implementations accurately, and resolve remaining generated/public facade contracts at CORE-21 without false intersections.", + "closureCriteria": "Actual setting/null/void and notice boolean returns, cue array callbacks and old legal type consumers all have an explicit compatible declaration strategy and package tests.", + "scopeNote": "CORE-07 provides runtime evidence and explicit cue-array overloads; old inferred scalar event callbacks and return signatures are not claimed corrected." } ] } diff --git a/refactor/scripts/types.test.mjs b/refactor/scripts/types.test.mjs index 078a22a8d..188c0910a 100644 --- a/refactor/scripts/types.test.mjs +++ b/refactor/scripts/types.test.mjs @@ -5,19 +5,55 @@ import test from 'node:test' import ts from 'typescript' import compat from 'typescript-compat' import { checkConsumer, checkProject } from '../../scripts/typecheck.mjs' -import { refactorDir } from './releases.mjs' +import { ensureArchive, hash, readMember, refactorDir } from './releases.mjs' test('Current and compatibility compilers reject invalid old public calls and unused error assertions', () => { const original = fs.readFileSync(path.join(refactorDir, '../test/types/public.ts'), 'utf8') for (const compiler of [ts, compat]) { assert.deepEqual(checkConsumer(compiler, 'node10-commonjs'), []) const invalid = "import Artplayer from 'artplayer'; new Artplayer({ container: '#player', url: 42 });" - assert(checkConsumer(compiler, 'node10-commonjs', invalid).some(d => d.code === 2322)) + const diagnostics = checkConsumer(compiler, 'node10-commonjs', invalid) + assert.deepEqual(diagnostics.map(d => d.code), [2769], 'Both constructor overloads must reject the numeric URL') + assert.match(diagnostics[0].message, /Type 'number' is not assignable to type 'string/) const unused = original.replace('url: 42', "url: 'valid.mp4'") assert(checkConsumer(compiler, 'node10-commonjs', unused).some(d => d.code === 2578)) } }) +test('Historical return assignments retain exact published diagnostics and current acceptance', async () => { + const release = JSON.parse(fs.readFileSync(path.join(refactorDir, 'baselines/releases.json'), 'utf8')).releases.find(item => item.name === 'artplayer') + const archive = await ensureArchive(release) + const parent = path.join(refactorDir, '.cache') + const dir = fs.mkdtempSync(path.join(parent, 'legacy-types-')) + try { + for (const [member, digest] of Object.entries(release.files)) { + if (member !== 'package/package.json' && !member.startsWith('package/types/')) continue + const bytes = readMember(archive, member) + assert.equal(hash(bytes), digest) + const target = path.resolve(dir, 'node_modules/artplayer', member.slice('package/'.length)) + assert(target.startsWith(path.join(dir, 'node_modules/artplayer') + path.sep)) + fs.mkdirSync(path.dirname(target), { recursive: true }) + fs.writeFileSync(target, bytes) + } + const filename = path.join(dir, 'legacy.ts') + fs.copyFileSync(path.join(refactorDir, '../test/types/declaration-legacy.ts'), filename) + for (const compiler of [ts, compat]) { + const program = compiler.createProgram([filename], { strict: true, noEmit: true, skipLibCheck: false, types: [], esModuleInterop: true, target: compiler.ScriptTarget.ES2020, module: compiler.ModuleKind.CommonJS, moduleResolution: compiler.ModuleResolutionKind.NodeJs, lib: ['lib.es2020.d.ts', 'lib.dom.d.ts'] }) + const declarations = program.getSourceFiles().filter(file => file.fileName.replaceAll('\\', '/').includes('/artplayer/types/')) + assert(declarations.length > 0) + assert(declarations.every(file => path.resolve(file.fileName).startsWith(path.join(dir, 'node_modules/artplayer') + path.sep))) + const expected = compiler === compat ? [{ file: 'node_modules/artplayer/types/artplayer.d.ts', line: 155, code: 2380, message: "The return type of a 'get' accessor must be assignable to its 'set' accessor type" }] : [] + assert.deepEqual(compiler.getPreEmitDiagnostics(program).map(d => ({ file: d.file && path.relative(dir, d.file.fileName).replaceAll('\\', '/'), line: d.file && d.file.getLineAndCharacterOfPosition(d.start).line + 1, code: d.code, message: compiler.flattenDiagnosticMessageText(d.messageText, '\n') })), expected, `TS ${compiler.version} historical consumer`) + assert.deepEqual(checkConsumer(compiler, 'node10-commonjs', fs.readFileSync(filename, 'utf8')), [], 'Current declarations must have zero diagnostics, including TS 4.3.5') + } + } + finally { + const resolved = fs.realpathSync(dir) + assert(path.dirname(resolved) === fs.realpathSync(parent) && path.basename(resolved).startsWith('legacy-types-')) + fs.rmSync(resolved, { recursive: true, force: true }) + } +}) + test('Browser implementation configuration catches source errors without emitting JavaScript', () => { const parent = path.join(refactorDir, '.cache') fs.mkdirSync(parent, { recursive: true }) diff --git a/refactor/tasks.json b/refactor/tasks.json index 5d19b72be..31458492d 100644 --- a/refactor/tasks.json +++ b/refactor/tasks.json @@ -870,11 +870,14 @@ "CORE-06", "BASE-07" ], - "status": "todo", + "status": "done", "risk": "H", "deliverable": "plugins/toggle/cue/setting/static 的旧新类型对照", "acceptance": "每项有兼容重载/扩展或待决结论,不能删除旧类型样例;处理 BASE-TYPE-01/04,分别保留旧合法声明消费并验证真实返回;协调 BASE-TYPE-05 的 Utils 导出、descriptor 和 timer 旧声明差异", - "evidence": [] + "evidence": [ + "changes/2026-09-11-CORE-07-declarations.md", + "baselines/declarations-validation.json" + ] }, { "id": "CORE-08", @@ -890,7 +893,7 @@ "status": "todo", "risk": "H", "deliverable": "注册流程、同步/异步结果、插件/事件扩展接口", - "acceptance": "旧插件同步可见性、重名与命名、销毁中异步插件保持明确语义;处理 baselines/lifecycle-coverage.md 的 BASE-LIFE-03 并增加候选正向回归", + "acceptance": "旧插件同步可见性、重名与命名、销毁中异步插件保持明确语义;处理 baselines/lifecycle-coverage.md 的 BASE-LIFE-03 并增加候选正向回归;接续 CORE-07 / BASE-TYPE-04 的同步/异步注册返回声明冲突,内部返回类型精确,保留历史消费者", "evidence": [] }, { @@ -924,7 +927,7 @@ "status": "todo", "risk": "H", "deliverable": "play/pause/toggle/seek/volume/rate/duration 等模块", - "acceptance": "旧返回值、拒绝、mutex、位置恢复、属性描述符与事件通过", + "acceptance": "旧返回值、拒绝、mutex、位置恢复、属性描述符与事件通过;接续 CORE-07 / BASE-TYPE-04 的 toggle void 与实际 Promise 分支冲突,不吞拒绝", "evidence": [] }, { @@ -991,7 +994,7 @@ "status": "todo", "risk": "H", "deliverable": "setting model/selection/render/layout 的分批实现", - "acceptance": "不强行统一控件返回值,嵌套选择、默认高亮、更新清理通过;结合 BASE-DOM-02 验证窄容器设置定位", + "acceptance": "不强行统一控件返回值,嵌套选择、默认高亮、更新清理通过;结合 BASE-DOM-02 验证窄容器设置定位;接续 BASE-TYPE-07 的 find null、add/update item、remove undefined 声明冲突", "evidence": [] }, { @@ -1008,7 +1011,7 @@ "status": "todo", "risk": "H", "deliverable": "subtitle 请求/track/DOM/URL 生命周期与类型", - "acceptance": "过期结果、偏移、cue 数组、原生全屏及错误路径通过", + "acceptance": "过期结果、偏移、cue 数组、原生全屏及错误路径通过;接续 BASE-TYPE-07 的真实 cue 数组与旧隐式 scalar 回调声明兼容", "evidence": [] }, { @@ -1060,7 +1063,7 @@ "status": "todo", "risk": "M", "deliverable": "autoPlayback/autoOrientation/fastForward/lock/miniProgressBar 及 info/notice/loading/mask", - "acceptance": "默认启用条件、storage 格式、定时器/动画清理通过;结合 BASE-PERF-01 防止销毁后重新安排 notice timer", + "acceptance": "默认启用条件、storage 格式、定时器/动画清理通过;结合 BASE-PERF-01 防止销毁后重新安排 notice timer;接续 BASE-TYPE-07 的 notice.show boolean getter 与历史读类型冲突", "evidence": [] }, { @@ -1114,7 +1117,7 @@ "status": "todo", "risk": "H", "deliverable": "由 TS 生成的既有入口声明与三种发布产物", - "acceptance": "内部类型不泄漏,旧 JS/TS 消费者与 i18n 通过", + "acceptance": "内部类型不泄漏,旧 JS/TS 消费者与 i18n 通过;逐项完成 CORE-07 留下的 BASE-TYPE-04/05/07 声明方案,旧合法消费者与实际返回分别留证;不能以虚假的交叉返回类型或改变运行时来掩盖冲突,未决项阻止核心声明出口", "evidence": [] }, { diff --git a/scripts/package-consumer.mjs b/scripts/package-consumer.mjs index b58e1d91a..3129b9806 100644 --- a/scripts/package-consumer.mjs +++ b/scripts/package-consumer.mjs @@ -38,7 +38,7 @@ export function typeConsumers(dir) { for (const [compiler, mode] of [[ts, 'node10-commonjs'], [ts, 'nodenext-cjs'], [ts, 'bundler-esm'], [compat, 'node10-commonjs'], [ts, 'nodenext-esm']]) { const next = mode.startsWith('nodenext') const extension = next ? (mode.endsWith('-cjs') ? 'cts' : 'mts') : 'ts' - const inputs = ['public', 'chapter-options', 'chapter-exports', 'language-value', 'language', 'legacy-plugin'] + const inputs = ['public', 'declaration-inputs', 'declaration-legacy', 'chapter-options', 'chapter-exports', 'language-value', 'language', 'legacy-plugin'] if (mode === 'nodenext-cjs') inputs.push('commonjs') const files = inputs.map((name) => { diff --git a/scripts/typecheck.mjs b/scripts/typecheck.mjs index bc5cac2fb..7eb7cbc40 100644 --- a/scripts/typecheck.mjs +++ b/scripts/typecheck.mjs @@ -71,7 +71,7 @@ export function runTypechecks() { console.log(`Strict project passed: ${relative(config)} (${result.files.length} root files)`) } for (const [compiler, mode] of [[ts, 'node10-commonjs'], [ts, 'nodenext-cjs'], [ts, 'bundler-esm'], [ts, 'nodenext-esm'], [compat, 'node10-commonjs']]) { - for (const fixture of ['test/types/public.ts', 'test/types/chapter-options.ts', 'test/types/chapter-exports.ts', 'test/types/language-value.ts', 'refactor/fixtures/consumers/language.ts', 'refactor/fixtures/consumers/legacy-plugin.ts']) { + for (const fixture of ['test/types/public.ts', 'test/types/declaration-inputs.ts', 'test/types/declaration-legacy.ts', 'test/types/chapter-options.ts', 'test/types/chapter-exports.ts', 'test/types/language-value.ts', 'refactor/fixtures/consumers/language.ts', 'refactor/fixtures/consumers/legacy-plugin.ts']) { assert.deepEqual(checkConsumer(compiler, mode, fs.readFileSync(path.join(root, fixture), 'utf8')), [], `Consumer failed: TS ${compiler.version} ${mode} ${fixture}`) } if (mode === 'nodenext-cjs') diff --git a/test/browser/declarations.spec.js b/test/browser/declarations.spec.js new file mode 100644 index 000000000..759790793 --- /dev/null +++ b/test/browser/declarations.spec.js @@ -0,0 +1,97 @@ +import { expect, test } from './fixtures.js' + +for (const core of ['published', 'candidate']) { + test(`${core}: plugin, toggle, setting and static runtime return contracts`, async ({ page }) => { + await page.goto(`/test/player.html?core=${core}&chapter=published`) + await page.evaluate(() => { + const container = document.createElement('div') + Object.assign(container.style, { width: '640px', height: '360px' }) + document.body.append(container) + window.art = new window.Artplayer({ container, url: '/test/pattern.mp4', muted: true, setting: true }) + }) + await expect.poll(() => page.evaluate(() => window.art.isReady)).toBe(true) + const values = await page.evaluate(async () => { + const art = window.art + const sync = art.plugins.add(() => ({ name: 'syncContract' })) + const promise = art.plugins.add(async () => ({ name: 'asyncContract' })) + const before = art.plugins.asyncContract === undefined + const asyncResult = await promise + const failure = new Error('plugin rejection contract') + const rejected = await art.plugins.add(() => Promise.reject(failure)).catch(error => error === failure) + const item = { name: 'returnContract', html: 'Initial' } + const added = art.setting.add(item) + const updated = art.setting.update({ name: 'returnContract', html: 'Updated' }) + const identity = art.setting.find('returnContract') === item + const html = item.$html.textContent + const removed = art.setting.remove('returnContract') + const missing = art.setting.find('returnContract') + art.notice.show = 'Visible notice' + const notice = art.notice.show + const emitter = new art.constructor.Emitter('ignored') + let received + const ctx = { value: 2 } + const chained = emitter.on('contract', function (payload) { + received = this.value + payload + }, ctx).emit('contract', 3) === emitter + return { + syncRegistry: sync === art.plugins, + syncThen: typeof sync.then, + asyncPromise: promise instanceof Promise, + asyncPending: before, + asyncRegistry: asyncResult === art.plugins, + rejected, + addedItem: added === item, + updatedItem: updated === item, + foundItem: identity, + html, + removedType: typeof removed, + missing, + notice, + chained, + received, + } + }) + expect(values).toEqual({ syncRegistry: true, syncThen: 'undefined', asyncPromise: true, asyncPending: true, asyncRegistry: true, rejected: true, addedItem: true, updatedItem: true, foundItem: true, html: 'Updated', removedType: 'undefined', missing: null, notice: true, chained: true, received: 5 }) + expect(await page.evaluate(async () => { + const result = window.art.toggle() + const promise = result instanceof Promise + await result + return promise + })).toBe(true) + await expect.poll(() => page.evaluate(() => window.art.playing)).toBe(true) + expect(await page.evaluate(() => typeof window.art.toggle())).toBe('undefined') + expect(await page.evaluate(() => window.art.playing)).toBe(false) + await page.evaluate(() => window.art.destroy()) + }) + + test(`${core}: native subtitle update events carry cue arrays`, async ({ page }) => { + await page.goto(`/test/player.html?core=${core}&chapter=published`) + await page.evaluate(() => { + const container = document.createElement('div') + Object.assign(container.style, { width: '640px', height: '360px' }) + document.body.append(container) + const art = window.art = new window.Artplayer({ container, url: '/test/pattern.mp4', muted: true, subtitle: { url: '/test/declaration-cues.vtt' } }) + window.cueEvents = [] + for (const name of ['subtitleBeforeUpdate', 'subtitleAfterUpdate']) { + art.on(name, (cues) => { + window.cueEvents.push({ name, array: Array.isArray(cues), length: cues.length, native: cues[0] instanceof VTTCue, same: cues[0] === art.subtitle.textTrack.cues[0], text: cues[0]?.text }) + }) + } + }) + await expect.poll(() => page.evaluate(() => window.art.isReady && window.art.subtitle.cues.length === 1)).toBe(true) + await page.evaluate(() => { + window.art.seek = 1 + }) + await expect.poll(() => page.evaluate(() => window.cueEvents.some(event => event.name === 'subtitleAfterUpdate'))).toBe(true) + const events = await page.evaluate(() => window.cueEvents) + for (const name of ['subtitleBeforeUpdate', 'subtitleAfterUpdate']) + expect(events.find(event => event.name === name)).toEqual({ name, array: true, length: 1, native: true, same: true, text: 'Declaration cue' }) + expect(await page.evaluate(() => window.art.template.$subtitle.textContent.trim())).toBe('Declaration cue') + await page.evaluate(() => { + const url = window.art.template.$track.src + window.art.destroy() + // Explicit test teardown; subtitle URL ownership is still tracked by CORE-15. + URL.revokeObjectURL(url) + }) + }) +} diff --git a/test/browser/media/declaration-cues.vtt b/test/browser/media/declaration-cues.vtt new file mode 100644 index 000000000..373604f77 --- /dev/null +++ b/test/browser/media/declaration-cues.vtt @@ -0,0 +1,4 @@ +WEBVTT + +00:00:00.000 --> 00:00:04.000 +Declaration cue diff --git a/test/browser/options.spec.js b/test/browser/options.spec.js index d6d7da5d5..65424bb4c 100644 --- a/test/browser/options.spec.js +++ b/test/browser/options.spec.js @@ -1,17 +1,25 @@ import { expect, test } from './fixtures.js' for (const core of ['published', 'candidate']) { - test(`${core}: historical JS option forms remain accepted despite declaration gaps`, async ({ page }) => { + test(`${core}: expanded option input preserves historical JS forms`, async ({ page }) => { await page.goto(`/test/player.html?core=${core}&chapter=published`) const result = await page.evaluate(() => { const container = document.createElement('div') document.body.append(container) - const art = new window.Artplayer({ container, controls: [{ name: 'numeric', html: 42, position: 'left' }] }) - const result = { url: art.option.url, html: art.controls.numeric.textContent } + const art = new window.Artplayer({ + container, + controls: [{ name: 'numeric', html: 42, position: 'left' }], + layers: [{ name: 'numeric', html: 43 }], + contextmenu: [{ name: 'numeric', html: 44 }], + }) + const result = { url: art.option.url, html: art.controls.numeric.textContent, layer: art.layers.numeric.textContent, menu: art.contextmenu.numeric.textContent } + art.controls.update({ name: 'numeric', html: 45, position: 'left' }) + result.updated = art.controls.numeric.textContent + result.added = art.layers.add({ name: 'added', html: 46 }).textContent art.destroy() return result }) - expect(result).toEqual({ url: '', html: '42' }) + expect(result).toEqual({ url: '', html: '42', layer: '43', menu: '44', updated: '45', added: '46' }) }) test(`${core}: configuration errors occur before mounting and preserve allocation timing`, async ({ page }) => { diff --git a/test/browser/server.mjs b/test/browser/server.mjs index 406669f98..45884a9b2 100644 --- a/test/browser/server.mjs +++ b/test/browser/server.mjs @@ -60,6 +60,7 @@ for (const extension of ['mp4', 'webm']) { } const mime = { '.html': 'text/html', '.js': 'text/javascript', '.mjs': 'text/javascript', '.json': 'application/json', '.css': 'text/css', '.mp4': 'video/mp4', '.webm': 'video/webm', '.vtt': 'text/vtt', '.svg': 'image/svg+xml', '.png': 'image/png', '.jpg': 'image/jpeg' } +add('/test/declaration-cues.vtt', fs.readFileSync(path.join(workspace, 'test/browser/media/declaration-cues.vtt')), { kind: 'test-subtitles', file: 'test/browser/media/declaration-cues.vtt' }) function send(req, res, bytes, filename) { res.setHeader('Content-Type', mime[path.extname(filename)] || 'application/octet-stream') res.setHeader('Cache-Control', 'no-store') diff --git a/test/types/declaration-inputs.ts b/test/types/declaration-inputs.ts new file mode 100644 index 000000000..e8d5947ec --- /dev/null +++ b/test/types/declaration-inputs.ts @@ -0,0 +1,52 @@ +import type { Emitter, Option, OptionInput, SubtitleUpdateEvents } from 'artplayer' +import Artplayer from 'artplayer' + +const historical: Option = { container: '#player', url: '' } +const requiredUrl: string = historical.url +const art = new Artplayer(historical) +const instanceUrl: string = art.option.url +const defaultUrl: string = Artplayer.option.url +const input: OptionInput = { + container: '#player', + controls: [{ html: 42, position: 'left' }], + layers: [{ html: 43 }], + contextmenu: [{ html: 44 }], +} +void new Artplayer(input, function (instance) { + const receiverId: number = this.id + const argument: Artplayer = instance + void [receiverId, argument] +}) +void new Artplayer({ container: '#player' }) +art.controls.update({ name: 'numeric', html: 45, position: 'left' }) +art.layers.add(() => ({ html: 46 })) +// @ts-expect-error URL must still be a string when provided. +void new Artplayer({ container: '#player', url: 42 }) +// @ts-expect-error Numeric HTML does not relax other component fields. +void new Artplayer({ container: '#player', controls: [{ html: 42, position: 42 }] }) +// @ts-expect-error An arbitrary object is not renderable HTML. +void new Artplayer({ container: '#player', layers: [{ html: {} }] }) +const unescaped: string = Artplayer.utils.unescape('&') +const error: Error = new Artplayer.utils.ArtPlayerError('message') +const timer: Promise = Artplayer.utils.sleep() +const target = { value: 1 } +const identity: typeof target = Artplayer.utils.def(target, Symbol('key'), { value: 2 }) +// Existing string-key return assignments remain valid during reconciliation. +const oldDef: void = Artplayer.utils.def(target, 'key', { value: 2 }) +void [requiredUrl, instanceUrl, defaultUrl, unescaped, error, timer, identity, oldDef] + +const emitter: Emitter<{ ready: [number] }> = new Artplayer.Emitter<{ ready: [number] }>('historically-ignored') +emitter.on('ready', function (value) { + const id: number = this.id + const payload: number = value + void [id, payload] +}, { id: 1 }).once('ready', () => {}).emit('ready', 1).off('ready') +// @ts-expect-error Typed event maps reject wrong payloads. +emitter.emit('ready', 'bad') +// @ts-expect-error Typed event maps reject unknown names. +emitter.on('missing', () => {}) +const open = new Artplayer.Emitter() +open.on(Symbol.for('event'), (...values) => values.length).emit(Symbol.for('event'), 1, 'two') +const before = (cues: SubtitleUpdateEvents['subtitleBeforeUpdate'][0]) => cues.map(cue => cue.text) +art.on('subtitleBeforeUpdate', before).once('subtitleAfterUpdate', before) +art.emit('subtitleBeforeUpdate', []).off('subtitleBeforeUpdate', before) diff --git a/test/types/declaration-legacy.ts b/test/types/declaration-legacy.ts new file mode 100644 index 000000000..127799e7d --- /dev/null +++ b/test/types/declaration-legacy.ts @@ -0,0 +1,20 @@ +import type { Option } from 'artplayer' +import Artplayer from 'artplayer' + +// These legal historical declarations expose known runtime mismatches. +// Keep them compiling until a compatible, reviewed resolution exists. +const option: Option = { container: '#player', url: '' } +const requiredUrl: string = option.url +const art = new Artplayer(option) +const registration: Promise = art.plugins.add(() => ({ name: 'legacy' })) +const toggle: void = art.toggle() +const debounced: number = Artplayer.utils.debounce(() => 1, 10, {})() +const throttled: number = Artplayer.utils.throttle(() => 1, 10)() +const descriptor: void = Artplayer.utils.def({}, 'value', { value: 1 }) +const updated: Artplayer['setting'] = art.setting.update({ name: 'entry', html: 'Entry' }) +const removed: Artplayer['setting'] = art.setting.remove('entry') +art.on('subtitleBeforeUpdate', (cue) => { + const historicalCue: VTTCue = cue + void historicalCue +}) +void [requiredUrl, registration, toggle, debounced, throttled, descriptor, updated, removed] diff --git a/test/types/emitter-source.ts b/test/types/emitter-source.ts index 68721b933..814e7393e 100644 --- a/test/types/emitter-source.ts +++ b/test/types/emitter-source.ts @@ -1,4 +1,4 @@ -import type { Events } from 'artplayer' +import type { Events, Emitter as PublicEmitter } from 'artplayer' import Emitter from '../../packages/artplayer/src/utils/emitter' const symbol = Symbol('message') @@ -12,6 +12,7 @@ class TypedEmitter extends Emitter { count = 0 } const events = new TypedEmitter() +const publicShape: PublicEmitter = events const context = { total: 0 } const chain: TypedEmitter = events.on('value', function (count, label) { this.total += count @@ -39,4 +40,4 @@ events.on('ready', contextListener, { total: 'zero' }) function contextListener(this: { total: number }) { return this.total } -void chain +void [chain, publicShape] diff --git a/test/types/options-source.ts b/test/types/options-source.ts index 8a8d0bc22..ea186ffc9 100644 --- a/test/types/options-source.ts +++ b/test/types/options-source.ts @@ -1,4 +1,4 @@ -import type { Option, ResolvedOption } from '../../packages/artplayer/src/option/types' +import type { Option, OptionInput, ResolvedOption } from '../../packages/artplayer/src/option/types' import createDefaults from '../../packages/artplayer/src/option/defaults' import resolveOption from '../../packages/artplayer/src/option/resolve' @@ -25,9 +25,8 @@ resolved.subtitle.onVttLoad = () => 42 // @ts-expect-error Application fields retain their own type. extended.application.token = 'invalid' -// Historical public declaration gaps; CORE-07 must replace these with positive checks. -// @ts-expect-error Runtime accepts an omitted URL, but the current public Option requires it. -const omittedUrl: Option = { container: '#player' } -// @ts-expect-error Runtime accepts numeric control HTML, but the current public type excludes it. -const numericHtml: NonNullable[number] = { html: 42, position: 'left' } -void [omittedUrl, numericHtml] +const omittedUrl: OptionInput = { container: '#player' } +const numericHtml: NonNullable[number] = { html: 42, position: 'left' } +const expanded = resolveOption({ ...omittedUrl, controls: [numericHtml] }, createDefaults()) +const defaultUrl: string = expanded.url +void [omittedUrl, numericHtml, defaultUrl]