@vkontakte/videoplayer-interactive 1.0.19-dev.d432d6cd.0 → 1.0.19-dev.d6f5a76a.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 (56) hide show
  1. package/es2015.cjs.js +6 -6
  2. package/es2015.esm.js +6 -6
  3. package/es2018.cjs.js +6 -6
  4. package/es2018.esm.js +6 -6
  5. package/esnext.cjs.js +6 -6
  6. package/esnext.esm.js +6 -6
  7. package/evergreen.esm.js +6 -6
  8. package/package.json +5 -5
  9. package/types/index.d.ts +3 -2
  10. package/types/modules/Graph/Graph.d.ts +2 -2
  11. package/types/modules/Interactives/Interactives.d.ts +18 -14
  12. package/types/modules/Interactives/Layout.d.ts +7 -7
  13. package/types/modules/Interactives/controls/Control.d.ts +4 -3
  14. package/types/modules/Interactives/controls/types.d.ts +5 -4
  15. package/types/modules/Interactives/index.d.ts +1 -1
  16. package/types/modules/Interactives/types.d.ts +5 -0
  17. package/types/modules/Interactives/utils/GameController.d.ts +19 -36
  18. package/types/modules/Interactives/utils/GroupsStack.d.ts +21 -31
  19. package/types/modules/Interactives/utils/HistoryController.d.ts +13 -3
  20. package/types/modules/Interactives/utils/InteractiveEvents.d.ts +10 -16
  21. package/types/modules/Interactives/utils/ResizeManager.d.ts +1 -8
  22. package/types/modules/Interactives/utils/SelectBranches.d.ts +51 -15
  23. package/types/modules/Interactives/utils/fallbackStrategies.d.ts +6 -23
  24. package/types/modules/Interactives/utils/gameUtils.d.ts +26 -28
  25. package/types/modules/Interactives/utils/getInteractiveRanges.d.ts +1 -1
  26. package/types/modules/Interactives/utils/renderingUtils.d.ts +59 -64
  27. package/types/modules/Loaders/vkVideoLoader/types.d.ts +2 -2
  28. package/types/modules/Loaders/vkVideoLoader/utils.d.ts +1 -1
  29. package/types/modules/ManifestController/ManifestController.d.ts +12 -11
  30. package/types/modules/ManifestController/utils.d.ts +6 -6
  31. package/types/modules/SeamlessController/SeamlessController.d.ts +2 -2
  32. package/types/modules/SeamlessController/utils.d.ts +2 -2
  33. package/types/modules/SeekToInteractiveController/SeekToInteractiveController.d.ts +2 -2
  34. package/types/movika.core/manifest/index.d.ts +24 -0
  35. package/types/movika.core/manifest/manifest_3_2/chapter.d.ts +62 -0
  36. package/types/movika.core/manifest/manifest_3_2/control.d.ts +67 -0
  37. package/types/movika.core/manifest/manifest_3_2/manifest.d.ts +50 -0
  38. package/types/movika.core/manifest/manifest_3_2/template.d.ts +34 -0
  39. package/types/movika.core/manifest/manifest_3_3/chapter.d.ts +70 -0
  40. package/types/movika.core/manifest/manifest_3_3/control.d.ts +66 -0
  41. package/types/movika.core/manifest/manifest_3_3/graph.d.ts +73 -0
  42. package/types/movika.core/manifest/manifest_3_3/manifest.d.ts +52 -0
  43. package/types/movika.core/manifest/manifest_3_3/template.d.ts +34 -0
  44. package/types/movika.core/manifest/migrations/index.d.ts +1 -0
  45. package/types/movika.core/manifest/migrations/migrateManifestToLatestVersion.d.ts +1 -0
  46. package/types/movika.core/manifest/migrations/migrate_from_3_0_to_3_1.d.ts +21 -0
  47. package/types/movika.core/manifest/migrations/migrate_from_3_1_to_3_2.d.ts +2 -0
  48. package/types/movika.core/manifest/migrations/migrate_from_3_2_to_3_3.d.ts +8 -0
  49. package/types/movika.core/manifest/types.d.ts +29 -0
  50. package/types/movika.core/manifest/utils.d.ts +5 -0
  51. package/types/utils/LastFrame.d.ts +1 -1
  52. package/types/utils/chapterHelpers.d.ts +1 -1
  53. package/types/utils/extractVkMovieId.d.ts +1 -1
  54. package/types/manifest/index.d.ts +0 -3
  55. package/types/manifest/utils.d.ts +0 -11
  56. package/types/modules/Interactives/utils/SelectBranches.types.d.ts +0 -73
