@vkontakte/videoplayer-interactive 1.0.37-dev.7b20e21e.0 → 1.0.37-dev.9bced45b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs.js +6 -6
- package/es2015.esm.js +6 -6
- package/es2018.cjs.js +6 -6
- package/es2018.esm.js +6 -6
- package/es2024.cjs.js +6 -6
- package/es2024.esm.js +6 -6
- package/esnext.cjs.js +6 -6
- package/esnext.esm.js +6 -6
- package/evergreen.esm.js +6 -6
- package/package.json +4 -4
- package/types/modules/Interactives/Interactives.d.ts +1 -0
- package/types/modules/Interactives/Layout.d.ts +4 -2
- package/types/modules/Interactives/containers/ChoiceContainer.d.ts +4 -2
- package/types/modules/Interactives/containers/Container.d.ts +3 -1
- package/types/modules/Interactives/controls/AreaControl.d.ts +1 -2
- package/types/modules/Interactives/controls/ButtonControl.d.ts +1 -2
- package/types/modules/Interactives/controls/Control.d.ts +3 -0
- package/types/modules/Interactives/controls/types.d.ts +1 -1
- package/types/modules/Interactives/index.d.ts +3 -57
- package/types/modules/Interactives/utils/ResizeManager.d.ts +2 -0
- package/types/utils/CssVarsManager.d.ts +23 -0
|
@@ -6,62 +6,8 @@ export { isLastChapter, hasEndTemplate, isOneTextCtrlContainer } from './utils/g
|
|
|
6
6
|
export type { InteractiveRange } from './utils/getInteractiveRanges';
|
|
7
7
|
export declare const utils: {
|
|
8
8
|
Container: typeof Container;
|
|
9
|
-
createChoiceContainer: (container: import("@interactiveplatform/movika-manifest").ChapterContainer, rootElement: HTMLElement, options?: import("./containers/types").ChoiceContainerOptions) => import("./containers/ChoiceContainer").ChoiceContainer | undefined;
|
|
10
|
-
createAreaControl: import("./controls").ControlCreator<import("./controls").ControlOptions,
|
|
11
|
-
|
|
12
|
-
registerEvents(): void;
|
|
13
|
-
disable(): void;
|
|
14
|
-
enable(): void;
|
|
15
|
-
getElement(): import("@vkontakte/videoplayer-shared").Nullable<HTMLElement>;
|
|
16
|
-
updateShadowStyles(isDark?: boolean): void;
|
|
17
|
-
toggleBlinkAnimation(enable?: boolean): void;
|
|
18
|
-
syncBlinkAnimation(refAnim: HTMLElement): void;
|
|
19
|
-
onBlinkHovering(): void;
|
|
20
|
-
onError(message: string | undefined, error: unknown): void;
|
|
21
|
-
onProgress(): void;
|
|
22
|
-
onResize(): void;
|
|
23
|
-
container: import("@vkontakte/videoplayer-shared").Nullable<{
|
|
24
|
-
element: HTMLElement;
|
|
25
|
-
dimensions: import("./controls").Dimensions;
|
|
26
|
-
}>;
|
|
27
|
-
controlElement: import("@vkontakte/videoplayer-shared").Nullable<HTMLElement>;
|
|
28
|
-
subscriptions: import("@vkontakte/videoplayer-shared").Subscription;
|
|
29
|
-
error$: import("@vkontakte/videoplayer-shared").Subject<import("../..").CustomError>;
|
|
30
|
-
control: import("@interactiveplatform/movika-manifest/dist/chapter-DI_7rDZW").e;
|
|
31
|
-
options?: import("./controls").Options | undefined;
|
|
32
|
-
createContainerElement(callbacks: import("./controls").Callbacks): void;
|
|
33
|
-
createClickListener(callback: AnyFn): (event: MouseEvent) => void;
|
|
34
|
-
featureIsEnabled(name: keyof import("./controls").ControlOptions["features"]): boolean | undefined;
|
|
35
|
-
setEvents(callback: import("./controls").ControlEventCallback): void;
|
|
36
|
-
removeListeners(): void;
|
|
37
|
-
}>;
|
|
38
|
-
createButtonControl: import("./controls").ControlCreator<import("./controls").ControlOptions, {
|
|
39
|
-
createView({ parentElement, callbacks }: import("./controls").ControlCreateViewParams): void;
|
|
40
|
-
registerEvents(): void;
|
|
41
|
-
disable(): void;
|
|
42
|
-
enable(): void;
|
|
43
|
-
getElement(): import("@vkontakte/videoplayer-shared").Nullable<HTMLElement>;
|
|
44
|
-
toggleBlinkAnimation(enable?: boolean): void;
|
|
45
|
-
syncBlinkAnimation(refAnim: HTMLElement): void;
|
|
46
|
-
onBlinkHovering(): void;
|
|
47
|
-
onError(message: string | undefined, error: unknown): void;
|
|
48
|
-
onProgress(): void;
|
|
49
|
-
onResize(): void;
|
|
50
|
-
updateShadowStyles(): void;
|
|
51
|
-
container: import("@vkontakte/videoplayer-shared").Nullable<{
|
|
52
|
-
element: HTMLElement;
|
|
53
|
-
dimensions: import("./controls").Dimensions;
|
|
54
|
-
}>;
|
|
55
|
-
controlElement: import("@vkontakte/videoplayer-shared").Nullable<HTMLElement>;
|
|
56
|
-
subscriptions: import("@vkontakte/videoplayer-shared").Subscription;
|
|
57
|
-
error$: import("@vkontakte/videoplayer-shared").Subject<import("../..").CustomError>;
|
|
58
|
-
control: import("@interactiveplatform/movika-manifest/dist/chapter-DI_7rDZW").e;
|
|
59
|
-
options?: import("./controls").Options | undefined;
|
|
60
|
-
createContainerElement(callbacks: import("./controls").Callbacks): void;
|
|
61
|
-
createClickListener(callback: AnyFn): (event: MouseEvent) => void;
|
|
62
|
-
featureIsEnabled(name: keyof import("./controls").ControlOptions["features"]): boolean | undefined;
|
|
63
|
-
setEvents(callback: import("./controls").ControlEventCallback): void;
|
|
64
|
-
removeListeners(): void;
|
|
65
|
-
}>;
|
|
9
|
+
createChoiceContainer: (container: import("@interactiveplatform/movika-manifest").ChapterContainer, rootElement: HTMLElement, cssVarsManager: import("../../utils/CssVarsManager").CssVarsManager, options?: import("./containers/types").ChoiceContainerOptions) => import("./containers/ChoiceContainer").ChoiceContainer | undefined;
|
|
10
|
+
createAreaControl: import("./controls").ControlCreator<import("./controls").ControlOptions, import("./controls").AreaControl>;
|
|
11
|
+
createButtonControl: import("./controls").ControlCreator<import("./controls").ControlOptions, import("./controls").ButtonControl>;
|
|
66
12
|
classnamesPrefix: string;
|
|
67
13
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { IPlayer } from '@vkontakte/videoplayer-core';
|
|
2
2
|
import { Nullable } from '@vkontakte/videoplayer-shared';
|
|
3
|
+
import { CssVarsManager } from '../../../utils/CssVarsManager';
|
|
3
4
|
type ResizeManagerArg = () => {
|
|
4
5
|
parentElement: HTMLElement;
|
|
6
|
+
cssVarsManager: CssVarsManager;
|
|
5
7
|
player?: Nullable<IPlayer>;
|
|
6
8
|
fns?: AnyFn[];
|
|
7
9
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare class CssVarsManager {
|
|
2
|
+
rootElement: HTMLElement;
|
|
3
|
+
private readonly isCssVarsSupported;
|
|
4
|
+
private rootElementProps;
|
|
5
|
+
constructor(rootElement: HTMLElement);
|
|
6
|
+
private static checkCssVarsSupport;
|
|
7
|
+
/**
|
|
8
|
+
* Возвращает значение CSS-переменной или фолбэк из JS.
|
|
9
|
+
*/
|
|
10
|
+
getPropValue(propKey: string): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Применяет несколько свойств
|
|
13
|
+
*/
|
|
14
|
+
setup(props: Record<string, string>): void;
|
|
15
|
+
/**
|
|
16
|
+
* Удаляет все сохранённые переменные со стилевого элемента
|
|
17
|
+
*/
|
|
18
|
+
cleanup(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Применяет одну переменную
|
|
21
|
+
*/
|
|
22
|
+
setProp(key: string, value: string): void;
|
|
23
|
+
}
|