@vkontakte/videoplayer-interactive 1.0.60-dev.74465ac5.0 → 1.0.60-dev.7be47b47.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/esnext.esm.js +6 -6
- package/package.json +4 -4
- package/types/index.d.ts +9 -8
- package/types/manifest/index.d.ts +3 -3
- package/types/manifest/utils.d.ts +33 -32
- package/types/modules/Graph/Graph.d.ts +47 -46
- package/types/modules/Graph/index.d.ts +1 -1
- package/types/modules/Interactives/Interactives.d.ts +138 -135
- package/types/modules/Interactives/Layout.d.ts +11 -11
- package/types/modules/Interactives/containers/ChoiceContainer.d.ts +31 -31
- package/types/modules/Interactives/containers/Container.d.ts +19 -19
- package/types/modules/Interactives/containers/index.d.ts +4 -4
- package/types/modules/Interactives/containers/types.d.ts +6 -6
- package/types/modules/Interactives/containers/utils.d.ts +3 -3
- package/types/modules/Interactives/controls/AreaControl.d.ts +17 -16
- package/types/modules/Interactives/controls/ButtonControl.d.ts +21 -20
- package/types/modules/Interactives/controls/Control.d.ts +42 -41
- package/types/modules/Interactives/controls/TextControl.d.ts +14 -13
- package/types/modules/Interactives/controls/index.d.ts +6 -6
- package/types/modules/Interactives/controls/types.d.ts +22 -19
- package/types/modules/Interactives/controls/utils.d.ts +10 -10
- package/types/modules/Interactives/index.d.ts +14 -95
- package/types/modules/Interactives/styles/index.d.ts +1 -1
- package/types/modules/Interactives/types.d.ts +64 -64
- package/types/modules/Interactives/utils/BlinkAnimationRef.d.ts +10 -10
- package/types/modules/Interactives/utils/ControlFillAnimation/ControlFillAnimation.d.ts +30 -30
- package/types/modules/Interactives/utils/ControlFillAnimation/index.d.ts +1 -1
- package/types/modules/Interactives/utils/ControlFillAnimation/utils.d.ts +9 -9
- package/types/modules/Interactives/utils/ControlTap/ControlTap.d.ts +12 -12
- package/types/modules/Interactives/utils/ControlTap/index.d.ts +1 -1
- package/types/modules/Interactives/utils/ControlTap/utils.d.ts +3 -3
- package/types/modules/Interactives/utils/GameController.d.ts +66 -66
- package/types/modules/Interactives/utils/GroupsStack.d.ts +18 -20
- package/types/modules/Interactives/utils/HistoryController.d.ts +39 -40
- package/types/modules/Interactives/utils/InteractiveEvents.d.ts +30 -29
- package/types/modules/Interactives/utils/ResizeManager.d.ts +10 -10
- package/types/modules/Interactives/utils/SelectBranches.d.ts +15 -15
- package/types/modules/Interactives/utils/SelectBranches.types.d.ts +53 -53
- package/types/modules/Interactives/utils/angleUtils.d.ts +13 -13
- package/types/modules/Interactives/utils/createControlText.d.ts +2 -2
- package/types/modules/Interactives/utils/emitOnError.d.ts +10 -10
- package/types/modules/Interactives/utils/events.d.ts +67 -67
- package/types/modules/Interactives/utils/events.types.d.ts +35 -32
- package/types/modules/Interactives/utils/fallbackStrategies.d.ts +15 -14
- package/types/modules/Interactives/utils/functionUtils.d.ts +9 -2
- package/types/modules/Interactives/utils/gameUtils.d.ts +22 -21
- package/types/modules/Interactives/utils/getInteractiveRanges.d.ts +5 -5
- package/types/modules/Interactives/utils/renderingUtils.d.ts +48 -53
- package/types/modules/Loaders/index.d.ts +1 -1
- package/types/modules/Loaders/movikaProjectIdLoader/index.d.ts +1 -1
- package/types/modules/Loaders/vkVideoLoader/CustomVkVideoLoader.d.ts +8 -8
- package/types/modules/Loaders/vkVideoLoader/index.d.ts +1 -1
- package/types/modules/Loaders/vkVideoLoader/types.d.ts +231 -231
- package/types/modules/Loaders/vkVideoLoader/utils.d.ts +1 -1
- package/types/modules/ManifestController/Loadable.d.ts +5 -5
- package/types/modules/ManifestController/ManifestController.d.ts +29 -29
- package/types/modules/ManifestController/index.d.ts +1 -1
- package/types/modules/ManifestController/utils.d.ts +6 -6
- package/types/modules/SeamlessController/InstanceManager.d.ts +10 -10
- package/types/modules/SeamlessController/SeamlessController.d.ts +30 -27
- package/types/modules/SeamlessController/utils.d.ts +6 -6
- package/types/modules/SeekToInteractiveController/SeekToInteractiveController.d.ts +8 -8
- package/types/modules/SeekToInteractiveController/index.d.ts +1 -1
- package/types/types/CustomError.d.ts +9 -9
- package/types/types/index.d.ts +2 -2
- package/types/utils/CssVarsManager.d.ts +21 -21
- package/types/utils/Error.d.ts +6 -6
- package/types/utils/EventEmitter.d.ts +10 -10
- package/types/utils/LastFrame.d.ts +29 -29
- package/types/utils/LastFrameCanvasAPI.d.ts +17 -17
- package/types/utils/MultiMap.d.ts +8 -8
- package/types/utils/Raf.d.ts +11 -11
- package/types/utils/chapterHelpers.d.ts +1 -1
- package/types/utils/compareVersions.d.ts +12 -12
- package/types/utils/extractVkMovieId.d.ts +1 -1
- package/types/utils/getVideoContentSize.d.ts +3 -3
- package/types/utils/hexToRgb.d.ts +2 -2
- package/types/utils/throttle.d.ts +1 -1
- package/types/utils/typeCheck.d.ts +7 -7
- package/es2015.cjs +0 -285
- package/es2015.esm.js +0 -285
- package/es2018.cjs +0 -285
- package/es2018.esm.js +0 -285
- package/es2024.cjs +0 -285
- package/es2024.esm.js +0 -285
- package/esnext.cjs +0 -285
- package/evergreen.esm.js +0 -285
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { type Control, type Chapter, type ChapterContainer } from
|
|
2
|
-
import type { GameController } from
|
|
3
|
-
import type { IgnoreExpectState } from
|
|
1
|
+
import { type Control, type Chapter, type ChapterContainer } from "../../../manifest";
|
|
2
|
+
import type { GameController } from "./GameController";
|
|
3
|
+
import type { IgnoreExpectState } from "../types";
|
|
4
4
|
export declare enum GameStates {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
nothing = 0,
|
|
6
|
+
beforeInteractive = 1,
|
|
7
|
+
interactive = 2,
|
|
8
|
+
afterInteractive = 3,
|
|
9
|
+
end = 4,
|
|
10
|
+
removed = 5,
|
|
11
|
+
destroyed = 6
|
|
12
12
|
}
|
|
13
13
|
export declare const isControlsExist: (controls: Control[]) => boolean;
|
|
14
14
|
export declare const isLastChapter: (chapter: Chapter) => boolean;
|
|
@@ -16,26 +16,27 @@ export declare const hasEndTemplate: (chapter: Chapter) => boolean;
|
|
|
16
16
|
export declare const isBeforeStartTime: (currentTime: number, container: ChapterContainer) => boolean;
|
|
17
17
|
export declare const isInteractiveTime: (currentTime: number, container: ChapterContainer) => boolean;
|
|
18
18
|
export declare const isAfterInteractiveTime: (currentTime: number, container: ChapterContainer) => boolean;
|
|
19
|
-
type AnyEvent = (ChapterContainer | Chapter | Control)[
|
|
19
|
+
type AnyEvent = (ChapterContainer | Chapter | Control)["events"];
|
|
20
|
+
type ExtractItemFromArray<T> = T extends (infer U)[] ? U : never;
|
|
20
21
|
export declare const isExpectEvent: (events?: AnyEvent) => boolean;
|
|
21
|
-
export declare const getExpectEvent: (events?: AnyEvent) =>
|
|
22
|
+
export declare const getExpectEvent: (events?: AnyEvent) => ExtractItemFromArray<AnyEvent> | undefined;
|
|
22
23
|
export declare const isOneCtrlOneContainer: (controls: Control[]) => boolean;
|
|
23
24
|
export declare const isOneTextCtrlContainer: (controls: Control[]) => boolean;
|
|
24
25
|
export declare function excludeTextControl(containers?: ChapterContainer[]): ChapterContainer[];
|
|
25
26
|
export declare const isEOVEndTime: (target: HTMLVideoElement, endTime: ChapterContainer["endTime"]) => boolean;
|
|
26
27
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
* @param {GameController[]} [gameControllers=[]] список контрллеров
|
|
29
|
+
* @param {(number | null | undefined)} [expectTime=Infinity] expectTime = endTime - какой expectTime мы ищем
|
|
30
|
+
* @param {string[]} [ignoreIds=[]] какие контейнеры игнорировать
|
|
31
|
+
*/
|
|
31
32
|
export declare function getGameControllerContainersWithExpect(gameControllers?: GameController[], expectTime?: number | null | undefined, ignoreIds?: string[]): GameController[];
|
|
32
33
|
type ExecForAllExpectContainersParamsType = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
gameControllers: GameController[];
|
|
35
|
+
subjectName: string;
|
|
36
|
+
subjectId: string;
|
|
37
|
+
execFn: (gameController: GameController) => void;
|
|
37
38
|
};
|
|
38
|
-
export declare function execForAllExpectContainers({ gameControllers, subjectName, subjectId, execFn
|
|
39
|
+
export declare function execForAllExpectContainers({ gameControllers, subjectName, subjectId, execFn }: ExecForAllExpectContainersParamsType): void;
|
|
39
40
|
export declare function isControlHasOpenURIEvent(control: Control): boolean;
|
|
40
41
|
export declare const evaluateContainerEventStatus: (container: ChapterContainer, gameControllers: GameController[]) => IgnoreExpectState;
|
|
41
42
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type Container } from
|
|
1
|
+
import { type Container } from "../../../manifest";
|
|
2
2
|
export type Subject = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
id: string;
|
|
4
|
+
isRemoved: boolean;
|
|
5
5
|
};
|
|
6
6
|
export type InteractiveRange = {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
subjects: Subject[];
|
|
8
|
+
range: [number, number];
|
|
9
9
|
};
|
|
10
10
|
export type InteractiveRanges = Array<InteractiveRange>;
|
|
11
11
|
export declare const getInteractiveRanges: (containers?: Container[]) => InteractiveRanges;
|
|
@@ -1,80 +1,75 @@
|
|
|
1
|
-
import { type Control } from
|
|
2
|
-
import { type Dimensions } from
|
|
1
|
+
import { type Control } from "../../../manifest";
|
|
2
|
+
import { type Dimensions } from "../controls";
|
|
3
3
|
export declare const classnamesPrefix = "interactive";
|
|
4
4
|
export declare const controlStylesFallbacks: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
textColor: string;
|
|
6
|
+
textSize: number;
|
|
7
|
+
textContent: string;
|
|
8
|
+
roundCorners: number;
|
|
9
|
+
borderWidth: number;
|
|
10
|
+
borderWidthRawValue: string;
|
|
11
|
+
roundCornersRawValue: string;
|
|
12
|
+
borderColor: string;
|
|
13
|
+
borderAlpha: number;
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
backgroundAlpha: number;
|
|
16
|
+
innerSizesDependOn: string;
|
|
17
|
+
angle: number;
|
|
18
|
+
shadowColorLight: string;
|
|
19
|
+
shadowColorDark: string;
|
|
20
|
+
shadowColorAlpha: number;
|
|
21
21
|
};
|
|
22
22
|
type ControlStylesFallbacks = typeof controlStylesFallbacks;
|
|
23
23
|
export declare enum ALIGN_ITEMS {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
top = "flex-start",
|
|
25
|
+
bottom = "flex-end",
|
|
26
|
+
center = "center"
|
|
27
27
|
}
|
|
28
28
|
export declare enum JUSTIFY_CONTENT {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
export declare enum TEXT_ALIGN {
|
|
34
|
-
start = "left",
|
|
35
|
-
end = "right",
|
|
36
|
-
center = "center"
|
|
29
|
+
start = "flex-start",
|
|
30
|
+
end = "flex-end",
|
|
31
|
+
center = "center"
|
|
37
32
|
}
|
|
38
33
|
export type SetTextPositionStylesProps = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
target: HTMLElement;
|
|
35
|
+
props: Control["props"]["text"] & {
|
|
36
|
+
alignment: Control["layoutParams"]["alignment"];
|
|
37
|
+
};
|
|
43
38
|
};
|
|
44
39
|
export declare const setTextPositionStyles: ({ target, props }: SetTextPositionStylesProps) => void;
|
|
45
40
|
type SetTextStylesProps = {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
target: HTMLElement;
|
|
42
|
+
props: Control["props"];
|
|
43
|
+
fallback: ControlStylesFallbacks;
|
|
44
|
+
dependsOn: Dimensions;
|
|
50
45
|
};
|
|
51
46
|
export declare const setTextStyles: ({ target, props, fallback, dependsOn }: SetTextStylesProps) => void;
|
|
52
47
|
type SetBackgroundStylesProps = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
target: HTMLElement;
|
|
49
|
+
props: Control["props"];
|
|
50
|
+
fallback: ControlStylesFallbacks;
|
|
56
51
|
};
|
|
57
52
|
export declare const setBackgroundStyles: ({ target, props, fallback }: SetBackgroundStylesProps) => void;
|
|
58
53
|
type SetBorderStylesProps = {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
target: HTMLElement;
|
|
55
|
+
props: Control["props"];
|
|
56
|
+
fallback: ControlStylesFallbacks;
|
|
57
|
+
dependsOn: Dimensions;
|
|
58
|
+
useRawValues?: boolean;
|
|
64
59
|
};
|
|
65
60
|
export declare const setBorderStyles: ({ target, props, fallback, dependsOn, useRawValues }: SetBorderStylesProps) => void;
|
|
66
61
|
type SetShadowStylesProps = {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
target: HTMLElement;
|
|
63
|
+
props?: Control["props"];
|
|
64
|
+
fallback: ControlStylesFallbacks;
|
|
65
|
+
isDark: boolean;
|
|
66
|
+
baseDimension: string;
|
|
72
67
|
};
|
|
73
68
|
export declare const setShadowStyles: ({ target, isDark, baseDimension, fallback }: SetShadowStylesProps) => void;
|
|
74
69
|
type SetAngleProps = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
target: HTMLElement;
|
|
71
|
+
fallback: ControlStylesFallbacks;
|
|
72
|
+
layoutParams: Control["layoutParams"];
|
|
78
73
|
};
|
|
79
74
|
export declare const setAngle: ({ target, layoutParams, fallback }: SetAngleProps) => void;
|
|
80
75
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { movikaProjectIdLoader } from
|
|
1
|
+
export { movikaProjectIdLoader } from "./movikaProjectIdLoader";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { movikaProjectIdLoader } from
|
|
1
|
+
export { movikaProjectIdLoader } from "./movikaProjectIdLoader";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { GetVKVideoParams, VKVideoLoaderInterface } from
|
|
1
|
+
import type { GetVKVideoParams, VKVideoLoaderInterface } from "./types";
|
|
2
2
|
export declare class CustomVkVideoLoader implements VKVideoLoaderInterface {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
private _requestData;
|
|
4
|
+
private _mediaMap;
|
|
5
|
+
private _abortController;
|
|
6
|
+
constructor(options: GetVKVideoParams);
|
|
7
|
+
resolve({ actions, result, errors, ...args }: Record<string, any>): Promise<Promise<Record<string, any>>>;
|
|
8
|
+
private _transform;
|
|
9
|
+
private _send;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CustomVkVideoLoader } from
|
|
1
|
+
export { CustomVkVideoLoader } from "./CustomVkVideoLoader";
|