@gravity-ui/page-constructor 5.25.0 → 5.26.1

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 (40) hide show
  1. package/build/cjs/blocks/Header/schema.d.ts +21 -3
  2. package/build/cjs/blocks/HeaderSlider/schema.d.ts +8 -1
  3. package/build/cjs/blocks/Media/schema.d.ts +10 -2
  4. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +5 -1
  5. package/build/cjs/blocks/Tabs/schema.d.ts +5 -1
  6. package/build/cjs/components/Media/Video/Video.js +2 -2
  7. package/build/cjs/components/ReactPlayer/ReactPlayer.css +7 -0
  8. package/build/cjs/components/ReactPlayer/ReactPlayer.d.ts +1 -0
  9. package/build/cjs/components/ReactPlayer/ReactPlayer.js +15 -4
  10. package/build/cjs/editor/components/AddBlock/AddBlock.js +23 -6
  11. package/build/cjs/editor/data/index.d.ts +3 -2
  12. package/build/cjs/editor/data/index.js +19 -12
  13. package/build/cjs/models/constructor-items/common.d.ts +2 -1
  14. package/build/cjs/schema/constants.d.ts +5 -1
  15. package/build/cjs/schema/validators/common.d.ts +11 -1
  16. package/build/cjs/schema/validators/common.js +5 -1
  17. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +5 -1
  18. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +5 -1
  19. package/build/esm/blocks/Header/schema.d.ts +21 -3
  20. package/build/esm/blocks/HeaderSlider/schema.d.ts +8 -1
  21. package/build/esm/blocks/Media/schema.d.ts +10 -2
  22. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +5 -1
  23. package/build/esm/blocks/Tabs/schema.d.ts +5 -1
  24. package/build/esm/components/Media/Video/Video.js +2 -2
  25. package/build/esm/components/ReactPlayer/ReactPlayer.css +7 -0
  26. package/build/esm/components/ReactPlayer/ReactPlayer.d.ts +1 -0
  27. package/build/esm/components/ReactPlayer/ReactPlayer.js +15 -4
  28. package/build/esm/editor/components/AddBlock/AddBlock.js +24 -7
  29. package/build/esm/editor/data/index.d.ts +3 -2
  30. package/build/esm/editor/data/index.js +18 -12
  31. package/build/esm/models/constructor-items/common.d.ts +2 -1
  32. package/build/esm/schema/constants.d.ts +5 -1
  33. package/build/esm/schema/validators/common.d.ts +11 -1
  34. package/build/esm/schema/validators/common.js +5 -1
  35. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +5 -1
  36. package/build/esm/sub-blocks/MediaCard/schema.d.ts +5 -1
  37. package/package.json +1 -1
  38. package/server/models/constructor-items/common.d.ts +2 -1
  39. package/styles/variables.scss +1 -0
  40. package/widget/index.js +1 -1
@@ -156,6 +156,9 @@ export declare const Media: {
156
156
  ariaLabel: {
157
157
  type: string;
158
158
  };
159
+ contain: {
160
+ type: string;
161
+ };
159
162
  };
160
163
  };
161
164
  youtube: {
@@ -275,7 +278,8 @@ export declare const Media: {
275
278
  })[];
276
279
  };
277
280
  ratio: {
278
- type: string;
281
+ type: string[];
282
+ pattern: string;
279
283
  };
280
284
  iframe: {
281
285
  type: string;
@@ -782,6 +786,9 @@ export declare const MediaBlock: {
782
786
  ariaLabel: {
783
787
  type: string;
784
788
  };
789
+ contain: {
790
+ type: string;
791
+ };
785
792
  };
786
793
  };
787
794
  youtube: {
@@ -901,7 +908,8 @@ export declare const MediaBlock: {
901
908
  })[];
902
909
  };
903
910
  ratio: {
904
- type: string;
911
+ type: string[];
912
+ pattern: string;
905
913
  };
906
914
  iframe: {
907
915
  type: string;
@@ -172,6 +172,9 @@ export declare const PromoFeaturesItem: {
172
172
  ariaLabel: {
173
173
  type: string;
174
174
  };
175
+ contain: {
176
+ type: string;
177
+ };
175
178
  };
176
179
  };
