@vkontakte/videoplayer 1.1.95-dev.bd7a642f0.0 → 1.1.95

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 (35) hide show
  1. package/es2015.cjs +11 -11
  2. package/es2015.esm.js +11 -11
  3. package/esnext.cjs +10 -10
  4. package/esnext.esm.js +10 -10
  5. package/evergreen.esm.js +10 -10
  6. package/package.json +5 -5
  7. package/types/VKVideoPlayer/index.svelte.d.ts +1 -2
  8. package/types/components/Ads/admanWrapper.d.ts +1 -0
  9. package/types/components/Ads/types.d.ts +1 -0
  10. package/types/components/Controls/contants/desktopButtonsLeftWeights.d.ts +1 -1
  11. package/types/components/Controls/contants/desktopButtonsRightIds.d.ts +2 -1
  12. package/types/components/Controls/contants/desktopButtonsRightWeights.d.ts +1 -1
  13. package/types/components/Menus/constants/contextMenuItemWeights.d.ts +1 -1
  14. package/types/components/Menus/constants/settingsMenuItemWeights.d.ts +1 -1
  15. package/types/components/Menus/subMenuTabs/types.d.ts +0 -6
  16. package/types/components/Qoe/constants.d.ts +9 -0
  17. package/types/components/Qoe/utils.d.ts +1 -0
  18. package/types/config.d.ts +5 -0
  19. package/types/index.d.ts +3 -3
  20. package/types/store/composition.d.ts +5 -5
  21. package/types/store/modules/index.d.ts +2 -2
  22. package/types/store/modules/qoeStore/index.d.ts +3 -0
  23. package/types/store/modules/qoeStore/qoeStore.module.d.ts +3 -0
  24. package/types/store/modules/qoeStore/qoeStore.store.d.ts +4 -0
  25. package/types/store/modules/qoeStore/qoeStore.token.d.ts +3 -0
  26. package/types/store/modules/qoeStore/types.d.ts +24 -0
  27. package/types/store/modules/utils.d.ts +1 -1
  28. package/types/store/types.d.ts +2 -2
  29. package/types/types/index.d.ts +4 -0
  30. package/types/types/qoe.d.ts +65 -0
  31. package/types/store/modules/highlightedMenuItemsStore/highlightedMenuItems.module.d.ts +0 -3
  32. package/types/store/modules/highlightedMenuItemsStore/highlightedMenuItems.store.d.ts +0 -21
  33. package/types/store/modules/highlightedMenuItemsStore/highlightedMenuItems.token.d.ts +0 -5
  34. package/types/store/modules/highlightedMenuItemsStore/index.d.ts +0 -3
  35. package/types/utils/sanitizeSvg.d.ts +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer",
3
- "version": "1.1.95-dev.bd7a642f0.0",
3
+ "version": "1.1.95",
4
4
  "author": "vk.com",
5
5
  "description": "Videoplayer based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -43,9 +43,9 @@
43
43
  ],
44
44
  "dependencies": {
45
45
  "@adtech/rbadman": "2.2.57",
46
- "@vkontakte/videoplayer-core": "2.0.164-dev.bd7a642f0.0",
47
- "@vkontakte/videoplayer-interactive": "1.0.70-dev.bd7a642f0.0",
48
- "@vkontakte/videoplayer-shared": "1.0.93-dev.bd7a642f0.0",
49
- "@vkontakte/videoplayer-statistics": "1.0.110-dev.bd7a642f0.0"
46
+ "@vkontakte/videoplayer-core": "2.0.164",
47
+ "@vkontakte/videoplayer-interactive": "1.0.70",
48
+ "@vkontakte/videoplayer-shared": "1.0.93",
49
+ "@vkontakte/videoplayer-statistics": "1.0.110"
50
50
  }
51
51
  }
@@ -7,7 +7,7 @@ import type { PlaybackRate } from "@vkontakte/videoplayer-core";
7
7
  import { type IStatContext } from "@vkontakte/videoplayer-statistics";
8
8
  import { ThinOneStat } from "@vkontakte/videoplayer-statistics";
9
9
  import { AnnotationsApi } from "../utils/webAPI/annotationsApi/annotationsApi";
10
- import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, MenuItemHighlight, RootMenuId } from "../components/Menus/subMenuTabs/types";
10
+ import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from "../components/Menus/subMenuTabs/types";
11
11
  import type { AdditionalButton } from "../components/Controls/types";
12
12
  import { SlotsApi } from "../utils/webAPI/slotsApi";
