@vkontakte/videoplayer 1.1.55-dev.7e2d1f69.0 → 1.1.55-dev.8ae2d508.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/es2015.cjs.js +62 -74
- package/es2015.esm.js +62 -74
- package/es2018.cjs.js +62 -74
- package/es2018.esm.js +62 -74
- package/esnext.cjs.js +64 -76
- package/esnext.esm.js +64 -76
- package/evergreen.esm.js +64 -76
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.d.ts +1 -1
- package/types/components/Menus/constants/subMenuIds.d.ts +0 -1
- package/types/components/Menus/types.d.ts +12 -19
- package/types/components/Menus/utils/getCurrentQualityDisplayValue.d.ts +2 -20
- package/types/components/Menus/utils/menuNavigation.d.ts +5 -2
- package/types/config.d.ts +6 -3
- package/types/index.d.ts +1 -1
- package/types/store/index.d.ts +4 -16
- package/types/translation/types.d.ts +1 -1
- package/types/types/index.d.ts +1 -1
- package/types/utils/userSettings.d.ts +0 -17
- package/types/components/Menus/subMenuTabs/rootMenuItems.d.ts +0 -35
- package/types/components/Menus/subMenuTabs/sharedMenuItems.d.ts +0 -17
- package/types/components/Menus/subMenuTabs/subMenuItems.d.ts +0 -13
- package/types/components/Menus/subMenuTabs/types.d.ts +0 -145
- package/types/components/Menus/subMenuTabs/utils.d.ts +0 -3
- package/types/components/Menus/utils/getSubMenusStack.svelte.d.ts +0 -10
- package/types/components/shared/interpolateUtils.d.ts +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.55-dev.
|
|
3
|
+
"version": "1.1.55-dev.8ae2d508.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@adtech/rbadman": "^2.2.57",
|
|
53
|
-
"@vkontakte/videoplayer-core": "2.0.124-dev.
|
|
54
|
-
"@vkontakte/videoplayer-interactive": "1.0.30-dev.
|
|
55
|
-
"@vkontakte/videoplayer-shared": "1.0.53-dev.
|
|
56
|
-
"@vkontakte/videoplayer-statistics": "1.0.70-dev.
|
|
53
|
+
"@vkontakte/videoplayer-core": "2.0.124-dev.cf27c52b.0",
|
|
54
|
+
"@vkontakte/videoplayer-interactive": "1.0.30-dev.f10d9ff4.0",
|
|
55
|
+
"@vkontakte/videoplayer-shared": "1.0.53-dev.6015259b.0",
|
|
56
|
+
"@vkontakte/videoplayer-statistics": "1.0.70-dev.590cc698.0"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -6,7 +6,7 @@ import { InterfaceLanguage } from '@vkontakte/videoplayer-shared';
|
|
|
6
6
|
import { type PlaybackRate } from '@vkontakte/videoplayer-core';
|
|
7
7
|
import type { IStatContext } from '@vkontakte/videoplayer-statistics';
|
|
8
8
|
import { AnnotationsApi } from '../utils/webAPI/annotationsApi/annotationsApi';
|
|
9
|
-
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/
|
|
9
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/types';
|
|
10
10
|
import type { AdditionalButton } from '../components/Controls/types';
|
|
11
11
|
export declare class VKVideoPlayer extends HTMLElement {
|
|
12
12
|
private svelteStubComponent?;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare enum SubMenuIds {
|
|
2
2
|
QUALITY = "quality-sub",
|
|
3
3
|
QUALITY_DETAIL = "quality-detail-sub",
|
|
4
|
-
DEFAULT_QUALITY_APPLIENCE = "default_quality_applies_to_sub",
|
|
5
4
|
AUDIO_LANGUAGES = "audio-language-sub",
|
|
6
5
|
PLAYBACK_RATE = "playback-rate-sub",
|
|
7
6
|
SUBTITLES = "subtitles-sub"
|
|
@@ -47,47 +47,40 @@ export type AdditionalClickSettingsMenuItem = Omit<SwitchSettingsMenuItem, 'icon
|
|
|
47
47
|
};
|
|
48
48
|
export type SettingsMenuItem = OpenSubMenuSettingsMenuItem | ClickSettingsMenuItem | SwitchSettingsMenuItem;
|
|
49
49
|
export type AdditionalSettingsMenuItem = AdditionalSwitchSettingsMenuItem | AdditionalClickSettingsMenuItem;
|
|
50
|
-
interface
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
export interface SelectValueSubMenuItem<T = any, U = any> {
|
|
51
|
+
type: SubMenuItemType.SELECT_VALUE;
|
|
52
|
+
value: T;
|
|
53
|
+
dataValue?: T | keyof T;
|
|
54
|
+
valueComponent?: any;
|
|
53
55
|
valueComponentParams?: {
|
|
54
56
|
[key: string]: U;
|
|
55
57
|
};
|
|
56
|
-
bottomBordered?: boolean;
|
|
57
|
-
label?: string;
|
|
58
|
-
sublabel?: string;
|
|
59
58
|
ariaLabel?: string;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
export interface SelectValueSubMenuItem<T = any, U = any> extends SubMenuItemBase<U> {
|
|
63
|
-
type: SubMenuItemType.SELECT_VALUE;
|
|
64
|
-
value: T;
|
|
65
|
-
dataValue?: T | keyof T;
|
|
59
|
+
label?: string;
|
|
60
|
+
selected?: boolean;
|
|
66
61
|
selectItem: (value: T) => void;
|
|
67
62
|
}
|
|
68
|
-
export interface OpenSubMenuSubMenuItem
|
|
63
|
+
export interface OpenSubMenuSubMenuItem {
|
|
69
64
|
type: SubMenuItemType.OPEN_SUB_MENU;
|
|
65
|
+
ariaLabel?: string;
|
|
66
|
+
label: string;
|
|
70
67
|
id: string;
|
|
71
68
|
subMenuId: SubMenuIds;
|
|
72
|
-
getSubItemForFocus
|
|
69
|
+
getSubItemForFocus: () => HTMLLIElement;
|
|
73
70
|
}
|
|
74
71
|
export type SubMenuItem = SelectValueSubMenuItem | OpenSubMenuSubMenuItem;
|
|
75
72
|
export interface SubMenuList {
|
|
76
73
|
id: SubMenuIds;
|
|
77
|
-
parentItemId
|
|
74
|
+
parentItemId: string;
|
|
78
75
|
items: SubMenuItem[];
|
|
79
76
|
returnFromSubMenu?: () => void;
|
|
80
77
|
ariaLabelReturnFromSubMenu?: string;
|
|
81
78
|
title: string;
|
|
82
79
|
closeSettingsMenu: () => void;
|
|
83
80
|
minWidth?: number;
|
|
84
|
-
onMount?: () => void;
|
|
85
81
|
}
|
|
86
82
|
export interface ContextMenuItem extends BaseMenuItem {
|
|
87
83
|
onClick: () => void;
|
|
88
84
|
}
|
|
89
85
|
export type AdditionalContextMenuItem = ContextMenuItem;
|
|
90
|
-
export type MenuRefs = {
|
|
91
|
-
[key: string]: HTMLUListElement;
|
|
92
|
-
};
|
|
93
86
|
export {};
|
|
@@ -1,21 +1,3 @@
|
|
|
1
1
|
import { VideoQuality } from '@vkontakte/videoplayer-core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
quality: VideoQuality;
|
|
5
|
-
availableQualities: VideoQualityForRender[];
|
|
6
|
-
};
|
|
7
|
-
export declare const getQualityDisplayValue: ({ quality, availableQualities }: Params) => string;
|
|
8
|
-
type CurrentQualityParams = {
|
|
9
|
-
isAutoQualityEnabled: boolean | undefined;
|
|
10
|
-
quality: VideoQuality | undefined;
|
|
11
|
-
availableQualities: VideoQualityForRender[];
|
|
12
|
-
};
|
|
13
|
-
export declare const getCurrentQualityDisplayValue: ({ quality, availableQualities, isAutoQualityEnabled, }: CurrentQualityParams) => string;
|
|
14
|
-
type QualityWithPrefixParams = {
|
|
15
|
-
quality: VideoQuality | undefined;
|
|
16
|
-
availableQualities: VideoQualityForRender[];
|
|
17
|
-
prefix: string;
|
|
18
|
-
onlyPrefix: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare const getQualityWithPrefix: ({ quality, availableQualities, prefix, onlyPrefix }: QualityWithPrefixParams) => string;
|
|
21
|
-
export {};
|
|
2
|
+
import type { VideoQualityForRender } from '../../../types';
|
|
3
|
+
export declare const getCurrentQualityDisplayValue: (currentQuality: VideoQuality | undefined, availableQualities: VideoQualityForRender[], isAutoQualityEnabled: boolean | undefined) => string;
|
|
@@ -11,8 +11,11 @@ export declare const returnFocusToMenuItem: (refMenuItems: {
|
|
|
11
11
|
[key: string]: HTMLLIElement;
|
|
12
12
|
}, id: string) => Promise<void>;
|
|
13
13
|
export declare const handleKeyDownMainMenu: (event: KeyboardEvent, closeCallback: () => void) => void;
|
|
14
|
-
export declare const handleKeyDownOpenSubMenuItem: (event: KeyboardEvent, openSubmenuFn: () => void) => Promise<void>;
|
|
15
|
-
export declare const handleKeyDownSubMenu: (event: KeyboardEvent, returnFromSubMenu: () => void,
|
|
14
|
+
export declare const handleKeyDownOpenSubMenuItem: (event: KeyboardEvent, openSubmenuFn: () => void, getSubItemFn: () => HTMLLIElement) => Promise<void>;
|
|
15
|
+
export declare const handleKeyDownSubMenu: (event: KeyboardEvent, returnFromSubMenu: () => void, { itemIdReturnCase, id }: {
|
|
16
|
+
itemIdReturnCase: Writable<string | undefined>;
|
|
17
|
+
id: string;
|
|
18
|
+
}, closeSettingsMenuFn: () => void) => Promise<void>;
|
|
16
19
|
export declare const handleChoseMenuItem: (event: KeyboardEvent, selectFn: () => void) => void;
|
|
17
20
|
export declare const handleSwitchMenuItem: (event: KeyboardEvent, enabled: boolean, selectFn: (value: boolean) => void) => void;
|
|
18
21
|
export declare const getContextMenuPositionByButton: (btnRef: HTMLButtonElement) => Position;
|
package/types/config.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ export interface IUIConfig {
|
|
|
38
38
|
minSubtitlesFontSize: number;
|
|
39
39
|
autoSubtitlesTimeout: Milliseconds;
|
|
40
40
|
trafficSavingLimit: ExactVideoQuality;
|
|
41
|
-
highQualityLimit: ExactVideoQuality;
|
|
42
41
|
episodeMinWidthPc: number;
|
|
43
42
|
controls: {
|
|
44
43
|
showOnStartupAtAutoplay: boolean;
|
|
@@ -99,7 +98,12 @@ export interface IUIConfig {
|
|
|
99
98
|
interactiveHideTime: boolean;
|
|
100
99
|
interactivePlayPrevChapter: boolean;
|
|
101
100
|
interactiveTimeIndicator: boolean;
|
|
102
|
-
|
|
101
|
+
interactiveButtonControlInteractiveTimeTimer: boolean;
|
|
102
|
+
interactiveAreaControlFrameBasedShadow: boolean;
|
|
103
|
+
interactiveTapPlaceShow: boolean;
|
|
104
|
+
interactiveControlsCTAAnimation: boolean;
|
|
105
|
+
interactiveControlsShowAnimation: boolean;
|
|
106
|
+
interactiveControlsHideAnimation: boolean;
|
|
103
107
|
thumbTimer: boolean;
|
|
104
108
|
hotKeyMapModal: boolean;
|
|
105
109
|
hotKeyHelpers: boolean;
|
|
@@ -120,7 +124,6 @@ export interface IUIConfig {
|
|
|
120
124
|
exposeInternalsToGlobal: boolean;
|
|
121
125
|
skipInitialPlaybackStateValue: boolean;
|
|
122
126
|
skipInitialPlaybackRateValue: boolean;
|
|
123
|
-
qualityDetailsSubMenuEnabled: boolean;
|
|
124
127
|
};
|
|
125
128
|
interactive: {
|
|
126
129
|
historyMaxLength: number;
|
package/types/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek } f
|
|
|
7
7
|
import type { Milliseconds, QualityLimits } from '@vkontakte/videoplayer-shared';
|
|
8
8
|
export { VERSION } from './env';
|
|
9
9
|
export declare const registerPlayerWebComponent: () => void;
|
|
10
|
-
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, } from './components/Menus/
|
|
10
|
+
export { type AdditionalSettingsMenuItem, MenuItemType, type AdditionalClickSettingsMenuItem, type AdditionalSwitchSettingsMenuItem, type AdditionalContextMenuItem, } from './components/Menus/types';
|
|
11
11
|
export { type AdditionalButton, ControlButtonType, } from './components/Controls/types';
|
|
12
12
|
export type { VKVideoPlayer, IVKVideoPlayerConfig, IControlInfo, IVKVideoPlayerCallbacks, IVideoData, AdsParams, HotKeyMapData, HotKeyMapItem, HotKeyMapGroup, ISources, IDashSource, URLSource, RawSource, URLSourceWithSeek, LanguagePack, LanguageConfig, Milliseconds, IVideoLive, IInteractiveData, AdditionalButtonDeprecated, QualityLimits, IVideoEpisode, ISDKConfig, };
|
|
13
13
|
export { GridTypes, };
|
package/types/store/index.d.ts
CHANGED
|
@@ -3,22 +3,17 @@ import { ChromecastState, PlaybackState, VideoFormat } from '@vkontakte/videopla
|
|
|
3
3
|
import { type IError, type ILogger, InterfaceLanguage, type IRectangle, type IValueObservable, type QualityLimits, VideoQuality, type InternalsExposure } from '@vkontakte/videoplayer-shared';
|
|
4
4
|
import type { IUIConfig } from '../config';
|
|
5
5
|
import { SeekAction } from '@vkontakte/videoplayer-statistics';
|
|
6
|
-
import type
|
|
6
|
+
import { type InteractiveRange } from '@vkontakte/videoplayer-interactive';
|
|
7
7
|
import type { Readable, Writable } from 'svelte/store';
|
|
8
8
|
import { AdmanWrapper } from '../components/Ads/admanWrapper';
|
|
9
9
|
import type { Key, LanguageConfig } from '../translation/types';
|
|
10
10
|
import type { AdditionalButtonDeprecated, ControlsKeys, HotKeyMapData, IAnnotationsApi, IControlInfo, IDisabledControls, IInteractiveData, IPictureInPictureApi, IPlayerPhase, ITimelinePreviewThumbsData, IVideoEpisode, IVKVideoPlayerCallbacks, IVKVideoPlayerUICallbacks, Position, VideoPlaybackRate, VideoQualityForRender, VideoQualityUI, VideoSubtitle, VideoSubtitleParsed } from '../types';
|
|
11
11
|
import { AdsPlaybackState } from '../types';
|
|
12
|
-
import { type QualitySettingsAppliesTo } from '../utils/userSettings';
|
|
13
12
|
import type { DebugData } from './utils';
|
|
14
13
|
import { GridTypes, type PlayPrevChapterDisabledTooltipKey } from '../constans';
|
|
15
14
|
import { UIOneStat } from '../services/statistics';
|
|
16
|
-
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, ContextMenuItem, SettingsMenuItem } from '../components/Menus/
|
|
15
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem, ContextMenuItem, SettingsMenuItem } from '../components/Menus/types';
|
|
17
16
|
import type { AdditionalButton, AdditionalDesktopControlPanelButton } from '../components/Controls/types';
|
|
18
|
-
type Info = {
|
|
19
|
-
appliesTo?: QualitySettingsAppliesTo;
|
|
20
|
-
changeReason?: 'default' | 'limit-changed';
|
|
21
|
-
};
|
|
22
17
|
export interface IAdsState {
|
|
23
18
|
position: Writable<number>;
|
|
24
19
|
duration: Writable<number>;
|
|
@@ -143,7 +138,6 @@ export interface IStore {
|
|
|
143
138
|
volume$: Readable<number>;
|
|
144
139
|
muted$: Readable<boolean>;
|
|
145
140
|
trafficSavingEnabled$: Readable<boolean>;
|
|
146
|
-
highQualityEnabled$: Readable<boolean>;
|
|
147
141
|
availableVideoStreams$: Readable<IVideoStream[]>;
|
|
148
142
|
availableAudioStreams$: Readable<IAudioStream[]>;
|
|
149
143
|
videoStream$: Readable<IVideoStream | undefined>;
|
|
@@ -186,10 +180,6 @@ export interface IStore {
|
|
|
186
180
|
playPrevChapterDisabledTooltip: PlayPrevChapterDisabledTooltipKey;
|
|
187
181
|
looped$: Writable<boolean>;
|
|
188
182
|
loadedMetadata$: Writable<boolean>;
|
|
189
|
-
/**
|
|
190
|
-
* Определяет, можно ли в целом увидеть/выбрать Авто режим выбора качества.
|
|
191
|
-
*/
|
|
192
|
-
isAutoQualityAvailable$: Readable<boolean>;
|
|
193
183
|
};
|
|
194
184
|
ui: IUIState;
|
|
195
185
|
ads: IAdsState;
|
|
@@ -206,12 +196,11 @@ export interface IStore {
|
|
|
206
196
|
closeSettingsMenu: (fromSubMenu?: boolean) => void;
|
|
207
197
|
openSettingsSubMenu: (name: string, ref: HTMLElement) => void;
|
|
208
198
|
closeSettingsSubMenu: (ref: HTMLElement, isClosing?: boolean) => void;
|
|
209
|
-
setTrafficSavingEnabled: (trafficSavingEnabled: boolean
|
|
210
|
-
setHighQualityEnabled: (highQualityEnabled: boolean, appliesTo?: QualitySettingsAppliesTo) => void;
|
|
199
|
+
setTrafficSavingEnabled: (trafficSavingEnabled: boolean) => void;
|
|
211
200
|
setVolume: (volume: number, preferredVolume?: number) => void;
|
|
212
201
|
setAudioStream: (stream: IAudioStream) => void;
|
|
213
202
|
setVideoStream: (stream: IVideoStream) => void;
|
|
214
|
-
setQuality: (quality: VideoQualityUI
|
|
203
|
+
setQuality: (quality: VideoQualityUI) => void;
|
|
215
204
|
setPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
216
205
|
incrementPlaybackRate: () => void;
|
|
217
206
|
decrementPlaybackRate: () => void;
|
|
@@ -297,7 +286,6 @@ export interface IStore {
|
|
|
297
286
|
setUiCallbacks: (uiCallbacks: IVKVideoPlayerUICallbacks) => void;
|
|
298
287
|
getAdmanWrapper: () => AdmanWrapper;
|
|
299
288
|
getLogger: () => ILogger;
|
|
300
|
-
getPlayer: () => IPlayer;
|
|
301
289
|
destroy(): void;
|
|
302
290
|
}
|
|
303
291
|
interface IStoreParams {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InterfaceLanguage } from '@vkontakte/videoplayer-shared';
|
|
2
|
-
export type Key = 'auto_quality_invariant' | 'auto_quality' | 'menu_quality' | 'menu_playback_rate' | 'menu_traffic_saving' | 'menu_report' | 'menu_pip' | 'menu_copy_video_link' | 'menu_copy_video_link_with_timestamp' | 'menu_video_rotate' | 'menu_video_loop_on' | 'menu_video_loop_off' | 'menu_chromecast' | 'menu_copy_debug' | 'menu_save_debug' | 'menu_debug_overlay' | 'menu_copy_embed_code' | 'pip_dummy_title' | 'submenu_traffic_saving' | 'submenu_quality' | 'submenu_playback_rate' | 'submenu_settings' | 'submenu_audio_languages' | 'auto_quality_option' | 'mobile_unmute' | 'playing_ads' | 'skip_ads_now' | 'skip_ads_after' | 'visit_advertiser' | 'aria_timeline' | 'aria_open_settings' | 'aria_timeline_value' | 'doubletap_seek_step' | 'playback_rate_1' | 'playback_rate' | 'video360' | 'subtitles_caption' | 'subtitles_auto' | 'subtitles_off' | 'subtitles_auto_caption' | 'subtitles_turn_on' | 'subtitles_turn_off' | 'traffic_saving_off' | 'traffic_saving_on' | 'traffic_saving_disable' | 'traffic_saving_enable' | 'traffic_saving_helper_text' | 'tooltip_previous' | 'tooltip_restart' | 'tooltip_play' | 'tooltip_pause' | 'tooltip_next' | 'tooltip_button_disabled' | 'tooltip_interactive_go_back' | 'tooltip_interactive_go_back_disabled' | 'tooltip_interactive_go_back_disabled_first' | 'tooltip_interactive_go_back_disabled_limit' | 'tooltip_chapter_without_interactive' | 'tooltip_interactive_of_chapter_completed' | 'tooltip_interactive_seek' | 'tooltip_interactive_graph_off' | 'tooltip_interactive_graph_on' | 'tooltip_live' | 'tooltip_episodes' | 'tooltip_volume' | 'tooltip_volume_muted' | 'tooltip_settings_on' | 'tooltip_subtitles_off' | 'tooltip_settings_off' | 'tooltip_subtitles_on' | 'tooltip_fullscreen_off' | 'tooltip_fullscreen_on' | 'tooltip_chromecast_off' | 'tooltip_chromecast_on' | 'tooltip_episode_finished' | 'tooltip_episode_unfinished' | 'tooltip_disabled_when_interactive' | 'tooltip_disabled_when_graph_on' | 'tooltip_interactive_interaction_time_indicator' | 'tooltip_vk_logo' | 'tooltip_vk_video_logo' | 'download_video_caption' | 'hotkey_helper_current_volume' | 'hotkey_map_modal_title' | 'hotkey_map_modal_close_btn_text' | 'hotkey_map_group_title_common' | 'hotkey_map_group_title_playback' | 'hotkey_map_group_title_subtitles' | 'hotkey_map_group_title_episodes' | 'hotkey_map_item_mute_description' | 'hotkey_map_item_mute_value' | 'hotkey_map_item_volume_down_description' | 'hotkey_map_item_volume_down_value' | 'hotkey_map_item_volume_up_description' | 'hotkey_map_item_volume_up_value' | 'hotkey_map_item_pip_description' | 'hotkey_map_item_pip_value' | 'hotkey_map_item_full_screen_description' | 'hotkey_map_item_full_screen_value' | 'hotkey_map_item_show_context_menu_description' | 'hotkey_map_item_show_context_menu_value' | 'hotkey_map_item_show_hotkey_map_description' | 'hotkey_map_item_show_hotkey_map_value' | 'hotkey_map_item_play_toggle_description' | 'hotkey_map_item_play_toggle_value' | 'hotkey_map_item_seek_backward_description' | 'hotkey_map_item_seek_backward_value' | 'hotkey_map_item_seek_forward_description' | 'hotkey_map_item_seek_forward_value' | 'hotkey_map_item_fast_seek_backward_description' | 'hotkey_map_item_fast_seek_backward_value' | 'hotkey_map_item_fast_seek_forward_description' | 'hotkey_map_item_fast_seek_forward_value' | 'hotkey_map_item_rate_down_description' | 'hotkey_map_item_rate_down_value' | 'hotkey_map_item_rate_up_description' | 'hotkey_map_item_rate_up_value' | 'hotkey_map_item_prev_frame_description' | 'hotkey_map_item_prev_frame_value' | 'hotkey_map_item_next_frame_description' | 'hotkey_map_item_next_frame_value' | 'hotkey_map_item_jump_seek_description' | 'hotkey_map_item_jump_seek_value' | 'hotkey_map_item_subtitles_toggle_description' | 'hotkey_map_item_subtitles_toggle_value' | 'hotkey_map_item_prev_episode_description' | 'hotkey_map_item_prev_episode_pc_value' | 'hotkey_map_item_prev_episode_mac_value' | 'hotkey_map_item_next_episode_description' | 'hotkey_map_item_next_episode_pc_value' | 'hotkey_map_item_next_episode_mac_value' | 'hotkey_map_item_next_video_description' | 'hotkey_map_item_next_video_value' | 'hotkey_map_item_prev_video_description' | 'hotkey_map_item_prev_video_value' | 'waiting_live_day_value' | 'waiting_live_hour_value' | 'waiting_live_minute_value' | 'waiting_live_second_value' | 'waiting_live_colon' | 'waiting_live_upcoming_title' | 'waiting_live_timer_title' | 'waiting_live_recover_title' | 'waiting_record_title' | 'aria_label_submenu_traffic_saving_off' | 'aria_label_submenu_traffic_saving_on' | 'aria_label_submenu_back' | 'aria_label_menu_quality' | 'aria_label_menu_rate' | 'aria_label_menu_subtitle' | 'aria_label_menu_download' | 'aria_label_new_tab_alert' | 'aria_label_menu_debug_overlay_enable' | 'aria_label_menu_debug_overlay_disable' | 'aria_label_menu_rotate' | 'aria_label_menu_loop' | 'aria_label_debug_panel' | 'aria_label_context_menu_open' | 'aria_label_context_menu_close' | 'aria_label_video_player' | 'aria_label_spherical_control' | 'aria_label_menu_audio_languages' | 'menu_audio_languages' | 'audio_stream_display_language_label' | 'audio_stream_display_language_label_index' | 'audio_stream_display_label_index' | 'audio_stream_display_language_index' | 'audio_stream_display_unknown' | 'end_screen_next_video' | 'end_screen_recommended_video'
|
|
2
|
+
export type Key = 'auto_quality_invariant' | 'auto_quality' | 'menu_quality' | 'menu_playback_rate' | 'menu_traffic_saving' | 'menu_report' | 'menu_pip' | 'menu_copy_video_link' | 'menu_copy_video_link_with_timestamp' | 'menu_video_rotate' | 'menu_video_loop_on' | 'menu_video_loop_off' | 'menu_chromecast' | 'menu_copy_debug' | 'menu_save_debug' | 'menu_debug_overlay' | 'menu_copy_embed_code' | 'pip_dummy_title' | 'submenu_traffic_saving' | 'submenu_quality' | 'submenu_playback_rate' | 'submenu_settings' | 'submenu_audio_languages' | 'auto_quality_option' | 'mobile_unmute' | 'playing_ads' | 'skip_ads_now' | 'skip_ads_after' | 'visit_advertiser' | 'aria_timeline' | 'aria_open_settings' | 'aria_timeline_value' | 'doubletap_seek_step' | 'playback_rate_1' | 'playback_rate' | 'video360' | 'subtitles_caption' | 'subtitles_auto' | 'subtitles_off' | 'subtitles_auto_caption' | 'subtitles_turn_on' | 'subtitles_turn_off' | 'traffic_saving_off' | 'traffic_saving_on' | 'traffic_saving_disable' | 'traffic_saving_enable' | 'traffic_saving_helper_text' | 'tooltip_previous' | 'tooltip_restart' | 'tooltip_play' | 'tooltip_pause' | 'tooltip_next' | 'tooltip_button_disabled' | 'tooltip_interactive_go_back' | 'tooltip_interactive_go_back_disabled' | 'tooltip_interactive_go_back_disabled_first' | 'tooltip_interactive_go_back_disabled_limit' | 'tooltip_chapter_without_interactive' | 'tooltip_interactive_of_chapter_completed' | 'tooltip_interactive_seek' | 'tooltip_interactive_graph_off' | 'tooltip_interactive_graph_on' | 'tooltip_live' | 'tooltip_episodes' | 'tooltip_volume' | 'tooltip_volume_muted' | 'tooltip_settings_on' | 'tooltip_subtitles_off' | 'tooltip_settings_off' | 'tooltip_subtitles_on' | 'tooltip_fullscreen_off' | 'tooltip_fullscreen_on' | 'tooltip_chromecast_off' | 'tooltip_chromecast_on' | 'tooltip_episode_finished' | 'tooltip_episode_unfinished' | 'tooltip_disabled_when_interactive' | 'tooltip_disabled_when_graph_on' | 'tooltip_interactive_interaction_time_indicator' | 'tooltip_vk_logo' | 'tooltip_vk_video_logo' | 'download_video_caption' | 'hotkey_helper_current_volume' | 'hotkey_map_modal_title' | 'hotkey_map_modal_close_btn_text' | 'hotkey_map_group_title_common' | 'hotkey_map_group_title_playback' | 'hotkey_map_group_title_subtitles' | 'hotkey_map_group_title_episodes' | 'hotkey_map_item_mute_description' | 'hotkey_map_item_mute_value' | 'hotkey_map_item_volume_down_description' | 'hotkey_map_item_volume_down_value' | 'hotkey_map_item_volume_up_description' | 'hotkey_map_item_volume_up_value' | 'hotkey_map_item_pip_description' | 'hotkey_map_item_pip_value' | 'hotkey_map_item_full_screen_description' | 'hotkey_map_item_full_screen_value' | 'hotkey_map_item_show_context_menu_description' | 'hotkey_map_item_show_context_menu_value' | 'hotkey_map_item_show_hotkey_map_description' | 'hotkey_map_item_show_hotkey_map_value' | 'hotkey_map_item_play_toggle_description' | 'hotkey_map_item_play_toggle_value' | 'hotkey_map_item_seek_backward_description' | 'hotkey_map_item_seek_backward_value' | 'hotkey_map_item_seek_forward_description' | 'hotkey_map_item_seek_forward_value' | 'hotkey_map_item_fast_seek_backward_description' | 'hotkey_map_item_fast_seek_backward_value' | 'hotkey_map_item_fast_seek_forward_description' | 'hotkey_map_item_fast_seek_forward_value' | 'hotkey_map_item_rate_down_description' | 'hotkey_map_item_rate_down_value' | 'hotkey_map_item_rate_up_description' | 'hotkey_map_item_rate_up_value' | 'hotkey_map_item_prev_frame_description' | 'hotkey_map_item_prev_frame_value' | 'hotkey_map_item_next_frame_description' | 'hotkey_map_item_next_frame_value' | 'hotkey_map_item_jump_seek_description' | 'hotkey_map_item_jump_seek_value' | 'hotkey_map_item_subtitles_toggle_description' | 'hotkey_map_item_subtitles_toggle_value' | 'hotkey_map_item_prev_episode_description' | 'hotkey_map_item_prev_episode_pc_value' | 'hotkey_map_item_prev_episode_mac_value' | 'hotkey_map_item_next_episode_description' | 'hotkey_map_item_next_episode_pc_value' | 'hotkey_map_item_next_episode_mac_value' | 'hotkey_map_item_next_video_description' | 'hotkey_map_item_next_video_value' | 'hotkey_map_item_prev_video_description' | 'hotkey_map_item_prev_video_value' | 'waiting_live_day_value' | 'waiting_live_hour_value' | 'waiting_live_minute_value' | 'waiting_live_second_value' | 'waiting_live_colon' | 'waiting_live_upcoming_title' | 'waiting_live_timer_title' | 'waiting_live_recover_title' | 'waiting_record_title' | 'aria_label_submenu_traffic_saving_off' | 'aria_label_submenu_traffic_saving_on' | 'aria_label_submenu_back' | 'aria_label_menu_quality' | 'aria_label_menu_rate' | 'aria_label_menu_subtitle' | 'aria_label_menu_download' | 'aria_label_new_tab_alert' | 'aria_label_menu_debug_overlay_enable' | 'aria_label_menu_debug_overlay_disable' | 'aria_label_menu_rotate' | 'aria_label_menu_loop' | 'aria_label_debug_panel' | 'aria_label_context_menu_open' | 'aria_label_context_menu_close' | 'aria_label_video_player' | 'aria_label_spherical_control' | 'aria_label_menu_audio_languages' | 'menu_audio_languages' | 'audio_stream_display_language_label' | 'audio_stream_display_language_label_index' | 'audio_stream_display_label_index' | 'audio_stream_display_language_index' | 'audio_stream_display_unknown' | 'end_screen_next_video' | 'end_screen_recommended_video';
|
|
3
3
|
export type LanguagePack = Record<Key, string>;
|
|
4
4
|
export type LanguageConfig = {
|
|
5
5
|
language: string;
|
package/types/types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Controls, GridTypes, type SeekToInteractiveDisabledTooltipKey } from '.
|
|
|
9
9
|
import type { Key } from '../translation/types';
|
|
10
10
|
import type { IUIStatistics } from '../services/statistics';
|
|
11
11
|
import { UISentry } from '../services/sentry';
|
|
12
|
-
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/
|
|
12
|
+
import type { AdditionalContextMenuItem, AdditionalSettingsMenuItem } from '../components/Menus/types';
|
|
13
13
|
export declare const enum UIType {
|
|
14
14
|
DESKTOP = "desktop",
|
|
15
15
|
MOBILE = "mobile"
|
|
@@ -15,20 +15,3 @@ export declare const savePreferredRate: (rate: PlaybackRate) => void;
|
|
|
15
15
|
export declare const getPreferredRate: () => PlaybackRate | undefined;
|
|
16
16
|
export declare const savePreferredAutoplayNext: (autoplayNext: boolean) => void;
|
|
17
17
|
export declare const getPreferredAutoplayNext: () => boolean;
|
|
18
|
-
type PreferredQualitySettingsType = 'traffic_saving' | 'high_quality' | 'auto_quality' | 'exact_video';
|
|
19
|
-
type PreferredQualitySettingsValue = {
|
|
20
|
-
type: Exclude<PreferredQualitySettingsType, 'exact_video'>;
|
|
21
|
-
videoId?: number;
|
|
22
|
-
} | {
|
|
23
|
-
type: 'exact_quality';
|
|
24
|
-
quality: VideoQuality;
|
|
25
|
-
videoId?: number;
|
|
26
|
-
};
|
|
27
|
-
type DefaultPreferredQualitySettingsValue = Exclude<PreferredQualitySettingsValue, {
|
|
28
|
-
type: 'exact_quality';
|
|
29
|
-
}>;
|
|
30
|
-
export type QualitySettingsAppliesTo = 'as-default' | 'to-video';
|
|
31
|
-
export declare const getPreferredQualitySettings: (videoId: number | undefined) => (PreferredQualitySettingsValue & {
|
|
32
|
-
appliesTo: QualitySettingsAppliesTo;
|
|
33
|
-
}) | null, migrateSettingsToLegacyWay: (videoId?: number) => void, savePreferredQualitySettings: (value: PreferredQualitySettingsValue, appliesTo?: QualitySettingsAppliesTo) => void, savePreferredDefaultQualitySettings: (value: DefaultPreferredQualitySettingsValue) => void, removePreferredQualitySettingsByVideo: () => void, getPreferredDefaultQualitySettings: () => DefaultPreferredQualitySettingsValue | null;
|
|
34
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { RootMenuId, type SettingsMenuItem } from './types';
|
|
2
|
-
import { type VideoPlaybackRate, type VideoSubtitle } from '../../../types';
|
|
3
|
-
import type { IAudioStream, PlaybackRate, VideoQuality } from '@vkontakte/videoplayer-core';
|
|
4
|
-
import type { QualitySettingsAppliesTo } from '../../../utils/userSettings';
|
|
5
|
-
export type Context = {
|
|
6
|
-
currentPlaybackRate: number;
|
|
7
|
-
availablePlaybackRates: VideoPlaybackRate[];
|
|
8
|
-
selectPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
9
|
-
trafficSavingEnabled: boolean;
|
|
10
|
-
toggleTrafficSaving: (value: boolean, appliesTo: QualitySettingsAppliesTo) => void;
|
|
11
|
-
currentQuality: VideoQuality;
|
|
12
|
-
isAutoQualityEnabled: boolean;
|
|
13
|
-
isMobile: boolean;
|
|
14
|
-
currentAudioStream: IAudioStream | undefined;
|
|
15
|
-
availableAudioStreams: IAudioStream[];
|
|
16
|
-
qualityDetailsSubMenuEnabled: boolean;
|
|
17
|
-
currentSubtitle: Omit<VideoSubtitle, 'selected'>;
|
|
18
|
-
onDownloadClick: () => void;
|
|
19
|
-
onReportProblemClick: () => void;
|
|
20
|
-
onCopyDataClick: () => void;
|
|
21
|
-
onSaveTraceDataClick: () => void;
|
|
22
|
-
toggleShowDebugInfo: () => void;
|
|
23
|
-
debugPanelVisible: boolean;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Мапа элементов меню, которые показываются на первом уровне.
|
|
27
|
-
*/
|
|
28
|
-
export declare const RootMenuItemMap: Record<RootMenuId, (context: Context) => SettingsMenuItem>;
|
|
29
|
-
type Params = {
|
|
30
|
-
items: RootMenuId[];
|
|
31
|
-
context: Context;
|
|
32
|
-
additionalSettingsMenuItems: SettingsMenuItem[];
|
|
33
|
-
};
|
|
34
|
-
export declare const getRootMenuItems: ({ items, context, additionalSettingsMenuItems }: Params) => SettingsMenuItem[];
|
|
35
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type Context, type SubMenuItem } from './types';
|
|
2
|
-
import type { QualitySettingsAppliesTo } from 'packages/ui/src/utils/userSettings';
|
|
3
|
-
export type QualityHandler = (params: {
|
|
4
|
-
labelWithQuality: boolean;
|
|
5
|
-
appliesTo: QualitySettingsAppliesTo;
|
|
6
|
-
selected: boolean;
|
|
7
|
-
}, context: Context) => SubMenuItem;
|
|
8
|
-
type DefaultHandler = (context: Context) => SubMenuItem;
|
|
9
|
-
/**
|
|
10
|
-
* В данном файле определяем элементы меню, которые могут использоваться в разных подменю.
|
|
11
|
-
*/
|
|
12
|
-
export declare const getMenuItemForAnotherQuality: DefaultHandler;
|
|
13
|
-
export declare const getMenuItemForAutoQuality: QualityHandler;
|
|
14
|
-
export declare const getMenuItemForQualityApplience: DefaultHandler;
|
|
15
|
-
export declare const getMenuItemForHighQuality: QualityHandler;
|
|
16
|
-
export declare const getMenuItemForTrafficSaving: QualityHandler;
|
|
17
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SubMenuId, type Context } from './types';
|
|
2
|
-
type Params = {
|
|
3
|
-
subMenuId: SubMenuId | null;
|
|
4
|
-
context: Context;
|
|
5
|
-
};
|
|
6
|
-
export declare const getSubMenuData: ({ subMenuId, context }: Params) => {
|
|
7
|
-
title: string;
|
|
8
|
-
closeSettingsMenu?: () => void;
|
|
9
|
-
items: import("./types").SubMenuItem[];
|
|
10
|
-
id: SubMenuId;
|
|
11
|
-
minWidth?: number;
|
|
12
|
-
}[];
|
|
13
|
-
export {};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import type { UIType, VideoPlaybackRate, VideoQualityForRender, VideoQualityUI, VideoSubtitle } from '../../../types';
|
|
2
|
-
import type { IAudioStream, PlaybackRate, VideoQuality } from '@vkontakte/videoplayer-core';
|
|
3
|
-
import type { QualitySettingsAppliesTo } from '../../../utils/userSettings';
|
|
4
|
-
import type { TmpComponentType } from 'packages/ui/src/types/tmp';
|
|
5
|
-
export declare enum SharedSubMenuItemId {
|
|
6
|
-
QUALITY_OTHER = "QUALITY_OTHER",
|
|
7
|
-
QUALITY_AUTO = "QUALITY_AUTO",
|
|
8
|
-
QUALITY_APPLIENCE = "QUALITY_APPLIENCE",
|
|
9
|
-
QUALITY_HIGH = "QUALITY_HIGH",
|
|
10
|
-
QUALITY_TRAFFIC_SAVING = "QUALITY_TRAFFIC_SAVING"
|
|
11
|
-
}
|
|
12
|
-
export declare enum SubMenuId {
|
|
13
|
-
PLAYBACK_RATE_SUB_MENU = "PLAYBACK_RATE_SUB_MENU",
|
|
14
|
-
QUALITY_DETAILS = "QUALITY_DETAILS",
|
|
15
|
-
QUALITY = "QUALITY",
|
|
16
|
-
QUALITY_APPLIENCE = "QUALITY_APPLIENCE",
|
|
17
|
-
AUDIO_LANGUAGES = "AUDIO_LANGUAGES",
|
|
18
|
-
SUBTITLES = "SUBTITLES"
|
|
19
|
-
}
|
|
20
|
-
export declare enum RootMenuId {
|
|
21
|
-
QUALITY_SETTINGS = "QUALITY_SETTINGS",
|
|
22
|
-
TRAFFIC_SAVING_SWITCH = "TRAFFIC_SAVING_SWITCH",
|
|
23
|
-
AUDIO_LANGUAGES = "AUDIO_LANGUAGES",
|
|
24
|
-
PLAYBACK_RATE = "PLAYBACK_RATE",
|
|
25
|
-
SUBTITLES = "SUBTITLES",
|
|
26
|
-
DOWNLOAD = "DOWNLOAD",
|
|
27
|
-
SHOW_SUPPORT = "SHOW_SUPPORT",
|
|
28
|
-
COPY_DATA = "COPY_DATA",
|
|
29
|
-
SAVE_TRACE_INFO = "SAVE_TRACE_INFO",
|
|
30
|
-
DEBUG_INFO = "DEBUG_INFO"
|
|
31
|
-
}
|
|
32
|
-
export type Context = {
|
|
33
|
-
closeSettingsMenu: () => void;
|
|
34
|
-
isMobile: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Скорость.
|
|
37
|
-
*/
|
|
38
|
-
availablePlaybackRates: VideoPlaybackRate[];
|
|
39
|
-
selectPlaybackRate: (playbackRate: PlaybackRate) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Качество.
|
|
42
|
-
*/
|
|
43
|
-
selectQuality: (quality: VideoQualityUI, appliesTo: QualitySettingsAppliesTo) => void;
|
|
44
|
-
isAutoQualityEnabled: boolean;
|
|
45
|
-
isAutoQualityAvailable: boolean;
|
|
46
|
-
highQualityEnabled: boolean;
|
|
47
|
-
toggleHighQuality: (value: boolean, appliesTo: QualitySettingsAppliesTo) => void;
|
|
48
|
-
trafficSavingEnabled: boolean;
|
|
49
|
-
toggleTrafficSaving: (value: boolean, appliesTo: QualitySettingsAppliesTo) => void;
|
|
50
|
-
currentQuality: VideoQuality;
|
|
51
|
-
availableQualities: VideoQualityForRender[];
|
|
52
|
-
/**
|
|
53
|
-
* Звуковые дорожки.
|
|
54
|
-
*/
|
|
55
|
-
availableAudioStreams: IAudioStream[];
|
|
56
|
-
selectAudioLanguage: (stream: IAudioStream) => void;
|
|
57
|
-
currentAudioStream: IAudioStream | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Субтитры
|
|
60
|
-
*/
|
|
61
|
-
availableSubtitlesList: VideoSubtitle[];
|
|
62
|
-
selectSubtitle: (subtitle: VideoSubtitle) => void;
|
|
63
|
-
};
|
|
64
|
-
export type SubMenuData = (context: Context) => {
|
|
65
|
-
title: string;
|
|
66
|
-
closeSettingsMenu?: () => void;
|
|
67
|
-
items: SubMenuItem[];
|
|
68
|
-
id: SubMenuId;
|
|
69
|
-
minWidth?: number;
|
|
70
|
-
};
|
|
71
|
-
export type SubMenuItem = SubMenuItemOpenSubMenu | SubMenuItemSelect;
|
|
72
|
-
type BaseSubMenuItem<U = any> = {
|
|
73
|
-
selected?: boolean;
|
|
74
|
-
valueComponent?: TmpComponentType;
|
|
75
|
-
valueComponentParams?: {
|
|
76
|
-
[key: string]: U;
|
|
77
|
-
};
|
|
78
|
-
bottomBordered?: boolean;
|
|
79
|
-
label?: string;
|
|
80
|
-
sublabel?: string;
|
|
81
|
-
ariaLabel?: string;
|
|
82
|
-
};
|
|
83
|
-
export type SubMenuItemOpenSubMenu = {
|
|
84
|
-
type: SubMenuItemType.OPEN_SUB_MENU;
|
|
85
|
-
children: SubMenuId;
|
|
86
|
-
id: SharedSubMenuItemId;
|
|
87
|
-
} & BaseSubMenuItem;
|
|
88
|
-
export type SubMenuItemSelect<T = any> = {
|
|
89
|
-
type: SubMenuItemType.SELECT_VALUE;
|
|
90
|
-
value: T;
|
|
91
|
-
selectItem: (value: T) => void;
|
|
92
|
-
} & BaseSubMenuItem;
|
|
93
|
-
interface BaseMenuItem<Id> {
|
|
94
|
-
id: Id;
|
|
95
|
-
weight: number;
|
|
96
|
-
ariaLabel?: string;
|
|
97
|
-
label: string;
|
|
98
|
-
}
|
|
99
|
-
interface BaseSettingsMenuItem extends BaseMenuItem<RootMenuId> {
|
|
100
|
-
icon: TmpComponentType;
|
|
101
|
-
isHiddenFor?: UIType[];
|
|
102
|
-
}
|
|
103
|
-
export declare enum MenuItemType {
|
|
104
|
-
OPEN_SUB_MENU = "OPEN_SUB_MENU",
|
|
105
|
-
CLICK = "CLICK",
|
|
106
|
-
SWITCH = "SWITCH"
|
|
107
|
-
}
|
|
108
|
-
export declare enum SubMenuItemType {
|
|
109
|
-
OPEN_SUB_MENU = "OPEN_SUB_MENU",
|
|
110
|
-
SELECT_VALUE = "SELECT_VALUE"
|
|
111
|
-
}
|
|
112
|
-
export interface OpenSubMenuSettingsMenuItem extends BaseSettingsMenuItem {
|
|
113
|
-
type: MenuItemType.OPEN_SUB_MENU;
|
|
114
|
-
value: string;
|
|
115
|
-
valueComponent?: TmpComponentType;
|
|
116
|
-
children: SubMenuId;
|
|
117
|
-
}
|
|
118
|
-
export interface ClickSettingsMenuItem extends BaseSettingsMenuItem {
|
|
119
|
-
type: MenuItemType.CLICK;
|
|
120
|
-
onClick: () => void;
|
|
121
|
-
}
|
|
122
|
-
export interface SwitchSettingsMenuItem extends BaseSettingsMenuItem {
|
|
123
|
-
type: MenuItemType.SWITCH;
|
|
124
|
-
onClick: (enabled: boolean) => void;
|
|
125
|
-
enabled: boolean;
|
|
126
|
-
tooltipText?: string;
|
|
127
|
-
maxTooltipWidth?: number;
|
|
128
|
-
}
|
|
129
|
-
export type AdditionalSwitchSettingsMenuItem = Omit<SwitchSettingsMenuItem, 'icon' | 'onClick'> & {
|
|
130
|
-
icon: string;
|
|
131
|
-
onChangeEnabled: (enabled: boolean) => void;
|
|
132
|
-
};
|
|
133
|
-
export type AdditionalClickSettingsMenuItem = Omit<SwitchSettingsMenuItem, 'icon'> & {
|
|
134
|
-
icon: string;
|
|
135
|
-
};
|
|
136
|
-
export type SettingsMenuItem = OpenSubMenuSettingsMenuItem | ClickSettingsMenuItem | SwitchSettingsMenuItem;
|
|
137
|
-
export type AdditionalSettingsMenuItem = AdditionalSwitchSettingsMenuItem | AdditionalClickSettingsMenuItem;
|
|
138
|
-
export interface ContextMenuItem extends BaseMenuItem<string> {
|
|
139
|
-
onClick: () => void;
|
|
140
|
-
}
|
|
141
|
-
export type AdditionalContextMenuItem = ContextMenuItem;
|
|
142
|
-
export type MenuRefs = {
|
|
143
|
-
[key: string]: HTMLUListElement;
|
|
144
|
-
};
|
|
145
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type QualitySettingsAppliesTo } from '../../../utils/userSettings';
|
|
2
|
-
export declare const getEnrichWithQualityAppliesTo: (appliesTo: QualitySettingsAppliesTo) => <T>(fn: (value: T, appliesTo: QualitySettingsAppliesTo) => void) => (value: T) => void;
|
|
3
|
-
export declare function isDefined<T>(x: T | undefined): x is T;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SubMenuId } from '../subMenuTabs/types';
|
|
2
|
-
/**
|
|
3
|
-
* Представляем цепочку открытия подменюшек стеком, таким образом можем открывать хоть сколько.
|
|
4
|
-
*/
|
|
5
|
-
export declare const getSubMenusStack: () => {
|
|
6
|
-
readonly current: SubMenuId | null;
|
|
7
|
-
pushSubMenu: (subMenuId: SubMenuId) => void;
|
|
8
|
-
popSubMenu: () => void;
|
|
9
|
-
popAllSubMenus: () => void;
|
|
10
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
type AllowedHTML = Record<string, boolean>;
|
|
2
|
-
/**
|
|
3
|
-
* В дальнейшем можно по надобности указывать возможные атрибуты.
|
|
4
|
-
*/
|
|
5
|
-
export declare const DEFAULT_ALLOWED_HTML: AllowedHTML;
|
|
6
|
-
export declare const interpolateMessage: (message?: string, customAllowedHTML?: AllowedHTML) => string | undefined;
|
|
7
|
-
export {};
|