177
180
  youtube: {
@@ -291,7 +294,8 @@ export declare const PromoFeaturesItem: {
291
294
  })[];
292
295
  };
293
296
  ratio: {
294
- type: string;
297
+ type: string[];
298
+ pattern: string;
295
299
  };
296
300
  iframe: {
297
301
  type: string;
@@ -167,6 +167,9 @@ export declare const tabsItem: {
167
167
  ariaLabel: {
168
168
  type: string;
169
169
  };
170
+ contain: {
171
+ type: string;
172
+ };
170
173
  };
171
174
  };
172
175
  youtube: {
@@ -286,7 +289,8 @@ export declare const tabsItem: {
286
289
  })[];
287
290
  };
288
291
  ratio: {
289
- type: string;
292
+ type: string[];
293
+ pattern: string;
290
294
  };
291
295
  iframe: {
292
296
  type: string;
@@ -29,8 +29,8 @@ const Video = (props) => {
29
29
  }
30
30
  }, [playVideo, video, setHasVideoFallback]);
31
31
  const reactPlayerBlock = useMemo(() => {
32
- const { src, loop, controls, muted, autoplay = true, elapsedTime, playButton, ariaLabel, customControlsOptions, } = video;
33
- return (React.createElement(ReactPlayerBlock, { ref: ref, className: b('react-player', videoClassName), src: src, previewImgUrl: previewImg, loop: Boolean(loop), controls: controls, muted: muted, autoplay: autoplay && playVideo, elapsedTime: elapsedTime, playButton: playButton || commonPlayButton, customBarControlsClassName: customBarControlsClassName, analyticsEvents: analyticsEvents, height: height, ariaLabel: ariaLabel, customControlsOptions: customControlsOptions, ratio: ratio }));
32
+ const { src, loop, controls, muted, autoplay = true, elapsedTime, playButton, ariaLabel, customControlsOptions, contain, } = video;
33
+ return (React.createElement(ReactPlayerBlock, { ref: ref, className: b('react-player', videoClassName), src: src, previewImgUrl: previewImg, loop: Boolean(loop), controls: controls, muted: muted, autoplay: autoplay && playVideo, elapsedTime: elapsedTime, playButton: playButton || commonPlayButton, customBarControlsClassName: customBarControlsClassName, analyticsEvents: analyticsEvents, height: height, ariaLabel: ariaLabel, customControlsOptions: customControlsOptions, ratio: ratio === 'auto' ? undefined : ratio, autoRatio: ratio === 'auto', contain: contain }));
34
34
  }, [
35
35
  video,
36
36
  height,
@@ -1,5 +1,9 @@
1
1
  /* use this for style redefinitions to awoid problems with
2
2
  unpredictable css rules order in build */
3
+ .pc-ReactPlayer video {
4
+ background-color: var(--pc-color-video-player-bg, #000);
5
+ object-fit: cover;
6
+ }
3
7
  .pc-ReactPlayer__wrapper {
4
8
  position: relative;
5
9
  padding-top: 56.25%;
@@ -63,6 +67,9 @@ unpredictable css rules order in build */
63
67
  opacity: 0;
64
68
  transition: opacity 300ms;
65
69
  }
70
+ .pc-ReactPlayer_contain video {
71
+ object-fit: contain;
72
+ }
66
73
  @media only screen and (max-width: 577px) {
67
74
  .pc-ReactPlayer__button_text {
68
75
  font-size: 20px;
@@ -10,6 +10,7 @@ export interface ReactPlayerBlockProps extends Omit<MediaVideoProps, 'loop' | 's
10
10
  onClickPreview?: () => void;
11
11
  height?: number;
12
12
  ratio?: number;
13
+ autoRatio?: boolean;
13
14
  children?: React.ReactNode;
14
15
  }
15
16
  export declare const ReactPlayerBlock: React.ForwardRefExoticComponent<ReactPlayerBlockProps & React.RefAttributes<ReactPlayerBlockHandler>>;
@@ -21,7 +21,7 @@ const FPS = 60;
21
21
  // eslint-disable-next-line react/display-name
22
22
  export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
23
23
  const isMobile = useContext(MobileContext);
24
- const { src, previewImgUrl, loop = false, controls = MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, analyticsEvents, height, ariaLabel, ratio, } = props;
24
+ const { src, previewImgUrl, loop = false, controls = MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, analyticsEvents, height, ariaLabel, ratio, autoRatio, contain, } = props;
25
25
  const { type = PlayButtonType.Default, theme = PlayButtonThemes.Blue, text, className: buttonClassName, } = playButton || {};
26
26
  const { type: customControlsType = CustomControlsType.WithMuteButton, muteButtonShown, positioning = CustomControlsButtonPositioning.Center, } = customControlsOptions;
27
27
  const autoPlay = Boolean(!isMobile && !previewImgUrl && props.autoplay);
@@ -33,6 +33,7 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
33
33
  const [playedPercent, setPlayedPercent] = useState(0);
34
34
  const [currentHeight, setCurrentHeight] = useState(height);
35
35
  const [width, setWidth] = useState(0);
36
+ const [actualRatio, setActualRatio] = useState();
36
37
  const [muted, setMuted] = useState(mute);
37
38
  const [started, setStarted] = useState(autoPlay);
38
39
  const [ended, setEnded] = useState(false);
@@ -103,7 +104,7 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
103
104
  parseFloat(paddingLeft) -
104
105
  parseFloat(paddingRight);
105
106
  setWidth(newWidth);
106
- setCurrentHeight(Math.floor(getHeight(newWidth, ratio)));
107
+ setCurrentHeight(Math.floor(getHeight(newWidth, ratio !== null && ratio !== void 0 ? ratio : (autoRatio ? actualRatio : undefined))));
107
108
  }
108
109
  }, 200);
109
110
  updateSize();
@@ -111,7 +112,7 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
111
112
  return () => {
112
113
  window.removeEventListener('resize', updateSize);
113
114
  };
114
- }, [ratio]);
115
+ }, [actualRatio, autoRatio, ratio]);
115
116
  const playEvents = useMemo(() => eventsArray === null || eventsArray === void 0 ? void 0 : eventsArray.filter((e) => e.type === PredefinedEventTypes.Play), [eventsArray]);