13
13
  import { HTMLElement } from "./HTMLElement";
@@ -158,7 +158,6 @@ export declare class VKVideoPlayer extends HTMLElement {
158
158
  */
159
159
  toggleHighQuality(value: boolean): void;
160
160
  changeAudioStream(id: string): void;
161
- setHighlightedMenuItems(items: Partial<Record<RootMenuId, MenuItemHighlight>> | undefined): void;
162
161
  addLanguage(config: LanguageConfig): void;
163
162
  setLanguage(language: InterfaceLanguage | string): Promise<void>;
164
163
  private replaceVideoDataInConfig;
@@ -24,6 +24,7 @@ export declare class AdmanWrapper {
24
24
  private isVsidOriginal;
25
25
  private preserveMutedState;
26
26
  private stopAdmanOnSwitch;
27
+ private skipNoFillAds;
27
28
  private watchDogTimeout;
28
29
  private externalApi?;
29
30
  events: {
@@ -17,4 +17,5 @@ export interface IConfig {
17
17
  isVsidOriginal: boolean;
18
18
  preserveMutedState: boolean;
19
19
  stopAdmanOnSwitch: boolean;
20
+ skipNoFillAds: boolean;
20
21
  }
@@ -1,2 +1,2 @@
1
1
  import { DesktopButtonsLeftIds } from "./desktopButtonsLeftIds";
2
- export declare const desktopButtonsLeftWeights: { [key in DesktopButtonsLeftIds] : number };
2
+ export declare const desktopButtonsLeftWeights: { [key in DesktopButtonsLeftIds]: number };
@@ -6,5 +6,6 @@ export declare enum DesktopButtonsRightIds {
6
6
  SETTINGS = "settings",
7
7
  CONTEXT = "context",
8
8
  FULLSCREEN = "fullscreen",
9
- CHROMECAST = "chromecast"
9
+ CHROMECAST = "chromecast",
10
+ QOE = "qoe"
10
11
  }
@@ -1,2 +1,2 @@
1
1
  import { DesktopButtonsRightIds } from "./desktopButtonsRightIds";
2
- export declare const desktopButtonsRightWeights: { [key in DesktopButtonsRightIds] : number };
2
+ export declare const desktopButtonsRightWeights: { [key in DesktopButtonsRightIds]: number };
@@ -1,2 +1,2 @@
1
1
  import { ContextMenuItemIds } from "./contextMenuItemIds";
2
- export declare const contextMenuItemWeights: { [key in ContextMenuItemIds] : number };
2
+ export declare const contextMenuItemWeights: { [key in ContextMenuItemIds]: number };
@@ -1,2 +1,2 @@
1
1
  import { SettingsMenuItemIds } from "./settingsMenuItemIds";
2
- export declare const settingsMenuItemWeights: { [key in SettingsMenuItemIds] : number };
2
+ export declare const settingsMenuItemWeights: { [key in SettingsMenuItemIds]: number };
@@ -111,12 +111,6 @@ export declare enum MenuItemType {
111
111
  CLICK = "CLICK",
112
112
  SWITCH = "SWITCH"
113
113
  }
114
- export interface MenuItemHighlight {
115
- /** SVG как строка или URL на SVG-файл */
116
- svg: string;
117
- /** CSS стили для контейнера с SVG */
118
- styleSvgContainer?: string;
119
- }
120
114
  export declare enum SubMenuItemType {
121
115
  OPEN_SUB_MENU = "OPEN_SUB_MENU",
122
116
  SELECT_VALUE = "SELECT_VALUE"
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Отступ снизу для контейнера опроса от нижнего края плеера.
3
+ * Включает высоту контролов и дополнительный отступ.
4
+ */
5
+ export declare const QOE_POLL_BOTTOM_OFFSET: number;
6
+ /**
7
+ * Верхний отступ для расчёта максимальной высоты опроса.
8
+ */
9
+ export declare const QOE_POLL_TOP_OFFSET: number;
@@ -0,0 +1 @@
1
+ export declare const stopPropagation: (e: Event) => void;
package/types/config.d.ts CHANGED
@@ -52,6 +52,11 @@ export interface IAdsConfig {
52
52
  */
53
53
  preserveMutedState: boolean;
54
54
  stopAdmanOnSwitch: boolean;
55
+ /**
56
+ * Пропускать no-fill рекламу (баннер с нулевой длительностью).
57
+ * Если true — started$ не стреляется, видео сразу продолжает воспроизведение.
58
+ */
59
+ skipNoFillAds: boolean;
55
60
  }
56
61
  export interface IUIConfig {
57
62
  isMobile: ForceOrRelay;
package/types/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import { VKVideoPlayer } from "./VKVideoPlayer/index.svelte";
2
- import type { AdsParams, IAdmanInitParamsExternalApi, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, IVideoEpisode, VideoPlayerView } from "./types";
2
+ import type { AdsParams, IAdmanInitParamsExternalApi, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, IVideoEpisode, IQoeConfig, IQoePoll, IQoeResult, IQoeQuestion, IQoeCallbacks, QoePollTranslations, VideoPlayerView } from "./types";
3
3
  import type { LanguagePack, LanguageConfig } from "./translation/types";
4
4
  import type { LogoType as VKLogoType, IAdsConfig, ISDKConfig, IDpipConfig } from "./config";
5
5
  import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } from "@vkontakte/videoplayer-core";
6
6
  import type { Milliseconds, QualityLimits } from "@vkontakte/videoplayer-shared";
7
7
  export { VERSION } from "./env";
8
8
  export declare const registerPlayerWebComponent: () => void;
9
- export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, RootMenuId, SubMenuId } from "./components/Menus/subMenuTabs/types";
9
+ export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem } from "./components/Menus/subMenuTabs/types";
10
10
  export { type AdditionalButton, ControlButtonType } from "./components/Controls/types";
11
- export type { VKVideoPlayer, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IAdsConfig, IVideoEpisode, IDpipConfig, ISDKConfig, VideoPlayerView, IAdmanInitParamsExternalApi, VKLogoType };
11
+ export type { VKVideoPlayer, IVKVideoPlayerConfig, IUpdatableVKVideoPlayerConfig, IControlInfo, ITimelinePreviewThumbsData, IUpcomingLiveViewControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IAdsConfig, IVideoEpisode, IDpipConfig, IQoeConfig, IQoePoll, IQoeResult, IQoeQuestion, IQoeCallbacks, QoePollTranslations, ISDKConfig, VideoPlayerView, IAdmanInitParamsExternalApi, VKLogoType };
12
12
  export { GridTypes } from "./constans";
13
13
  export { PlayerPhase } from "./types";
14
14
  export { isPiPSupported, isDpipSupported } from "./utils/webAPI/pictureInPictureApi";
@@ -1,7 +1,7 @@
1
1
  import type { IUIConfig } from "../config";
2
2
  import type { IVKVideoPlayerConfig } from "../types";
3
3
  import type { IStore } from "./index";
4
- import type { FakeIsPlayingStore, GraphIsOpenedStore, HighlightedMenuItemsStore, InteractiveControlsOpacityStore, NotificationsStore, PictureInPictureStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore } from "./modules";
4
+ import type { FakeIsPlayingStore, GraphIsOpenedStore, InteractiveControlsOpacityStore, NotificationsStore, PictureInPictureStore, IQoeStore, SeekToInteractiveDisabledTooltipStore, ShowInteractiveTimeIndicatorTooltipStore } from "./modules";
5
5
  import type { Interactives } from "@vkontakte/videoplayer-interactive";
6
6
  export interface ICompositionParams {
7
7
  legacyStore: IStore;
@@ -11,14 +11,14 @@ export interface ICompositionParams {
11
11
  }
12
12
  export interface ICompositionResult {
13
13
  stores: {
14
+ fakeIsPlayingStore: FakeIsPlayingStore;
15
+ graphIsOpenedStore: GraphIsOpenedStore;
16
+ interactiveControlsOpacityStore: InteractiveControlsOpacityStore;
14
17
  notificationsStore: NotificationsStore;
15
18
  pictureInPictureStore: PictureInPictureStore;
16
- fakeIsPlayingStore: FakeIsPlayingStore;
19
+ qoeStore: IQoeStore;
17
20
  seekToInteractiveDisabledTooltipStore: SeekToInteractiveDisabledTooltipStore;
18
21
  showInteractiveTimeIndicatorTooltipStore: ShowInteractiveTimeIndicatorTooltipStore;
19
- graphIsOpenedStore: GraphIsOpenedStore;
20
- interactiveControlsOpacityStore: InteractiveControlsOpacityStore;
21
- highlightedMenuItemsStore: HighlightedMenuItemsStore;
22
22
  };
23
23
  /** Очистка ресурсов */
24
24
  destroy(): void;
@@ -12,9 +12,9 @@ export type { NotificationsStoreState, NotificationsStore, NotificationsStoreAct
12
12
  export { notificationsModule, NOTIFICATIONS_STORE_TOKEN } from "./notificationsStore";
13
13
  export type { PictureInPictureStoreState, PictureInPictureStore, PictureInPictureStoreDeps } from "./pictureInPictureStore";
14
14
  export { pictureInPictureModule, PICTURE_IN_PICTURE_STORE_TOKEN } from "./pictureInPictureStore";
15
+ export type { QoeStoreActions, QoeStoreState, IQoeStore } from "./qoeStore";
16
+ export { qoeModule, QOE_STORE_TOKEN } from "./qoeStore";
15
17
  export type { SeekToInteractiveDisabledTooltipStoreState, SeekToInteractiveDisabledTooltipStore, SeekToInteractiveDisabledTooltipStoreDeps } from "./seekToInteractiveDisabledTooltipStore";
16
18
  export { seekToInteractiveDisabledTooltipModule, SEEK_TO_INTERACTIVE_DISABLED_TOOLTIP_STORE_TOKEN } from "./seekToInteractiveDisabledTooltipStore";
17
19
  export type { ShowInteractiveTimeIndicatorTooltipStoreState, ShowInteractiveTimeIndicatorTooltipStore, ShowInteractiveTimeIndicatorTooltipStoreActions, ShowInteractiveTimeIndicatorTooltipStoreDeps } from "./showInteractiveTimeIndicatorTooltipStore";
18
20
  export { showInteractiveTimeIndicatorTooltipModule, SHOW_INTERACTIVE_TIME_INDICATOR_TOOLTIP_STORE_TOKEN } from "./showInteractiveTimeIndicatorTooltipStore";
19
- export type { HighlightedMenuItemsStoreState, HighlightedMenuItemsStore, HighlightedMenuItemsStoreActions } from "./highlightedMenuItemsStore";
20
- export { highlightedMenuItemsModule, HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN } from "./highlightedMenuItemsStore";
@@ -0,0 +1,3 @@
1
+ export type { QoeStoreActions, QoeStoreState, IQoeStore } from "./types";
2
+ export { qoeModule } from "./qoeStore.module";
3
+ export { QOE_STORE_TOKEN } from "./qoeStore.token";
@@ -0,0 +1,3 @@
1
+ import type { Module } from "../utils";
2
+ import type { IQoeStore } from "./types";
3
+ export declare const qoeModule: Module<IQoeStore>;
@@ -0,0 +1,4 @@
1
+ import type { QoeStoreFactoryDeps } from "../../../types";
2
+ import type { IQoeStore } from "./types";
3
+ export declare const CLOSE_DELAY = 3e3;
4
+ export declare const createQoeStore: (deps: QoeStoreFactoryDeps) => IQoeStore;
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
+ import type { IQoeStore } from "./types";
3
+ export declare const QOE_STORE_TOKEN: InjectionToken<IQoeStore>;
@@ -0,0 +1,24 @@
1
+ import type { Readable } from "svelte/store";
2
+ import type { IQoePoll, IQoeAnswer, IQoeQuestion, QoePollTranslationKeys, IQoeResult } from "../../../types";
3
+ export interface QoeStoreState {
4
+ complete$: Readable<boolean>;
5
+ active$: Readable<boolean>;
6
+ poll$: Readable<IQoePoll | undefined>;
7
+ pollResult$: Readable<IQoeResult | undefined>;
8
+ questionIndex$: Readable<number | undefined>;
9
+ }
10
+ export type QoeClosePollReason = "manual" | "auto" | "final";
11
+ export interface QoeStoreActions {
12
+ closePoll: (reason?: QoeClosePollReason) => void;
13
+ completePoll: VoidFunction;
14
+ answerQuestion: (answer: Pick<IQoeAnswer, "numeric" | "text">) => void;
15
+ switchQuestion: (step: 1 | -1) => void;
16
+ startPoll: VoidFunction;
17
+ }
18
+ export interface IQoeStore {
19
+ actions: QoeStoreActions;
20
+ enabled: boolean;
21
+ getTranslation(key: QoePollTranslationKeys): string;
22
+ isQuestionAnswerEditable(question: IQoeQuestion): boolean;
23
+ state: QoeStoreState;
24
+ }
@@ -3,4 +3,4 @@ export type Module<T> = {
3
3
  token: InjectionToken<T>;
4
4
  factory: (container: IDIContainer) => T;
5
5
  };
6
- export declare const registerModules: <T extends any[]>(container: IDIContainer, modules: { [K in keyof T] : Module<T[K]> }) => void;
6
+ export declare const registerModules: <T extends any[]>(container: IDIContainer, modules: { [K in keyof T]: Module<T[K]> }) => void;
@@ -29,7 +29,7 @@ export interface IAdsStateValues {
29
29
  secondsToWatchBeforeSkip: number;
30
30
  postrollPassed: boolean;
31
31
  }
32
- export type IAdsState = { [K in keyof IAdsStateValues] : Writable<IAdsStateValues[K]> };
32
+ export type IAdsState = { [K in keyof IAdsStateValues]: Writable<IAdsStateValues[K]> };
33
33
  export interface IUIState {
34
34
  t: (key: Key, params?: Record<string, string>) => string;
35
35
  isMinimalView$: Writable<boolean>;
@@ -42,7 +42,7 @@ export interface IUIState {
42
42
  * Определяет, могут ли вообще контролы быть показаны.
43
43
  */
44
44
  isControlsAvailable: Writable<boolean>;
45
- controlBlocks: { [key in keyof Required<ControlBlocksRefs>] : Writable<IControlInfo | undefined> };
45
+ controlBlocks: { [key in keyof Required<ControlBlocksRefs>]: Writable<IControlInfo | undefined> };
46
46
  touched: Writable<boolean>;
47
47
  controls: {
48
48
  prevButton: Writable<IControlInfo | undefined>;
@@ -11,7 +11,9 @@ import type { IUIStatistics } from "../services/statistics";
11
11
  import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from "../components/Menus/subMenuTabs/types";
12
12
  import type { AdditionalDesktopControlPanelButton } from "../components/Controls/types";
13
13
  import type { AdmanInitParams } from "./ads";
14
+ import type { IQoeButtonOnlyConfig, IQoeCallbacks, IQoeConfig } from "./qoe";
14
15
  export type { AdmanInitParams, AdsParams, IAdmanInitParamsExternalApi } from "./ads";
16
+ export * from "./qoe";
15
17
  export declare const enum UIType {
16
18
  DESKTOP = "desktop",
17
19
  MOBILE = "mobile"
@@ -179,6 +181,7 @@ export interface IVKVideoPlayerCallbacks {
179
181
  onClosed?: (adsSection: AdsSection) => void;
180
182
  onError?: (message: string) => void;
181
183
  };
184
+ qoe?: IQoeCallbacks;
182
185
  }
183
186
  export interface IVKVideoPlayerUICallbacks {
184
187
  onStarted?: (isMuted: boolean) => void;
@@ -331,6 +334,7 @@ export interface IVKVideoPlayerConfig {
331
334
  mediascopePixels?: MediascopePixelTypes.Pixel[];
332
335
  getVideoDeeplink?: (timestamp: number) => string;
333
336
  apptracerUserId?: string | number;
337
+ qoe?: IQoeConfig | IQoeButtonOnlyConfig;
334
338
  }
335
339
  /**
336
340
  * Поля, которые можно обновить, сохранив итстанс плеера
@@ -0,0 +1,65 @@
1
+ import type { RecursivePartial, SafeAny } from "@vkontakte/videoplayer-shared";
2
+ import type { QoeClosePollReason } from "../store/modules/qoeStore/types";
3
+ export type QoeQuestionType = "star_rating" | "checkboxes_open";
4
+ export interface IQoeQuestionBase {
5
+ id: number;
6
+ statement: string;
7
+ type: QoeQuestionType;
8
+ }
9
+ export interface IQoeQuestionStarRating extends IQoeQuestionBase {
10
+ type: "star_rating";
11
+ rating_max: number;
12
+ }
13
+ export interface IQoeQuestionOption {
14
+ index: number;
15
+ text: string;
16
+ is_open?: boolean;
17
+ }
18
+ export interface IQoeQuestionCheckboxesOpen extends IQoeQuestionBase {
19
+ type: "checkboxes_open";
20
+ options: IQoeQuestionOption[];
21
+ }
22
+ export type IQoeQuestion = IQoeQuestionStarRating | IQoeQuestionCheckboxesOpen;
23
+ export type QoePollTranslationKeys = "button_back" | "button_continue" | "button_send" | "poll_step_caption" | "text_answer_placeholder" | "player_button_tooltip" | "star_labels";
24
+ export type QoePollTranslations = Record<QoePollTranslationKeys, string>;
25
+ export interface IQoePoll {
26
+ questions: IQoeQuestion[];
27
+ completionMessage?: string;
28
+ translations: QoePollTranslations;
29
+ }
30
+ export interface IQoeAnswer {
31
+ questionId: number;
32
+ numeric: number[];
33
+ text?: string;
34
+ }
35
+ export interface IQoeResult {
36
+ answers: IQoeAnswer[];
37
+ }
38
+ export type QoeStartedHandler = VoidFunction;
39
+ export type QoeClosedHandler = (reason: QoeClosePollReason, result?: IQoeResult) => void;
40
+ export type QoeCompleteHandler = (result: IQoeResult) => void;
41
+ export interface IQoeCallbacks {
42
+ onStarted?: QoeStartedHandler;
43
+ onClosed?: QoeClosedHandler;
44
+ onComplete?: QoeCompleteHandler;
45
+ }
46
+ export interface IQoeConfig {
47
+ poll: IQoePoll;
48
+ /**
49
+ * Таймаут автоматического закрытия в конце
50
+ * @default 3000
51
+ */
52
+ closeDelay?: number;
53
+ }
54
+ export interface IQoeButtonOnlyConfig {
55
+ buttonOnly: true;
56
+ translations: RecursivePartial<QoePollTranslations>;
57
+ }
58
+ export declare const isQoeButtonOnlyConfig: (candidate: SafeAny) => candidate is IQoeButtonOnlyConfig;
59
+ export declare const isQoeConfig: (candidate: SafeAny) => candidate is IQoeConfig;
60
+ export declare const isStarRatingQuestion: (candidate: SafeAny) => candidate is IQoeQuestionStarRating;
61
+ export declare const isCheckboxesOpenQuestion: (candidate: SafeAny) => candidate is IQoeQuestionCheckboxesOpen;
62
+ export interface QoeStoreFactoryDeps {
63
+ config?: IQoeConfig | IQoeButtonOnlyConfig;
64
+ callbacks?: IQoeCallbacks;
65
+ }
@@ -1,3 +0,0 @@
1
- import { type HighlightedMenuItemsStore } from "./highlightedMenuItems.store";
2
- import type { Module } from "../utils";
3
- export declare const highlightedMenuItemsModule: Module<HighlightedMenuItemsStore>;
@@ -1,21 +0,0 @@
1
- /**
2
- * HighlightedMenuItems Store
3
- *
4
- * Управляет подсветкой пунктов меню настроек.
5
- */
6
- import type { Writable } from "svelte/store";
7
- import type { MenuItemHighlight, RootMenuId } from "../../../components/Menus/subMenuTabs/types";
8
- export interface HighlightedMenuItemsStoreState {
9
- items$: Writable<Partial<Record<RootMenuId, MenuItemHighlight>> | undefined>;
10
- }
11
- export interface HighlightedMenuItemsStoreActions {
12
- /** Установить подсвеченные пункты меню */
13
- setHighlightedMenuItems(items: Partial<Record<RootMenuId, MenuItemHighlight>> | undefined): void;
14
- /** Очистить подсветку */
15
- clear(): void;
16
- }
17
- export interface HighlightedMenuItemsStore {
18
- state: HighlightedMenuItemsStoreState;
19
- actions: HighlightedMenuItemsStoreActions;
20
- }
21
- export declare const createHighlightedMenuItemsStore: () => HighlightedMenuItemsStore;
@@ -1,5 +0,0 @@
1
- import { InjectionToken } from "@vkontakte/videoplayer-shared";
2
- export declare const HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN: InjectionToken<HIGHLIGHTED_MENU_ITEMS_STORE_STORE>;
3
- import type { HighlightedMenuItemsStore } from "./highlightedMenuItems.store";
4
- type HIGHLIGHTED_MENU_ITEMS_STORE_STORE = HighlightedMenuItemsStore;
5
- export {};
@@ -1,3 +0,0 @@
1
- export type { HighlightedMenuItemsStoreState, HighlightedMenuItemsStore, HighlightedMenuItemsStoreActions } from "./highlightedMenuItems.store";
2
- export { highlightedMenuItemsModule } from "./highlightedMenuItems.module";
3
- export { HIGHLIGHTED_MENU_ITEMS_STORE_TOKEN } from "./highlightedMenuItems.token";
@@ -1,5 +0,0 @@
1
- /**
2
- * Базовая санитизация SVG для защиты от XSS.
3
- * Удаляет опасные паттерны: script-теги, event handlers, javascript: URLs.
4
- */
5
- export declare function sanitizeSvg(svg: string | undefined): string;