diff --git a/.idea/material_theme_project_new.xml b/.idea/material_theme_project_new.xml new file mode 100644 index 0000000..742ea13 --- /dev/null +++ b/.idea/material_theme_project_new.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/typings/bulletScreen.d.ts b/typings/bulletScreen.d.ts index d65732b..10dfc18 100644 --- a/typings/bulletScreen.d.ts +++ b/typings/bulletScreen.d.ts @@ -1,4 +1,4 @@ -import { BulletStyle, pushItem, screenElement, ScreenOpsTypes } from '@/interface/screen'; +import { AnimationPlayState, BulletStyle, pushItem, screenElement, ScreenOpsTypes } from '@/interface/screen'; declare type queueType = [pushItem, HTMLElement, (BulletStyle | undefined)]; declare class BulletScreen { target: HTMLElement; @@ -30,7 +30,7 @@ declare class BulletScreen { * @param Item */ getRenderDom(Item: pushItem): JSX.Element; - _toggleAnimateStatus: (id: string | null, status?: string) => void; + _toggleAnimateStatus: (id: string | null, status?: AnimationPlayState) => void; pause(id?: string | null): void; resume(id?: string | null): void; hide(): void; diff --git a/typings/constants/common.d.ts b/typings/constants/common.d.ts new file mode 100644 index 0000000..5b52b09 --- /dev/null +++ b/typings/constants/common.d.ts @@ -0,0 +1,9 @@ +export declare const TRACK_STATUS: { + free: string; + feed: string; + occupied: string; +}; +export declare const ANIMATION_PLAY_STATE: { + paused: string; + running: string; +}; diff --git a/typings/interface/screen.d.ts b/typings/interface/screen.d.ts index 1d2d0a7..1b1b4b8 100644 --- a/typings/interface/screen.d.ts +++ b/typings/interface/screen.d.ts @@ -29,4 +29,6 @@ interface BulletStyle { top?: string; bottom?: string; } -export type { pushItem, screenElement, ScreenOpsTypes, pushItemObj, BulletStyle, }; +declare type AnimationPlayState = 'running' | 'paused'; +declare type TrackStatus = 'idle' | 'feed' | 'running'; +export type { pushItem, screenElement, ScreenOpsTypes, pushItemObj, BulletStyle, AnimationPlayState, TrackStatus }; diff --git a/typings/src/bulletScreen.d.ts b/typings/src/bulletScreen.d.ts index d65732b..10dfc18 100644 --- a/typings/src/bulletScreen.d.ts +++ b/typings/src/bulletScreen.d.ts @@ -1,4 +1,4 @@ -import { BulletStyle, pushItem, screenElement, ScreenOpsTypes } from '@/interface/screen'; +import { AnimationPlayState, BulletStyle, pushItem, screenElement, ScreenOpsTypes } from '@/interface/screen'; declare type queueType = [pushItem, HTMLElement, (BulletStyle | undefined)]; declare class BulletScreen { target: HTMLElement; @@ -30,7 +30,7 @@ declare class BulletScreen { * @param Item */ getRenderDom(Item: pushItem): JSX.Element; - _toggleAnimateStatus: (id: string | null, status?: string) => void; + _toggleAnimateStatus: (id: string | null, status?: AnimationPlayState) => void; pause(id?: string | null): void; resume(id?: string | null): void; hide(): void; diff --git a/typings/src/constants/common.d.ts b/typings/src/constants/common.d.ts new file mode 100644 index 0000000..5b52b09 --- /dev/null +++ b/typings/src/constants/common.d.ts @@ -0,0 +1,9 @@ +export declare const TRACK_STATUS: { + free: string; + feed: string; + occupied: string; +}; +export declare const ANIMATION_PLAY_STATE: { + paused: string; + running: string; +}; diff --git a/typings/src/interface/screen.d.ts b/typings/src/interface/screen.d.ts index 1d2d0a7..1b1b4b8 100644 --- a/typings/src/interface/screen.d.ts +++ b/typings/src/interface/screen.d.ts @@ -29,4 +29,6 @@ interface BulletStyle { top?: string; bottom?: string; } -export type { pushItem, screenElement, ScreenOpsTypes, pushItemObj, BulletStyle, }; +declare type AnimationPlayState = 'running' | 'paused'; +declare type TrackStatus = 'idle' | 'feed' | 'running'; +export type { pushItem, screenElement, ScreenOpsTypes, pushItemObj, BulletStyle, AnimationPlayState, TrackStatus };