@vkontakte/videoplayer-interactive 1.0.41-dev.c6edef47.0 → 1.0.41-dev.d6af6ca9.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.
@@ -6,7 +6,7 @@ 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;
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
10
  createAreaControl: import("./controls").ControlCreator<import("./controls").ControlOptions, {
11
11
  createView({ parentElement, callbacks }: import("./controls").ControlCreateViewParams): void;
12
12
  registerBlinkAnimationEvents(): void;
@@ -32,8 +32,10 @@ export declare const utils: {
32
32
  controlTap?: import("./utils/ControlTap").ControlTap;
33
33
  isInteracted: boolean;
34
34
  isRemoved: boolean;
35
+ cssVarsManager: import("@vkontakte/videoplayer-shared").Nullable<import("../../utils/CssVarsManager").CssVarsManager>;
35
36
  control: import("@interactiveplatform/movika-manifest/dist/chapter-DI_7rDZW").e;
36
37
  options?: import("./controls").Options | undefined;
38
+ setCssVarsManager(cssVarsManager: import("../../utils/CssVarsManager").CssVarsManager): void;
37
39
  onControlSelect: () => void;
38
40
  removeView(withTransition?: boolean): void;
39
41
  onTransitionEnd: (event: TransitionEvent) => void;
@@ -74,8 +76,10 @@ export declare const utils: {
74
76
  controlTap?: import("./utils/ControlTap").ControlTap;
75
77
  isInteracted: boolean;
76
78
  isRemoved: boolean;
79
+ cssVarsManager: import("@vkontakte/videoplayer-shared").Nullable<import("../../utils/CssVarsManager").CssVarsManager>;
77
80
  control: import("@interactiveplatform/movika-manifest/dist/chapter-DI_7rDZW").e;
78
81
  options?: import("./controls").Options | undefined;
82
+ setCssVarsManager(cssVarsManager: import("../../utils/CssVarsManager").CssVarsManager): void;
79
83
  onControlSelect: () => void;
80
84
  removeView(withTransition?: boolean): void;
81
85
  onTransitionEnd: (event: TransitionEvent) => void;
@@ -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
+ }