116
117
  const stopEvents = useMemo(() => eventsArray === null || eventsArray === void 0 ? void 0 : eventsArray.filter((e) => e.type === PredefinedEventTypes.Stop), [eventsArray]);
117
118
  const playIcon = useMemo(() => {
@@ -181,6 +182,15 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
181
182
  setEnded(false);
182
183
  }
183
184
  }, [changeMute, controls, customControlsType, ended, isPlaying, muted]);
185
+ const onReady = useCallback((player) => {
186
+ setPlayerRef(player);
187
+ const videoElement = player.getInternalPlayer();
188
+ const videoWidth = videoElement.videoWidth;
189
+ const videoHeight = videoElement.videoHeight;
190
+ if (videoWidth && videoHeight) {
191
+ setActualRatio(videoHeight / videoWidth);
192
+ }
193
+ }, []);
184
194
  const onProgress = useCallback((progress) => {
185
195
  setPlayedPercent(progress.played);
186
196
  if (progress.played === 1) {
@@ -221,8 +231,9 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
221
231
  return (React.createElement("div", { className: b({
222
232
  wrapper: !currentHeight,
223
233
  controls,
234
+ contain,
224
235
  }, className), ref: ref, onClick: handleClick, onMouseEnter: onFocusIn, onMouseLeave: onFocusOut, onFocus: onFocusIn, onBlur: onFocusOut }, isMounted ? (React.createElement(Fragment, null,
225
- React.createElement(ReactPlayer, { className: b('player'), url: videoSrc, muted: muted, controls: controls === MediaVideoControlsType.Default, height: currentHeight || '100%', width: width || '100%', light: previewImgUrl, playing: isPlaying, playIcon: playIcon, progressInterval: FPS, onClickPreview: handleClickPreview, onStart: onStart, onReady: setPlayerRef, onPlay: onPlay, onPause: autoPlay && customControlsType !== CustomControlsType.WithMuteButton
236
+ React.createElement(ReactPlayer, { className: b('player'), url: videoSrc, muted: muted, controls: controls === MediaVideoControlsType.Default, height: currentHeight || '100%', width: width || '100%', light: previewImgUrl, playing: isPlaying, playIcon: playIcon, progressInterval: FPS, onClickPreview: handleClickPreview, onStart: onStart, onReady: onReady, onPlay: onPlay, onPause: autoPlay && customControlsType !== CustomControlsType.WithMuteButton
226
237
  ? undefined
227
238
  : onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel, previewTabIndex: -1, config: {
228
239
  file: {
@@ -1,22 +1,36 @@
1
1
  /* eslint-disable jsx-a11y/no-static-element-interactions */
2
2
  /* eslint-disable jsx-a11y/click-events-have-key-events */
3
3
  // TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
4
- import React, { useMemo, useRef, useState } from 'react';
4
+ import React, { useEffect, useMemo, useRef, useState } from 'react';
5
5
  import { Plus } from '@gravity-ui/icons';
6
6
  import { Popup, TextInput } from '@gravity-ui/uikit';
7
7
  import { blockMap } from '../../../constructor-items';
8
8
  import { block } from '../../../utils';
9
- import EditorBlocksData from '../../data';
9
+ import { getEditorBlocksData } from '../../data';
10
10
  import './AddBlock.css';
11
11
  const b = block('add-block');
12
12
  const sortedBlockNames = Object.keys(blockMap).sort();
13
13
  const AddBlock = ({ onAdd, className }) => {
14
14
  const [isOpened, setIsOpened] = useState(false);
15
15
  const [search, setSearch] = useState('');
16
+ const [editorBlocksData, setEditorBlocksData] = useState(null);
16
17
  const ref = useRef(null);
17
- const blocks = useMemo(() => sortedBlockNames.filter((blockName) => EditorBlocksData[blockName].meta.title
18
- .toLocaleLowerCase()
19
- .startsWith(search.toLocaleLowerCase())), [search]);
18
+ const blocks = useMemo(() => {
19
+ if (!editorBlocksData) {
20
+ return [];
21
+ }
22
+ return sortedBlockNames.filter((blockName) => {
23
+ var _a;
24
+ return (_a = editorBlocksData[blockName]) === null || _a === void 0 ? void 0 : _a.meta.title.toLocaleLowerCase().startsWith(search.toLocaleLowerCase());
25
+ });
26
+ }, [editorBlocksData, search]);
27
+ useEffect(() => {
28
+ const loadEditorBlocksData = async () => {
29
+ const data = await getEditorBlocksData();
30
+ setEditorBlocksData(data);
31
+ };
32
+ loadEditorBlocksData();
33
+ }, []);
20
34
  return (React.createElement("div", { className: b(null, className), ref: ref },
21
35
  React.createElement("button", { className: b('button'), type: "button", onClick: () => {
22
36
  setIsOpened(!isOpened);
@@ -28,8 +42,11 @@ const AddBlock = ({ onAdd, className }) => {
28
42
  React.createElement(TextInput, { placeholder: "search", type: "text", value: search, size: "l", onUpdate: (value) => setSearch(value) })),
29
43
  React.createElement("div", { className: b('blocks') }, blocks.map((blockName) => {
30
44
  var _a;
31
- const blockData = EditorBlocksData[blockName];
32
- const Preview = blockData === null || blockData === void 0 ? void 0 : blockData.preview;
45
+ const blockData = editorBlocksData === null || editorBlocksData === void 0 ? void 0 : editorBlocksData[blockName];
46
+ if (!blockData) {
47
+ return null;
48
+ }
49
+ const Preview = blockData.preview;
33
50
  return (React.createElement("div", { key: blockName, className: b('block'), onClick: () => {
34
51
  onAdd(blockData === null || blockData === void 0 ? void 0 : blockData.template);
35
52
  setIsOpened(false);
@@ -9,5 +9,6 @@ export interface EdiorBlockData {
9
9
  description?: string;
10
10
  };
11
11
  }
12
- declare const EditorBlocksData: Record<BlockType, EdiorBlockData>;
13
- export default EditorBlocksData;
12
+ type EditorBlocksData = Partial<Record<BlockType, EdiorBlockData>>;
13
+ declare function getEditorBlocksData(): Promise<EditorBlocksData>;
14
+ export { EditorBlocksData, getEditorBlocksData };
@@ -1,10 +1,14 @@
1
1
  import { BlockType } from '../../models';
2
2
  import { formatBlockName } from '../utils';
3
3
  import DefaultPreview from './previews/default-preview';
4
- const getBlockTemplate = (blockType) => require(`./templates/${blockType}.json`);
4
+ import HeaderBlock from './previews/header-block';
5
+ const getBlockTemplate = (blockType) => import(`./templates/${blockType}.json`).then((data) => data.default);
5
6
  const getBlockPreview = (blockType) => {
6
7
  try {
7
- return require(`./previews/${blockType}.tsx`).default;
8
+ if (blockType === BlockType.HeaderBlock) {
9
+ return HeaderBlock;
10
+ }
11
+ return DefaultPreview;
8
12
  }
9
13
  catch (err) {
10
14
  /*eslint-disable no-console */
@@ -12,13 +16,15 @@ const getBlockPreview = (blockType) => {
12
16
  return DefaultPreview;
13
17
  }
14
18
  };
15
- const EditorBlocksData = Object.values(BlockType).reduce((previewData, blockType) => {
16
- const template = getBlockTemplate(blockType);
17
- const preview = getBlockPreview(blockType);
18
- template.meta = template.meta || {};
19
- template.meta.title = template.meta.title || formatBlockName(blockType);
20
- /* eslint-disable no-param-reassign */
21
- previewData[blockType] = Object.assign(Object.assign({}, template), { preview });
22
- return previewData;
23
- }, {});
24
- export default EditorBlocksData;
19
+ async function getEditorBlocksData() {
20
+ const EdiorBlockData = {};
21
+ for (const blockType of Object.values(BlockType)) {
22
+ const template = await getBlockTemplate(blockType);
23
+ const preview = getBlockPreview(blockType);
24
+ template.meta = template.meta || {};
25
+ template.meta.title = template.meta.title || formatBlockName(blockType);
26
+ EdiorBlockData[blockType] = Object.assign(Object.assign({}, template), { preview });
27
+ }
28
+ return EdiorBlockData;
29
+ }
30
+ export { getEditorBlocksData };
@@ -127,6 +127,7 @@ export interface MediaVideoProps extends AnalyticsEventsBase {
127
127
  controls?: MediaVideoControlsType;
128
128
  customControlsOptions?: CustomControlsOptions;
129
129
  ariaLabel?: string;
130
+ contain?: boolean;
130
131
  }
131
132
  export interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {
132
133
  url: string;
@@ -179,7 +180,7 @@ export type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;
179
180
  export interface MediaComponentVideoProps extends AnalyticsEventsBase {
180
181
  video: MediaVideoProps;
181
182
  height?: number;
182
- ratio?: number;
183
+ ratio?: number | 'auto';
183
184
  previewImg?: string;
184
185
  }
185
186
  export interface MediaComponentVideoIframeProps {
@@ -1549,6 +1549,9 @@ export declare const cardSchemas: {
1549
1549
  ariaLabel: {
1550
1550
  type: string;
1551
1551
  };
1552
+ contain: {
1553
+ type: string;
1554
+ };
1552
1555
  };
1553
1556
  };
1554
1557
  youtube: {
@@ -1590,7 +1593,8 @@ export declare const cardSchemas: {
1590
1593
  type: string;
1591
1594
  };
1592
1595
  ratio: {
1593
- type: string;
1596
+ type: string[];
1597
+ pattern: string;
1594
1598
  };
1595
1599
  iframe: {
1596
1600
  type: string;
@@ -203,6 +203,9 @@ export declare const VideoProps: {
203
203
  ariaLabel: {
204
204
  type: string;
205
205
  };
206
+ contain: {
207
+ type: string;
208
+ };
206
209
  };
207
210
  };
208
211
  export declare const ThemeProps: {
@@ -365,6 +368,9 @@ export declare const BackgroundProps: {
365
368
  ariaLabel: {
366
369
  type: string;
367
370
  };
371
+ contain: {
372
+ type: string;
373
+ };
368
374
  };
369
375
  };
370
376
  height: {
@@ -1129,6 +1135,9 @@ export declare const MediaProps: {
1129
1135
  ariaLabel: {
1130
1136
  type: string;
1131
1137
  };
1138
+ contain: {
1139
+ type: string;
1140
+ };
1132
1141
  };
1133
1142
  };
1134
1143
  youtube: {
@@ -1248,7 +1257,8 @@ export declare const MediaProps: {
1248
1257
  })[];
1249
1258
  };
1250
1259
  ratio: {
1251
- type: string;
1260
+ type: string[];
1261
+ pattern: string;
1252
1262
  };
1253
1263
  iframe: {
1254
1264
  type: string;
@@ -160,6 +160,9 @@ export const VideoProps = {
160
160
  ariaLabel: {
161
161
  type: 'string',
162
162
  },
163
+ contain: {
164
+ type: 'boolean',
165
+ },
163
166
  },
164
167
  };
165
168
  export const ThemeProps = {
@@ -542,7 +545,8 @@ export const MediaProps = {
542
545
  anyOf: [AnalyticsEventSchema, { type: 'array', items: AnalyticsEventSchema }],
543
546
  },
544
547
  ratio: {
545
- type: 'number',
548
+ type: ['number', 'string'],
549
+ pattern: '^auto$',
546
550
  },
547
551
  iframe: Object.assign({}, IframeProps),
548
552
  margins: {
@@ -157,6 +157,9 @@ export declare const LayoutItem: {
157
157
  ariaLabel: {
158
158
  type: string;
159
159
  };
160
+ contain: {
161
+ type: string;
162
+ };
160
163
  };
161
164
  };
162
165
  youtube: {
@@ -276,7 +279,8 @@ export declare const LayoutItem: {
276
279
  })[];
277
280
  };
278
281
  ratio: {
279
- type: string;
282
+ type: string[];
283
+ pattern: string;
280
284
  };
281
285
  iframe: {
282
286
  type: string;
@@ -240,6 +240,9 @@ export declare const MediaCardBlock: {
240
240
  ariaLabel: {
241
241
  type: string;
242
242
  };
243
+ contain: {
244
+ type: string;
245
+ };
243
246
  };
244
247
  };
245
248
  youtube: {
@@ -281,7 +284,8 @@ export declare const MediaCardBlock: {
281
284
  type: string;
282
285
  };
283
286
  ratio: {
284
- type: string;
287
+ type: string[];
288
+ pattern: string;
285
289
  };
286
290
  iframe: {
287
291
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "5.25.0",
3
+ "version": "5.26.1",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -127,6 +127,7 @@ export interface MediaVideoProps extends AnalyticsEventsBase {
127
127
  controls?: MediaVideoControlsType;
128
128
  customControlsOptions?: CustomControlsOptions;
129
129
  ariaLabel?: string;
130
+ contain?: boolean;
130
131
  }
131
132
  export interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {
132
133
  url: string;
@@ -179,7 +180,7 @@ export type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;
179
180
  export interface MediaComponentVideoProps extends AnalyticsEventsBase {
180
181
  video: MediaVideoProps;
181
182
  height?: number;
182
- ratio?: number;
183
+ ratio?: number | 'auto';
183
184
  previewImg?: string;
184
185
  }
185
186
  export interface MediaComponentVideoIframeProps {
@@ -37,6 +37,7 @@ $animationDuration: 300ms;
37
37
 
38
38
  //colors
39
39
  $videoPlayButtonGrey: #eff2f8;
40
+ $videoPlayerBg: #000;
40
41
  $secondary: var(--g-color-text-secondary);
41
42
  $lightSecondary: var(--g-color-text-light-secondary);
42
43