@@ -1,49 +1,32 @@
1
- import { type ISubscription, type IValueSubject } from '@vkontakte/videoplayer-shared';
2
- import { type IPlayer } from '@vkontakte/videoplayer-core';
3
- import type { InteractiveEventsType } from './InteractiveEvents';
4
- import type { ChapterBranch, ChapterContainer } from '../../../manifest';
5
- import type { EventEmitter } from '../../../utils/EventEmitter';
6
- import { SelectBranches } from './SelectBranches';
7
- import { GameStates } from './gameUtils';
8
- type Container = {
9
- container: ChapterContainer;
10
- getElement: () => HTMLElement;
11
- disable: () => void;
12
- enable: () => void;
13
- hide: () => void;
14
- show: () => void;
15
- createView: AnyFn;
16
- removeView: () => void;
17
- isDisabled: boolean;
18
- isRemoved: boolean;
19
- };
20
- export declare class GameController {
21
- container: Container;
22
- branches: ChapterBranch[];
23
- selectBranches: ReturnType<typeof SelectBranches>;
24
- subscription: ISubscription;
25
- player: IPlayer;
26
- interactiveEvents: InteractiveEventsType;
27
- ignoreContainerEvent: () => boolean;
28
- isPermanentText: boolean;
29
- disabledControls$: IValueSubject<boolean>;
30
- onRemove: () => void;
31
- globalEventEmitter: EventEmitter;
32
- gameState: GameStates;
33
- isSelectedControlEvent: boolean;
34
- isSelectedContainerEvent: boolean;
35
- constructor({ player, container, branches, selectBranches, interactiveEvents, globalEventEmitter, ignoreContainerEvent, permanentTextControls, disabledControls$, onRemove, }: {
1
+ export class GameController {
2
+ constructor({ player, container, branches, selectBranches, interactiveEvents, globalEvents, globalEventEmitter, ignoreContainerEvent, permanentTextControls, disabledControls$, onRemove, }: {
36
3
  player: any;
37
4
  container: any;
38
5
  branches: any;
39
6
  selectBranches: any;
40
7
  interactiveEvents: any;
8
+ globalEvents: any;
41
9
  globalEventEmitter: any;
42
10
  ignoreContainerEvent: any;
43
11
  permanentTextControls: any;
44
12
  disabledControls$: any;
45
13
  onRemove: any;
46
14
  });
15
+ container: any;
16
+ branches: any;
17
+ selectBranches: any;
18
+ subscription: Subscription;
19
+ player: any;
20
+ interactiveEvents: any;
21
+ ignoreContainerEvent: any;
22
+ isPermanentText: any;
23
+ disabledControls$: any;
24
+ onRemove: any;
25
+ globalEventEmitter: any;
26
+ globalEvents: any;
27
+ gameState: 0;
28
+ isSelectedControlEvent: boolean;
29
+ isSelectedContainerEvent: boolean;
47
30
  registerEvents(): void;
48
31
  hide: () => void;
49
32
  show: () => void;
@@ -57,4 +40,4 @@ export declare class GameController {
57
40
  removeView(): void;
58
41
  destroy(): void;
59
42
  }
60
- export {};
43
+ import { Subscription } from '@vkontakte/videoplayer-shared';
@@ -1,32 +1,22 @@
1
- import type { EventActionKeys } from '../../../manifest';
2
- export type TPriority = 'chapter' | 'container' | 'control';
3
- export type TPayload = {
4
- actionType: EventActionKeys;
5
- action: AnyFn;
1
+ export function GroupsStack(): {
2
+ map: {};
3
+ remove: ({ timestamp, priority, initiator }: {
4
+ timestamp: any;
5
+ priority: any;
6
+ initiator: any;
7
+ }) => boolean | undefined;
8
+ add: ({ timestamp, priority, initiator, ...rest }: {
9
+ [x: string]: any;
10
+ timestamp: any;
11
+ priority: any;
12
+ initiator: any;
13
+ }) => void;
14
+ removeAll: () => boolean;
15
+ get: ({ timestamp, priority, initiator }: {
16
+ timestamp: any;
17
+ priority: any;
18
+ initiator: any;
19
+ }) => any;
20
+ getLte: (timestamp: any) => {};
21
+ getGte: (timestamp: any) => {};
6
22
  };
7
- export type TMapInitiator = {
8
- [initiator: string]: TPayload[];
9
- };
10
- type TMapPriority = {
11
- [priority in TPriority]?: TMapInitiator;
12
- };
13
- type TMap = {
14
- [timestamp: number]: TMapPriority;
15
- };
16
- export type TMapFlattened = {
17
- timestamp: number;
18
- priority: TPriority;
19
- initiator: string;
20
- } & TPayload;
21
- type GetAndRemoveArgType = Partial<Omit<TMapFlattened, keyof TPayload>> & Pick<TMapFlattened, 'timestamp'>;
22
- export type TGroupsStack = ReturnType<typeof GroupsStack>;
23
- export declare function GroupsStack(): {
24
- map: TMap;
25
- remove: ({ timestamp, priority, initiator }: GetAndRemoveArgType) => boolean;
26
- add: ({ timestamp, priority, initiator, ...rest }: TMapFlattened) => void;
27
- removeAll: () => void;
28
- get: ({ timestamp, priority, initiator }: GetAndRemoveArgType) => TMapInitiator | TPayload[] | TMapPriority | null;
29
- getLte: (timestamp: number) => TMap;
30
- getGte: (timestamp: number) => TMap;
31
- };
32
- export {};
@@ -1,8 +1,9 @@
1
- import { Nullable } from '@vkontakte/videoplayer-shared';
1
+ import { Nullable, Subject } from '@vkontakte/videoplayer-shared';
2
2
  import type { IValueSubject } from '@vkontakte/videoplayer-shared';
3
3
  import { EventEmitter } from '../../../utils/EventEmitter';
4
- import type { VideoId } from '../../../manifest';
5
- import type { Interactives } from '../../../modules/Interactives';
4
+ import type { VideoId } from '../../../movika.core/manifest';
5
+ import type { Interactives, VideoInfo } from '../../../modules/Interactives';
6
+ import { CustomError } from '../../../utils/Error';
6
7
  export interface HistoryApi {
7
8
  get: (rawId: string) => Promise<number[]>;
8
9
  save: (rawId: string, videoIds: number[]) => Promise<void>;
@@ -25,9 +26,18 @@ export interface HistoryControllerState {
25
26
  isInitialChapter$: IValueSubject<boolean>;
26
27
  isGoBackLimited$: IValueSubject<boolean>;
27
28
  }
29
+ interface HistoryInitedEventData {
30
+ initChapterId: string;
31
+ videosInfo?: VideoInfo[];
32
+ }
28
33
  export default class HistoryController {
29
34
  #private;
30
35
  state: HistoryControllerState;
36
+ events: {
37
+ inited$: Subject<HistoryInitedEventData>;
38
+ destroyed$: Subject<void>;
39
+ error$: Subject<CustomError>;
40
+ };
31
41
  constructor({ globalEventEmitter, videoId, interactiveController, historyApi, settings }: HistoryControllerParams);
32
42
  setManifest(manifest: any): Promise<void>;
33
43
  get inited(): boolean;
@@ -1,17 +1,12 @@
1
- import { type Container } from '../../../manifest';
2
- import { type TPayload, type TGroupsStack } from './GroupsStack';
3
- import type { IPlayer } from '@vkontakte/videoplayer-core';
4
- export type InteractiveEventsType = ReturnType<typeof InteractiveEvents>;
5
- type AddMethodParamType = Parameters<TGroupsStack['add']>[0];
6
- type RemoveMethodParamType = Parameters<TGroupsStack['remove']>[0];
7
1
  /**
8
2
  * Executes an events at different times of the current chapter
3
+ * @param {object} player
9
4
  */
10
- export declare function InteractiveEvents(player: IPlayer): {
11
- setPlayer: (player: IPlayer) => void;
12
- add: (args: AddMethodParamType) => void;
13
- remove: (args: RemoveMethodParamType) => void;
14
- exec: (timestamp: number) => void;
5
+ export function InteractiveEvents(player: object): {
6
+ setPlayer: (player: any) => void;
7
+ add: (args: any) => void;
8
+ remove: (args: any) => void;
9
+ exec: (timestamp: any) => void;
15
10
  execEndOfVideo: () => void;
16
11
  listen: () => void;
17
12
  unlisten: () => void;
@@ -21,11 +16,10 @@ export declare function InteractiveEvents(player: IPlayer): {
21
16
  timestamp: any;
22
17
  id: any;
23
18
  }) => void;
24
- setData: (containers?: Container[]) => void;
25
- resetCalled: (timestamp: number) => void;
26
- isReady: (timestamp: number) => boolean;
19
+ setData: (containers?: any[]) => void;
20
+ resetCalled: (timestamp: any) => void;
21
+ isReady: (timestamp: any) => boolean;
27
22
  release: () => void;
28
23
  };
29
- getPreparedToExecActions: (timestamp?: number) => TPayload[];
24
+ getPreparedToExecActions: (timestamp?: number) => any[];
30
25
  };
31
- export {};
@@ -1,12 +1,5 @@
1
- import type { IPlayer } from '@vkontakte/videoplayer-core';
2
- type ResizeManagerArg = () => {
3
- parentElement: HTMLElement;
4
- player?: Nullable<IPlayer>;
5
- fns?: AnyFn[];
6
- };
7
- export declare function ResizeManager(getOptions: ResizeManagerArg): {
1
+ export function ResizeManager(getOptions: any): {
8
2
  resizeObserver: ResizeObserver;
9
3
  calc: () => void;
10
4
  release: () => void;
11
5
  };
12
- export {};
@@ -1,18 +1,54 @@
1
- import type { Chapter } from '../../../manifest';
2
- import type { SelectBranchesArg, OnControlEventArg, ContinuePlaybackArg, ExpectEventHandlerArg, OnChapterEventArg, OnContainerEventArg, OnExpectEventArg, SetManifestContainerEventsArg, ActionMap, AnyAction } from './SelectBranches.types';
3
- export declare const defaultArgs: {
4
- readonly shouldOpenNow: true;
5
- readonly isDetachContainer: true;
6
- };
7
- export declare const extendArgs: <T extends AnyAction>(action: T, rewrite?: boolean) => T;
8
- export declare const SelectBranches: ({ globalEventEmitter, player, interactiveEvents, removeControllers, }: SelectBranchesArg) => {
9
- onControlEvent: ({ action, controlType, controlId, containerId, branches, onEvent, isEOV, isDisabled, }: OnControlEventArg) => void;
10
- onContainerEvent: ({ action, container: { id: containerId, endTime }, branches, isEOV, autoSelected, }: OnContainerEventArg) => void;
11
- onChapterEvent: ({ chapterId, action, branches }: OnChapterEventArg) => (() => ContinuePlaybackArg<"chapter">) | undefined;
12
- onExpectEvent: <T extends keyof ActionMap>({ subjectId, subjectName }: OnExpectEventArg<T>) => void;
13
- expectEventHandler: <T extends keyof ActionMap>({ subjectId, subjectName }: ExpectEventHandlerArg<T>) => void;
14
- setManifestChapterEvents: (chapter: Chapter) => void;
15
- setManifestContainerEvents: ({ container, branches, isEOV }: SetManifestContainerEventsArg) => void;
1
+ export const defaultArgs: Readonly<{
2
+ shouldOpenNow: true;
3
+ isDetachContainer: true;
4
+ }>;
5
+ export function extendArgs(action: any, rewrite?: boolean): any;
6
+ export function SelectBranches({ globalEventEmitter, player, interactiveEvents, removeControllers }: {
7
+ globalEventEmitter: any;
8
+ player: any;
9
+ interactiveEvents: any;
10
+ removeControllers: any;
11
+ }): {
12
+ onControlEvent: ({ action, controlType, controlId, containerId, branches, onEvent, isEOV, isDisabled, }: {
13
+ action: any;
14
+ controlType: any;
15
+ controlId: any;
16
+ containerId: any;
17
+ branches?: any[] | undefined;
18
+ onEvent: any;
19
+ isEOV?: (() => boolean) | undefined;
20
+ isDisabled?: (() => boolean) | undefined;
21
+ }) => void;
22
+ onContainerEvent: ({ action, container: { id: containerId, endTime }, branches, isEOV, autoSelected, }: {
23
+ action: any;
24
+ container: {
25
+ id: any;
26
+ endTime: any;
27
+ };
28
+ branches?: any[] | undefined;
29
+ isEOV?: boolean | undefined;
30
+ autoSelected?: boolean | undefined;
31
+ }) => void;
32
+ onChapterEvent: ({ chapterId, action, branches }: {
33
+ chapterId: any;
34
+ action: any;
35
+ branches?: any[] | undefined;
36
+ }) => (() => void) | undefined;
37
+ onExpectEvent: ({ subjectId, subjectName, action }: {
38
+ subjectId: any;
39
+ subjectName: any;
40
+ action: any;
41
+ }) => void;
42
+ expectEventHandler: ({ subjectId, subjectName }: {
43
+ subjectId: any;
44
+ subjectName: any;
45
+ }) => void;
46
+ setManifestChapterEvents: (chapter: any) => void;
47
+ setManifestContainerEvents: ({ container, branches, isEOV }: {
48
+ container: any;
49
+ branches: any;
50
+ isEOV?: boolean | undefined;
51
+ }) => void;
16
52
  stopExpect: () => void;
17
53
  state: {
18
54
  isExpect: boolean;
@@ -1,23 +1,6 @@
1
- import { type ChapterBranch } from '../../../manifest';
2
- /**
3
- * Returns a random number in the range [0, limit) or [limit, 0) if the 'limit'
4
- * value is negative
5
- */
6
- export declare const getRandomNumber: (limit: number) => number;
7
- /**
8
- * Finds the value with minimal weight number
9
- */
10
- export declare const minFallbackStrategy: (branches: ChapterBranch[]) => Nullable<ChapterBranch>;
11
- /**
12
- * Finds the value with maximal weight number
13
- */
14
- export declare const maxFallbackStrategy: (branches: ChapterBranch[]) => Nullable<ChapterBranch>;
15
- /**
16
- * Finds first branch with `isDefault === true` value
17
- */
18
- export declare const defaultFallbackStrategy: (branches: ChapterBranch[]) => ChapterBranch | undefined;
19
- /**
20
- * Returns the random branch
21
- */
22
- export declare const weightlessRandomFallbackStrategy: (branches: ChapterBranch[]) => ChapterBranch;
23
- export declare const weightyRandomFallbackStrategy: (branches: ChapterBranch[]) => ChapterBranch;
1
+ export function getRandomNumber(limit: number): number;
2
+ export function minFallbackStrategy(branches: any[]): string;
3
+ export function maxFallbackStrategy(branches: any): string;
4
+ export function defaultFallbackStrategy(branches: any[]): string;
5
+ export function weightlessRandomFallbackStrategy(branches: any[]): string;
6
+ export function weightyRandomFallbackStrategy(branches: any): any;
@@ -1,28 +1,26 @@
1
- import { type Control, type Chapter, type ChapterContainer } from '../../../manifest';
2
- import type { GameController } from './GameController';
3
- export declare enum GameStates {
4
- nothing = 0,
5
- beforeInteractive = 1,
6
- interactive = 2,
7
- afterInteractive = 3,
8
- end = 4,
9
- removed = 5,
10
- destroyed = 6
11
- }
12
- export declare const isControlsExist: (controls: Control[]) => boolean;
13
- export declare const isLastChapter: (chapter: Chapter) => boolean;
14
- export declare const hasEndTemplate: (chapter: Chapter) => boolean;
15
- export declare const isBeforeStartTime: (currentTime: number, container: ChapterContainer) => boolean;
16
- export declare const isInteractiveTime: (currentTime: number, container: ChapterContainer) => boolean;
17
- export declare const isAfterInteractiveTime: (currentTime: number, container: ChapterContainer) => boolean;
18
- type AnyEvent = ChapterContainer['events'] | Chapter['events'] | Control['events'];
19
- export declare const isExpectEvent: (events?: AnyEvent) => boolean;
20
- export declare const getExpectEvent: (events?: AnyEvent) => import("@interactiveplatform/movika-graph-editor").ChapterEvent | import("@interactiveplatform/movika-graph-editor").ContainerEvent | import("@interactiveplatform/movika-graph-editor").ControlEvent | undefined;
21
- export declare const isOneCtrlOneContainer: (controls: Control[]) => boolean;
22
- export declare const isOneTextCtrlContainer: (controls: Control[]) => boolean;
23
- export declare function excludeTextControl(containers?: ChapterContainer[]): ChapterContainer[];
24
- export declare const isEOVEndTime: (target: HTMLVideoElement, endTime: ChapterContainer["endTime"]) => boolean;
25
- export declare function partial<T extends unknown[], U extends unknown[], R>(fn: (...args: [...T, ...U]) => R, ...presetArgs: T): (...laterArgs: U) => R;
26
- export declare function partial<T extends Record<string, unknown>, P extends Partial<T>>(fn: (args: T) => unknown, presetArgs: P): (laterArgs: Omit<T, keyof P>) => ReturnType<typeof fn>;
27
- export declare const shouldIgnoreContainerEvent: (container: ChapterContainer, gameControllers: GameController[]) => boolean;
28
- export {};
1
+ export function excludeTextControl(containers?: any[]): any[];
2
+ export const gameStates: Readonly<{
3
+ nothing: 0;
4
+ beforeInteractive: 1;
5
+ interactive: 2;
6
+ afterInteractive: 3;
7
+ end: 4;
8
+ removed: 5;
9
+ destroyed: 6;
10
+ }>;
11
+ export function isControlsExist(controls: any): boolean;
12
+ export function isLastChapter(chapter: any): boolean;
13
+ export function hasEndTemplate(chapter: any): boolean;
14
+ export function isBeforeStartTime(currentTime: any, container: any): boolean;
15
+ export function isInteractiveTime(currentTime: any, container: any): boolean;
16
+ export function isAfterInteractiveTime(currentTime: any, container: any): boolean;
17
+ export function isExpectEvent(events: any): any;
18
+ export function getExpectEvent(events: any): any;
19
+ export function isOneCtrlOneContainer(controls: any): boolean;
20
+ export function isOneTextCtrlContainer(controls: any): boolean;
21
+ export function isEOVEndTime(target: any, endTime: any): boolean;
22
+ export function partial({ fn, type }: {
23
+ fn: any;
24
+ type?: number | undefined;
25
+ }, ...presetArgs: any[]): (...laterArgs: any[]) => any;
26
+ export function shouldIgnoreContainerEvent(container: any, gameControllers: any): any;
@@ -1,4 +1,4 @@
1
- import { type Container } from '../../../manifest';
1
+ import { type Container } from '../../../movika.core/manifest';
2
2
  export type InteractiveRange = {
3
3
  subjects: string[];
4
4
  range: [number, number];
@@ -1,67 +1,62 @@
1
- import { type Control } from '../../../manifest';
2
- import { type Dimensions } from '../../../modules/Interactives/controls';
3
- export declare const classnamesPrefix = "interactive";
4
- export declare const rootElClassName = "interactive-controls-container";
5
- export declare const getRootEl: () => Element | null;
6
- export declare const DISABLE_OPACITY = 0.4;
7
- export declare const controlStylesFallbacks: {
8
- textColor: string;
9
- textSize: number;
10
- textContent: string;
11
- roundCorners: number;
12
- borderWidth: number;
13
- borderColor: string;
14
- borderAlpha: number;
15
- backgroundColor: string;
16
- backgroundAlpha: number;
17
- innerSizesDependOn: string;
18
- angle: number;
19
- };
20
- type ControlStylesFallbacks = typeof controlStylesFallbacks;
21
- export declare enum ALIGN_ITEMS {
22
- top = "flex-start",
23
- bottom = "flex-end",
24
- center = "center"
1
+ export const classnamesPrefix: "interactive";
2
+ export const rootElClassName: "interactive-controls-container";
3
+ export function getRootEl(): Element | null;
4
+ export const DISABLE_OPACITY: 0.4;
5
+ export namespace controlStylesFallbacks {
6
+ let textColor: string;
7
+ let textSize: number;
8
+ let textContent: string;
9
+ let roundCorners: number;
10
+ let borderWidth: number;
11
+ let borderColor: string;
12
+ let borderAlpha: number;
13
+ let backgroundColor: string;
14
+ let backgroundAlpha: number;
15
+ let innerSizesDependOn: string;
16
+ let angle: number;
25
17
  }
26
- export declare enum JUSTIFY_CONTENT {
27
- start = "flex-start",
28
- end = "flex-end",
29
- center = "center"
18
+ export namespace ALIGN_ITEMS {
19
+ let top: string;
20
+ let bottom: string;
21
+ let center: string;
30
22
  }
31
- export declare enum TEXT_ALIGN {
32
- start = "left",
33
- end = "right",
34
- center = "center"
23
+ export namespace JUSTIFY_CONTENT {
24
+ export let start: string;
25
+ export let end: string;
26
+ let center_1: string;
27
+ export { center_1 as center };
35
28
  }
36
- type SetTextPositionStylesProps = {
37
- target: HTMLElement;
38
- props: Control['props'];
39
- };
40
- export declare const setTextPositionStyles: ({ target, props }: SetTextPositionStylesProps) => void;
41
- type SetTextStylesProps = {
42
- target: HTMLElement;
43
- props: Control['props'];
44
- fallback: ControlStylesFallbacks;
45
- dependsOn: Dimensions;
46
- };
47
- export declare const setTextStyles: ({ target, props, fallback, dependsOn }: SetTextStylesProps) => void;
48
- type SetBackgroundStylesProps = {
49
- target: HTMLElement;
50
- props: Control['props'];
51
- fallback: ControlStylesFallbacks;
52
- };
53
- export declare const setBackgroundStyles: ({ target, props, fallback }: SetBackgroundStylesProps) => void;
54
- type SetBorderStylesProps = {
55
- target: HTMLElement;
56
- props: Control['props'];
57
- fallback: ControlStylesFallbacks;
58
- dependsOn: Dimensions;
59
- };
60
- export declare const setBorderStyles: ({ target, props, fallback, dependsOn }: SetBorderStylesProps) => void;
61
- type SetAngleProps = {
62
- target: HTMLElement;
63
- fallback: ControlStylesFallbacks;
64
- layoutParams: Control['layoutParams'];
65
- };
66
- export declare const setAngle: ({ target, layoutParams, fallback }: SetAngleProps) => void;
67
- export {};
29
+ export namespace TEXT_ALIGN {
30
+ let start_1: string;
31
+ export { start_1 as start };
32
+ let end_1: string;
33
+ export { end_1 as end };
34
+ let center_2: string;
35
+ export { center_2 as center };
36
+ }
37
+ export function setTextPositionStyles({ target, props }: {
38
+ target: any;
39
+ props: any;
40
+ }): void;
41
+ export function setTextStyles({ target, props, fallback, dependsOn }: {
42
+ target: any;
43
+ props: any;
44
+ fallback: any;
45
+ dependsOn: any;
46
+ }): void;
47
+ export function setBackgroundStyles({ target, props, fallback }: {
48
+ target: any;
49
+ props: any;
50
+ fallback: any;
51
+ }): void;
52
+ export function setBorderStyles({ target, props, fallback, dependsOn }: {
53
+ target: any;
54
+ props: any;
55
+ fallback: any;
56
+ dependsOn: any;
57
+ }): void;
58
+ export function setAngle({ target, layoutParams, fallback }: {
59
+ target: any;
60
+ layoutParams: any;
61
+ fallback: any;
62
+ }): void;
@@ -1,5 +1,5 @@
1
- import type { ManifestVideo, ManifestVideoVariant } from '../../../manifest';
2
- export type { Extension, Standard } from '../../../manifest';
1
+ import type { ManifestVideo, ManifestVideoVariant } from '../../../movika.core/manifest';
2
+ export type { Extensions, Standard } from '../../../movika.core/manifest';
3
3
  export interface GetVKVideoParams {
4
4
  access_token: string;
5
5
  owner_id?: number;
@@ -1,4 +1,4 @@
1
- import type { ManifestVideoVariant } from '../../../manifest';
1
+ import type { ManifestVideoVariant } from '../../../movika.core/manifest';
2
2
  import type { FullRequestParams, VideoVideoImage } from './types';
3
3
  export declare function createRequestURL({ baseURL, requestParams }: FullRequestParams): string;
4
4
  export declare function findMaxResolutionFrame(frames?: VideoVideoImage[]): VideoVideoImage | undefined;
@@ -1,21 +1,22 @@
1
1
  import type { IValueSubject } from '@vkontakte/videoplayer-shared';
2
- import type { ChapterBranch, ManifestVideo, Chapter, Manifest, GraphEditChapter, GraphViewChapter, AnyManifest } from '../../manifest';
2
+ import type { ChapterBranch, ManifestVideo, LatestChapter, LatestManifest, LatestManifestVideo } from '../../movika.core/manifest';
3
+ import type { GraphEditChapter, GraphViewChapter } from '../../movika.core/manifest/manifest_3_3/graph';
3
4
  import { Loadable } from './Loadable';
4
5
  type BranchesData = {
5
- chapter: Chapter;
6
+ chapter: LatestChapter;
6
7
  graph: GraphEditChapter | GraphViewChapter | undefined;
7
8
  media: ManifestVideo;
8
9
  };
9
10
  export declare class ManifestController extends Loadable {
10
- manifest: Nullable<Manifest>;
11
- chapter: Nullable<Chapter>;
12
- media: Nullable<ManifestVideo>;
13
- graph: Nullable<Manifest['graph']>;
14
- prevChapter$: IValueSubject<Chapter | null>;
11
+ manifest: Nullable<LatestManifest>;
12
+ chapter: Nullable<LatestChapter>;
13
+ media: Nullable<LatestManifestVideo>;
14
+ graph: Nullable<LatestManifest['graph']>;
15
+ prevChapter$: IValueSubject<LatestChapter | null>;
15
16
  onError: Function;
16
17
  constructor(loaders: any, onError: Function);
17
18
  release(): this;
18
- setManifest(source: AnyManifest | string): Promise<ManifestController>;
19
+ setManifest(source: LatestManifest): Promise<ManifestController>;
19
20
  setInitial(): Promise<ManifestController>;
20
21
  setNext(chapterId?: string | undefined): Promise<ManifestController>;
21
22
  errorHandler(errors: unknown): void;
@@ -24,9 +25,9 @@ export declare class ManifestController extends Loadable {
24
25
  getBranches(chapterId?: string | undefined): BranchesData[];
25
26
  getByBranches(branches?: ChapterBranch[]): BranchesData[];
26
27
  getCurrent(): {
27
- chapter: Nullable<Chapter>;
28
- media: Nullable<ManifestVideo>;
29
- graph: Nullable<import("@interactiveplatform/movika-graph-editor").GraphDesign>;
28
+ chapter: Nullable<import("../../movika.core/manifest/types").Chapter>;
29
+ media: Nullable<import("../../movika.core/manifest/manifest_3_3/manifest").ManifestVideo>;
30
+ graph: Nullable<import("../../movika.core/manifest/manifest_3_3/graph").GraphDesign>;
30
31
  };
31
32
  isInitialChapter(): boolean;
32
33
  isEndChapter(): boolean;
@@ -1,12 +1,12 @@
1
- import type { Manifest, AnyManifest, Media, Chapter } from '../../manifest';
1
+ import type { Manifest, LatestManifest, Media, Chapter } from '../../movika.core/manifest';
2
2
  type ManifestInfo = {
3
- manifest: AnyManifest;
3
+ manifest: Manifest;
4
4
  manifestURL: string;
5
5
  };
6
- export declare const convertToObject: (manifest: AnyManifest | string) => Promise<Partial<ManifestInfo>>;
7
- export declare function fetchManifest(manifest: AnyManifest | string): Promise<Manifest>;
6
+ export declare const convertToObject: (manifest: Manifest | string) => Promise<Partial<ManifestInfo>>;
7
+ export declare function fetchManifest(manifest: Manifest): Promise<LatestManifest>;
8
8
  export declare function getInitialChapter(manifest: any): Chapter | undefined;
9
9
  export declare function getChapter(chapters: Chapter[], chapterId?: string): Chapter | undefined;
10
- export declare function getGraphItem(graphObj: Manifest['graph'], chapterId: string): import("@interactiveplatform/movika-graph-editor").GraphEditChapter | import("@interactiveplatform/movika-graph-editor").GraphViewChapter | undefined;
11
- export declare function getMedia(media: Media, videoId?: string): import("@interactiveplatform/movika-graph-editor").ManifestVideo | undefined;
10
+ export declare function getGraphItem(graphObj: LatestManifest['graph'], chapterId: string): import("../../movika.core/manifest/manifest_3_3/graph").GraphEditChapter | import("../../movika.core/manifest/manifest_3_3/graph").GraphViewChapter | undefined;
11
+ export declare function getMedia(media: Media, videoId?: string): import("../../movika.core/manifest/manifest_3_2/manifest").ManifestVideo | undefined;
12
12
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { IConfig, PlaybackRate, VideoQuality } from '@vkontakte/videoplayer-core';
2
2
  import { ValueSubject } from '@vkontakte/videoplayer-shared';
3
- import type { ManifestVideo, Extension } from '../../manifest';
3
+ import type { ManifestVideo, Extensions } from '../../movika.core/manifest';
4
4
  import { type Interactives } from '../../modules/Interactives';
5
5
  import type { Instance } from './InstanceManager';
6
6
  interface CreatePlayerParams extends Omit<IConfig, 'sources' | 'container'> {
@@ -9,7 +9,7 @@ interface CreatePlayerParams extends Omit<IConfig, 'sources' | 'container'> {
9
9
  prefetch?: boolean;
10
10
  setAsActive?: boolean;
11
11
  autoplay?: boolean;
12
- preferredExt?: Array<Extension>;
12
+ preferredExt?: Array<Extensions>;
13
13
  quality?: VideoQuality;
14
14
  playbackRate?: PlaybackRate;
15
15
  title?: string;
@@ -1,7 +1,7 @@
1
1
  import type { IPlayer, ISources } from '@vkontakte/videoplayer-core';
2
- import type { ManifestVideo, Extension } from '../../manifest';
2
+ import type { ManifestVideo, Extensions } from '../../movika.core/manifest';
3
3
  import { VideoQuality } from '@vkontakte/videoplayer-core';
4
- export declare function genPlayerCfgVideoData(mediaObj: ManifestVideo, allowList?: Array<Extension>): {
4
+ export declare function genPlayerCfgVideoData(mediaObj: ManifestVideo, allowList?: Array<Extensions>): {
5
5
  sources: ISources;
6
6
  thumbUrl?: string | null;
7
7
  title: string;
@@ -1,10 +1,10 @@
1
1
  import type { IPlayer } from '@vkontakte/videoplayer-core';
2
- import type { ChapterContainer } from '../../manifest';
2
+ import type { ChapterContainers } from '../../movika.core/manifest/types';
3
3
  export declare class SeekToInteractiveController {
4
4
  private _containers;
5
5
  private _player;
6
6
  setPlayer: (player: IPlayer) => void;
7
- setContainers: (containers: ChapterContainer[]) => void;
7
+ setContainers: (containers: ChapterContainers) => void;
8
8
  deleteContainer: (id: string) => void;
9
9
  getNextInteractiveTime: (offsetMs?: number) => number | null;
10
10
  }