@vkontakte/videoplayer-interactive 1.0.30-dev.9aa27113.0 → 1.0.30-dev.b736679d.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.
Files changed (34) hide show
  1. package/es2015.cjs.js +233 -5
  2. package/es2015.esm.js +234 -6
  3. package/es2018.cjs.js +234 -6
  4. package/es2018.esm.js +233 -5
  5. package/esnext.cjs.js +234 -6
  6. package/esnext.esm.js +234 -6
  7. package/evergreen.esm.js +234 -6
  8. package/package.json +4 -4
  9. package/types/modules/Interactives/Interactives.d.ts +19 -8
  10. package/types/modules/Interactives/Layout.d.ts +4 -0
  11. package/types/modules/Interactives/containers/ChoiceContainer.d.ts +16 -6
  12. package/types/modules/Interactives/containers/Container.d.ts +9 -6
  13. package/types/modules/Interactives/controls/AreaControl.d.ts +22 -2
  14. package/types/modules/Interactives/controls/ButtonControl.d.ts +27 -2
  15. package/types/modules/Interactives/controls/Control.d.ts +22 -9
  16. package/types/modules/Interactives/controls/types.d.ts +21 -7
  17. package/types/modules/Interactives/index.d.ts +69 -4
  18. package/types/modules/Interactives/styles.d.ts +1 -0
  19. package/types/modules/Interactives/types.d.ts +12 -4
  20. package/types/modules/Interactives/utils/BlinkAnimationReference.d.ts +2 -0
  21. package/types/modules/Interactives/utils/FillAnimation.d.ts +30 -0
  22. package/types/modules/Interactives/utils/GameController.d.ts +14 -6
  23. package/types/modules/Interactives/utils/InteractiveEvents.d.ts +2 -2
  24. package/types/modules/Interactives/utils/SelectBranches.d.ts +2 -1
  25. package/types/modules/Interactives/utils/SelectBranches.types.d.ts +1 -0
  26. package/types/modules/Interactives/utils/TapElement.d.ts +10 -0
  27. package/types/modules/Interactives/utils/events.types.d.ts +3 -1
  28. package/types/modules/Interactives/utils/renderingUtils.d.ts +15 -3
  29. package/types/utils/AverageColor/FrameAverageColor.d.ts +19 -0
  30. package/types/utils/AverageColor/helpers.d.ts +17 -0
  31. package/types/utils/AverageColor/index.d.ts +2 -0
  32. package/types/utils/getVideoContentSize.d.ts +1 -1
  33. package/types/utils/Binding.d.ts +0 -34
  34. package/types/utils/EventManager.d.ts +0 -13
@@ -0,0 +1,17 @@
1
+ export type Color = [number, number, number, number];
2
+ export type Options = {
3
+ width: number;
4
+ height: number;
5
+ step?: number;
6
+ defaultColor?: Color;
7
+ debug?: boolean;
8
+ };
9
+ export declare function makeCanvas(): OffscreenCanvas | HTMLCanvasElement | null;
10
+ export declare function isDark(color: Color): boolean;
11
+ export declare const DEFAULT_COLOR: Color;
12
+ export declare const DEFAULT_STEP = 1;
13
+ export declare function getError(message: string): Error;
14
+ export declare function getVideoContentSize(element: HTMLElement): {
15
+ width: number;
16
+ height: number;
17
+ };
@@ -0,0 +1,2 @@
1
+ export { FrameAverageColor } from './FrameAverageColor';
2
+ export { getVideoContentSize } from './helpers';
@@ -1,5 +1,5 @@
1
1
  import type { IPlayer } from '@vkontakte/videoplayer-core';
2
- export declare const getVideoContentSize: (containerEl: Element, player: IPlayer) => {
2
+ export declare const getVideoContentSize: (player: IPlayer) => {
3
3
  videoContentHeight: number;
4
4
  videoContentWidth: number;
5
5
  };
@@ -1,34 +0,0 @@
1
- import type { Nullable } from '@vkontakte/videoplayer-shared';
2
- import type { HtmlEventType } from '../types';
3
- type OptionsType = undefined | boolean | AddEventListenerOptions;
4
- export declare class Binding {
5
- target: Nullable<Element>;
6
- type: Nullable<HtmlEventType>;
7
- listener: Nullable<EventListener>;
8
- options: Nullable<OptionsType>;
9
- /**
10
- * passive = true -> function never call preventDefault()
11
- */
12
- constructor(target: Element, type: HtmlEventType, listener: EventListener, options: OptionsType);
13
- /**
14
- * Detaches the event listener from the event target. This does nothing if
15
- * the event listener is already detached.
16
- */
17
- unlisten(): void;
18
- /**
19
- * Converts the provided options value into a value accepted by the browser.
20
- * Some browsers (e.g. Tizen) don't support passing options as an
21
- * object. So this detects this case and converts it.
22
- */
23
- private static _convertOptions;
24
- /**
25
- * Checks whether the browser supports passing objects as the third argument
26
- * to addEventListener. This caches the result value in a static field to
27
- * avoid a bunch of checks.
28
- *
29
- * See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
30
- */
31
- private static _supportsObject;
32
- private static _doesSupportObject;
33
- }
34
- export {};
@@ -1,13 +0,0 @@
1
- import { Binding } from './Binding';
2
- import { MultiMap } from './MultiMap';
3
- import type { HtmlEventType } from '../types';
4
- type OptionsType = boolean | AddEventListenerOptions;
5
- export declare class EventManager {
6
- bindingMap: MultiMap<Binding> | null;
7
- release(): void;
8
- listen(target: Element, type: HtmlEventType, listener: EventListener, options?: OptionsType): void;
9
- listenOnce(target: Element, type: HtmlEventType, listener: EventListener, options?: OptionsType): void;
10
- unlisten(target: Element, type: HtmlEventType, listener: EventListener): void;
11
- removeAll(): void;
12
- }
13
- export {};