mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -08:00
fix(types): [PKG-FACTORY-01] preserve published factory compatibility
This commit is contained in:
1 parent
1117107032
commit
c4c7491e16
35 files changed
+670
-229
No files matched your search
+18
-11
@@ -1,7 +1,7 @@
|
||||
// Generated from the package public declaration by yarn build:ts. Do not edit.
|
||||
/* eslint-disable ts/no-redeclare -- Callable and public type namespace intentionally merge. */
|
||||
declare namespace artplayerPluginAmbilight {
|
||||
interface Option {
|
||||
declare namespace artplayerPluginAmbilightDefinitions {
|
||||
export interface Option {
|
||||
/** CSS blur radius. @default '50px' */
|
||||
blur?: string
|
||||
/** Grid cell opacity. @default 0.5 */
|
||||
@@ -13,23 +13,30 @@ declare namespace artplayerPluginAmbilight {
|
||||
/** Background color transition duration in seconds. @default 0.3 */
|
||||
duration?: number
|
||||
}
|
||||
interface Result {
|
||||
export interface Result {
|
||||
name: 'artplayerPluginAmbilight'
|
||||
/** Start sampling; does nothing after the player is destroyed. */
|
||||
start: () => void
|
||||
/** Stop sampling while retaining the last colors. */
|
||||
stop: () => void
|
||||
}
|
||||
interface Callable {
|
||||
/** Published 1.1.0 factory shape; the options argument remains required. */
|
||||
export type Callable = (option: Option) => (art: Artplayer) => Result
|
||||
export type Factory = Callable
|
||||
/** Accurate optional invocation and CommonJS self alias, exposed by /runtime. */
|
||||
export interface RuntimeFactory {
|
||||
(option?: Option): (art: Artplayer) => Result
|
||||
/** Keep Parameters extraction identical to the published 1.1.0 signature. */
|
||||
(option: Option): (art: Artplayer) => Result
|
||||
}
|
||||
interface Factory extends Callable {
|
||||
/** Same function, including historical require(package).default calls. */
|
||||
readonly default: Factory
|
||||
readonly default: RuntimeFactory
|
||||
}
|
||||
export const artplayerPluginAmbilight: (option: Option) => (art: Artplayer) => Result
|
||||
}
|
||||
declare const artplayerPluginAmbilight: typeof artplayerPluginAmbilightDefinitions.artplayerPluginAmbilight
|
||||
declare namespace artplayerPluginAmbilight {
|
||||
export type Option = artplayerPluginAmbilightDefinitions.Option
|
||||
export type Result = artplayerPluginAmbilightDefinitions.Result
|
||||
export type Callable = artplayerPluginAmbilightDefinitions.Callable
|
||||
export type Factory = artplayerPluginAmbilightDefinitions.Factory
|
||||
export type RuntimeFactory = artplayerPluginAmbilightDefinitions.RuntimeFactory
|
||||
}
|
||||
declare const artplayerPluginAmbilight: artplayerPluginAmbilight.Factory
|
||||
export = artplayerPluginAmbilight
|
||||
export as namespace artplayerPluginAmbilight;
|
||||
Reference in new issue
Block a user