@gravity-ui/blog-constructor 6.4.2 → 6.4.4-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -158,6 +158,9 @@ export declare const Header: {
158
158
  ariaLabel: {
159
159
  type: string;
160
160
  };
161
+ contain: {
162
+ type: string;
163
+ };
161
164
  };
162
165
  } & {
163
166
  optionName: string;
@@ -359,11 +362,17 @@ export declare const Header: {
359
362
  ariaLabel: {
360
363
  type: string;
361
364
  };
365
+ contain: {
366
+ type: string;
367
+ };
362
368
  };
363
369
  };
364
370
  youtube: {
365
371
  type: string;
366
372
  };
373
+ videoIframe: {
374
+ type: string;
375
+ };
367
376
  parallax: {
368
377
  type: string;
369
378
  };
@@ -475,7 +484,8 @@ export declare const Header: {
475
484
  })[];
476
485
  };
477
486
  ratio: {
478
- type: string;
487
+ type: string[];
488
+ pattern: string;
479
489
  };
480
490
  iframe: {
481
491
  type: string;
@@ -160,11 +160,17 @@ export declare const Media: {
160
160
  ariaLabel: {
161
161
  type: string;
162
162
  };
163
+ contain: {
164
+ type: string;
165
+ };
163
166
  };
164
167
  };
165
168
  youtube: {
166
169
  type: string;
167
170
  };
171
+ videoIframe: {
172
+ type: string;
173
+ };
168
174
  parallax: {
169
175
  type: string;
170
176
  };
@@ -276,7 +282,8 @@ export declare const Media: {
276
282
  })[];
277
283
  };
278
284
  ratio: {
279
- type: string;
285
+ type: string[];
286
+ pattern: string;
280
287
  };
281
288
  iframe: {
282
289
  type: string;
@@ -89,26 +89,27 @@ const Controls = ({ handleLoadData, tags = [], services = [], queryParams, }) =>
89
89
  };
90
90
  const tagsItems = (0, react_1.useMemo)(() => [{ value: 'empty', content: (0, i18n_1.i18n)(i18n_1.Keyset.AllTags) }, ...tags], [tags]);
91
91
  const servicesItems = (0, react_1.useMemo)(() => (servicesInitial ? [...servicesInitial.split(',')] : []), [servicesInitial]);
92
- return (react_1.default.createElement("div", { className: b('header') },
93
- react_1.default.createElement("h1", { className: b('header-item', { title: true }) }, (0, i18n_1.i18n)(i18n_1.Keyset.Title)),
94
- react_1.default.createElement("div", { className: b('header-item', { filters: true }) },
95
- react_1.default.createElement("div", { className: b('filter-item') },
96
- react_1.default.createElement(Search_1.Search, { className: b('search'), placeholder: (0, i18n_1.i18n)(i18n_1.Keyset.Search), initialValue: search && typeof search === 'string' ? search : '', onSubmit: handleSearch })),
97
- react_1.default.createElement("div", { className: b('filter-item') },
98
- react_1.default.createElement(uikit_1.Select, { className: b('select'), size: "xl", options: tagsItems, defaultValue: [tagInitial], onUpdate: handleTagSelect, placeholder: (0, i18n_1.i18n)(i18n_1.Keyset.AllTags), popupClassName: b('popup', { isMobile }), renderControl: (0, customRenders_1.renderSwitcher)({
99
- initial: [tagInitial],
100
- list: tagsItems,
101
- defaultLabel: (0, i18n_1.i18n)(i18n_1.Keyset.AllTags),
102
- }), disablePortal: true, virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption })),
103
- services.length > 0 ? (react_1.default.createElement("div", { className: b('filter-item') },
104
- react_1.default.createElement(uikit_1.Select, { className: b('select'), size: "xl", multiple: true, filterable: true, hasClear: true, disablePortal: true, options: services, defaultValue: servicesItems, popupClassName: b('popup', { isMobile }), onUpdate: handleServicesSelect, placeholder: (0, i18n_1.i18n)(i18n_1.Keyset.AllServices), renderControl: (0, customRenders_1.renderSwitcher)({
105
- initial: servicesItems,
106
- list: services,
107
- defaultLabel: (0, i18n_1.i18n)(i18n_1.Keyset.AllServices),
108
- }), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption, renderFilter: customRenders_1.renderFilter }))) : null,
109
- hasLikes ? (react_1.default.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
110
- react_1.default.createElement(uikit_1.Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly, selected: savedOnly },
111
- react_1.default.createElement(uikit_1.Icon, { data: Save_1.Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
112
- (0, i18n_1.i18n)(i18n_1.Keyset.ActionSavedOnly)))) : null)));
92
+ return (react_1.default.createElement(uikit_1.MobileProvider, { mobile: false },
93
+ react_1.default.createElement("div", { className: b('header') },
94
+ react_1.default.createElement("h1", { className: b('header-item', { title: true }) }, (0, i18n_1.i18n)(i18n_1.Keyset.Title)),
95
+ react_1.default.createElement("div", { className: b('header-item', { filters: true }) },
96
+ react_1.default.createElement("div", { className: b('filter-item') },
97
+ react_1.default.createElement(Search_1.Search, { className: b('search'), placeholder: (0, i18n_1.i18n)(i18n_1.Keyset.Search), initialValue: search && typeof search === 'string' ? search : '', onSubmit: handleSearch })),
98
+ react_1.default.createElement("div", { className: b('filter-item') },
99
+ react_1.default.createElement(uikit_1.Select, { className: b('select'), size: "xl", options: tagsItems, defaultValue: [tagInitial], onUpdate: handleTagSelect, placeholder: (0, i18n_1.i18n)(i18n_1.Keyset.AllTags), popupClassName: b('popup', { isMobile }), renderControl: (0, customRenders_1.renderSwitcher)({
100
+ initial: [tagInitial],
101
+ list: tagsItems,
102
+ defaultLabel: (0, i18n_1.i18n)(i18n_1.Keyset.AllTags),
103
+ }), disablePortal: true, virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption })),
104
+ services.length > 0 ? (react_1.default.createElement("div", { className: b('filter-item') },
105
+ react_1.default.createElement(uikit_1.Select, { className: b('select'), size: "xl", multiple: true, filterable: true, hasClear: true, disablePortal: true, options: services, defaultValue: servicesItems, popupClassName: b('popup', { isMobile }), onUpdate: handleServicesSelect, placeholder: (0, i18n_1.i18n)(i18n_1.Keyset.AllServices), renderControl: (0, customRenders_1.renderSwitcher)({
106
+ initial: servicesItems,
107
+ list: services,
108
+ defaultLabel: (0, i18n_1.i18n)(i18n_1.Keyset.AllServices),
109
+ }), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption, renderFilter: customRenders_1.renderFilter }))) : null,
110
+ hasLikes ? (react_1.default.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
111
+ react_1.default.createElement(uikit_1.Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly, selected: savedOnly },
112
+ react_1.default.createElement(uikit_1.Icon, { data: Save_1.Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
113
+ (0, i18n_1.i18n)(i18n_1.Keyset.ActionSavedOnly)))) : null))));
113
114
  };
114
115
  exports.Controls = Controls;
@@ -10,7 +10,9 @@ const usePromptSignInProps_1 = require("../../components/PromptSignIn/hooks/useP
10
10
  const FeedContext_1 = require("../../contexts/FeedContext");
11
11
  const LikesContext_1 = require("../../contexts/LikesContext");
12
12
  const useExtendedComponentMap_1 = require("../../hooks/useExtendedComponentMap");
13
+ const SettingsContext_1 = require("../../contexts/SettingsContext");
13
14
  const BlogPage = ({ content, posts, tags, services, getPosts, metaData, custom, hasLikes = false, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser = false, onClickSignIn, }) => {
15
+ const { isAnimationEnabled } = (0, react_1.useContext)(SettingsContext_1.SettingsContext);
14
16
  const _a = (0, usePromptSignInProps_1.usePromptSignInProps)(onClickSignIn), { requireSignIn } = _a, promptSignInProps = tslib_1.__rest(_a, ["requireSignIn"]);
15
17
  const likesContextData = (0, react_1.useMemo)(() => ({ toggleLike, hasLikes, isSignedInUser, requireSignIn }), [toggleLike, hasLikes, isSignedInUser, requireSignIn]);
16
18
  const actualComponentMap = (0, useExtendedComponentMap_1.useExtendedComponentMap)(custom);
@@ -24,7 +26,7 @@ const BlogPage = ({ content, posts, tags, services, getPosts, metaData, custom,
24
26
  getPosts,
25
27
  pageCountForShowSupportButtons,
26
28
  } },
27
- react_1.default.createElement(page_constructor_1.PageConstructorProvider, Object.assign({}, settings),
29
+ react_1.default.createElement(page_constructor_1.PageConstructorProvider, Object.assign({}, settings, { projectSettings: Object.assign(Object.assign({}, ((settings === null || settings === void 0 ? void 0 : settings.projectSettings) || {})), { isAnimationEnabled }) }),
28
30
  metaData ? react_1.default.createElement(MetaWrapper_1.MetaWrapper, Object.assign({}, metaData)) : null,
29
31
  react_1.default.createElement(page_constructor_1.PageConstructor, { content: content, custom: actualComponentMap, navigation: navigation }))),
30
32
  react_1.default.createElement(PromptSignIn_1.PromptSignIn, Object.assign({}, promptSignInProps))));
@@ -11,7 +11,9 @@ const LikesContext_1 = require("../../contexts/LikesContext");
11
11
  const PostPageContext_1 = require("../../contexts/PostPageContext");
12
12
  const useExtendedComponentMap_1 = require("../../hooks/useExtendedComponentMap");
13
13
  const useLikes_1 = require("../../hooks/useLikes");
14
+ const SettingsContext_1 = require("../../contexts/SettingsContext");
14
15
  const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, settings, navigation, custom, shareOptions, isSignedInUser = false, onClickSignIn, }) => {
16
+ const { isAnimationEnabled } = (0, react_1.useContext)(SettingsContext_1.SettingsContext);
15
17
  const { hasUserLike, likesCount, handleLike } = (0, useLikes_1.useLikes)({
16
18
  hasLike: likes === null || likes === void 0 ? void 0 : likes.hasUserLike,
17
19
  count: likes === null || likes === void 0 ? void 0 : likes.likesCount,
@@ -39,7 +41,7 @@ const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, settings
39
41
  : undefined,
40
42
  shareOptions,
41
43
  } },
42
- react_1.default.createElement(page_constructor_1.PageConstructorProvider, Object.assign({}, settings),
44
+ react_1.default.createElement(page_constructor_1.PageConstructorProvider, Object.assign({}, settings, { projectSettings: Object.assign(Object.assign({}, ((settings === null || settings === void 0 ? void 0 : settings.projectSettings) || {})), { isAnimationEnabled }) }),
43
45
  metaData ? react_1.default.createElement(MetaWrapper_1.MetaWrapper, Object.assign({}, metaData)) : null,
44
46
  react_1.default.createElement(page_constructor_1.PageConstructor, { content: content, custom: actualComponentMap, navigation: navigation }))),
45
47
  react_1.default.createElement(PromptSignIn_1.PromptSignIn, Object.assign({}, promptSignInProps))));
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export interface SettingsContextProps {
3
3
  addNavigationLinkForPages?: boolean;
4
+ isAnimationEnabled?: boolean;
4
5
  getBlogPath?: (pathPrefix: string) => string;
5
6
  }
6
7
  export declare const SettingsContext: React.Context<SettingsContextProps>;
@@ -166,6 +166,9 @@ export declare const schemasForCustom: {
166
166
  ariaLabel: {
167
167
  type: string;
168
168
  };
169
+ contain: {
170
+ type: string;
171
+ };
169
172
  };
170
173
  } & {
171
174
  optionName: string;
@@ -367,11 +370,17 @@ export declare const schemasForCustom: {
367
370
  ariaLabel: {
368
371
  type: string;
369
372
  };
373
+ contain: {
374
+ type: string;
375
+ };
370
376
  };
371
377
  };
372
378
  youtube: {
373
379
  type: string;
374
380
  };
381
+ videoIframe: {
382
+ type: string;
383
+ };
375
384
  parallax: {
376
385
  type: string;
377
386
  };
@@ -483,7 +492,8 @@ export declare const schemasForCustom: {
483
492
  })[];
484
493
  };
485
494
  ratio: {
486
- type: string;
495
+ type: string[];
496
+ pattern: string;
487
497
  };
488
498
  iframe: {
489
499
  type: string;
@@ -1551,11 +1561,17 @@ export declare const schemasForCustom: {
1551
1561
  ariaLabel: {
1552
1562
  type: string;
1553
1563
  };
1564
+ contain: {
1565
+ type: string;
1566
+ };
1554
1567
  };
1555
1568
  };
1556
1569
  youtube: {
1557
1570
  type: string;
1558
1571
  };
1572
+ videoIframe: {
1573
+ type: string;
1574
+ };
1559
1575
  parallax: {
1560
1576
  type: string;
1561
1577
  };
@@ -1667,7 +1683,8 @@ export declare const schemasForCustom: {
1667
1683
  })[];
1668
1684
  };
1669
1685
  ratio: {
1670
- type: string;
1686
+ type: string[];
1687
+ pattern: string;
1671
1688
  };
1672
1689
  iframe: {
1673
1690
  type: string;
@@ -158,6 +158,9 @@ export declare const Header: {
158
158
  ariaLabel: {
159
159
  type: string;
160
160
  };
161
+ contain: {
162
+ type: string;
163
+ };
161
164
  };
162
165
  } & {
163
166
  optionName: string;
@@ -359,11 +362,17 @@ export declare const Header: {
359
362
  ariaLabel: {
360
363
  type: string;
361
364
  };
365
+ contain: {
366
+ type: string;
367
+ };
362
368
  };
363
369
  };
364
370
  youtube: {
365
371
  type: string;
366
372
  };
373
+ videoIframe: {
374
+ type: string;
375
+ };
367
376
  parallax: {
368
377
  type: string;
369
378
  };
@@ -475,7 +484,8 @@ export declare const Header: {
475
484
  })[];
476
485
  };
477
486
  ratio: {
478
- type: string;
487
+ type: string[];
488
+ pattern: string;
479
489
  };
480
490
  iframe: {
481
491
  type: string;
@@ -160,11 +160,17 @@ export declare const Media: {
160
160
  ariaLabel: {
161
161
  type: string;
162
162
  };
163
+ contain: {
164
+ type: string;
165
+ };
163
166
  };
164
167
  };
165
168
  youtube: {
166
169
  type: string;
167
170
  };
171
+ videoIframe: {
172
+ type: string;
173
+ };
168
174
  parallax: {
169
175
  type: string;
170
176
  };
@@ -276,7 +282,8 @@ export declare const Media: {
276
282
  })[];
277
283
  };
278
284
  ratio: {
279
- type: string;
285
+ type: string[];
286
+ pattern: string;
280
287
  };
281
288
  iframe: {
282
289
  type: string;
@@ -1,6 +1,6 @@
1
1
  import React, { useContext, useMemo, useState } from 'react';
2
2
  import { useAnalytics } from '@gravity-ui/page-constructor';
3
- import { Button, Icon, Select } from '@gravity-ui/uikit';
3
+ import { Button, Icon, MobileProvider, Select } from '@gravity-ui/uikit';
4
4
  import { DefaultGoalIds } from '../../../../constants';
5
5
  import { LikesContext } from '../../../../contexts/LikesContext';
6
6
  import { MobileContext } from '../../../../contexts/MobileContext';
@@ -86,25 +86,26 @@ export const Controls = ({ handleLoadData, tags = [], services = [], queryParams
86
86
  };
87
87
  const tagsItems = useMemo(() => [{ value: 'empty', content: i18n(Keyset.AllTags) }, ...tags], [tags]);
88
88
  const servicesItems = useMemo(() => (servicesInitial ? [...servicesInitial.split(',')] : []), [servicesInitial]);
89
- return (React.createElement("div", { className: b('header') },
90
- React.createElement("h1", { className: b('header-item', { title: true }) }, i18n(Keyset.Title)),
91
- React.createElement("div", { className: b('header-item', { filters: true }) },
92
- React.createElement("div", { className: b('filter-item') },
93
- React.createElement(Search, { className: b('search'), placeholder: i18n(Keyset.Search), initialValue: search && typeof search === 'string' ? search : '', onSubmit: handleSearch })),
94
- React.createElement("div", { className: b('filter-item') },
95
- React.createElement(Select, { className: b('select'), size: "xl", options: tagsItems, defaultValue: [tagInitial], onUpdate: handleTagSelect, placeholder: i18n(Keyset.AllTags), popupClassName: b('popup', { isMobile }), renderControl: renderSwitcher({
96
- initial: [tagInitial],
97
- list: tagsItems,
98
- defaultLabel: i18n(Keyset.AllTags),
99
- }), disablePortal: true, virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption })),
100
- services.length > 0 ? (React.createElement("div", { className: b('filter-item') },
101
- React.createElement(Select, { className: b('select'), size: "xl", multiple: true, filterable: true, hasClear: true, disablePortal: true, options: services, defaultValue: servicesItems, popupClassName: b('popup', { isMobile }), onUpdate: handleServicesSelect, placeholder: i18n(Keyset.AllServices), renderControl: renderSwitcher({
102
- initial: servicesItems,
103
- list: services,
104
- defaultLabel: i18n(Keyset.AllServices),
105
- }), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption, renderFilter: renderFilter }))) : null,
106
- hasLikes ? (React.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
107
- React.createElement(Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly, selected: savedOnly },
108
- React.createElement(Icon, { data: Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
109
- i18n(Keyset.ActionSavedOnly)))) : null)));
89
+ return (React.createElement(MobileProvider, { mobile: false },
90
+ React.createElement("div", { className: b('header') },
91
+ React.createElement("h1", { className: b('header-item', { title: true }) }, i18n(Keyset.Title)),
92
+ React.createElement("div", { className: b('header-item', { filters: true }) },
93
+ React.createElement("div", { className: b('filter-item') },
94
+ React.createElement(Search, { className: b('search'), placeholder: i18n(Keyset.Search), initialValue: search && typeof search === 'string' ? search : '', onSubmit: handleSearch })),
95
+ React.createElement("div", { className: b('filter-item') },
96
+ React.createElement(Select, { className: b('select'), size: "xl", options: tagsItems, defaultValue: [tagInitial], onUpdate: handleTagSelect, placeholder: i18n(Keyset.AllTags), popupClassName: b('popup', { isMobile }), renderControl: renderSwitcher({
97
+ initial: [tagInitial],
98
+ list: tagsItems,
99
+ defaultLabel: i18n(Keyset.AllTags),
100
+ }), disablePortal: true, virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption })),
101
+ services.length > 0 ? (React.createElement("div", { className: b('filter-item') },
102
+ React.createElement(Select, { className: b('select'), size: "xl", multiple: true, filterable: true, hasClear: true, disablePortal: true, options: services, defaultValue: servicesItems, popupClassName: b('popup', { isMobile }), onUpdate: handleServicesSelect, placeholder: i18n(Keyset.AllServices), renderControl: renderSwitcher({
103
+ initial: servicesItems,
104
+ list: services,
105
+ defaultLabel: i18n(Keyset.AllServices),
106
+ }), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption, renderFilter: renderFilter }))) : null,
107
+ hasLikes ? (React.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
108
+ React.createElement(Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly, selected: savedOnly },
109
+ React.createElement(Icon, { data: Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
110
+ i18n(Keyset.ActionSavedOnly)))) : null))));
110
111
  };
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import React, { useMemo } from 'react';
2
+ import React, { useContext, useMemo } from 'react';
3
3
  import { PageConstructor, PageConstructorProvider, } from '@gravity-ui/page-constructor';
4
4
  import { MetaWrapper } from '../../components/MetaWrapper/MetaWrapper';
5
5
  import { PromptSignIn } from '../../components/PromptSignIn/PromptSignIn';
@@ -7,8 +7,10 @@ import { usePromptSignInProps } from '../../components/PromptSignIn/hooks/usePro
7
7
  import { FeedContext } from '../../contexts/FeedContext';
8
8
  import { LikesContext } from '../../contexts/LikesContext';
9
9
  import { useExtendedComponentMap } from '../../hooks/useExtendedComponentMap';
10
+ import { SettingsContext } from '../../contexts/SettingsContext';
10
11
  import './BlogPage.css';
11
12
  export const BlogPage = ({ content, posts, tags, services, getPosts, metaData, custom, hasLikes = false, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser = false, onClickSignIn, }) => {
13
+ const { isAnimationEnabled } = useContext(SettingsContext);
12
14
  const _a = usePromptSignInProps(onClickSignIn), { requireSignIn } = _a, promptSignInProps = __rest(_a, ["requireSignIn"]);
13
15
  const likesContextData = useMemo(() => ({ toggleLike, hasLikes, isSignedInUser, requireSignIn }), [toggleLike, hasLikes, isSignedInUser, requireSignIn]);
14
16
  const actualComponentMap = useExtendedComponentMap(custom);
@@ -22,7 +24,7 @@ export const BlogPage = ({ content, posts, tags, services, getPosts, metaData, c
22
24
  getPosts,
23
25
  pageCountForShowSupportButtons,
24
26
  } },
25
- React.createElement(PageConstructorProvider, Object.assign({}, settings),
27
+ React.createElement(PageConstructorProvider, Object.assign({}, settings, { projectSettings: Object.assign(Object.assign({}, ((settings === null || settings === void 0 ? void 0 : settings.projectSettings) || {})), { isAnimationEnabled }) }),
26
28
  metaData ? React.createElement(MetaWrapper, Object.assign({}, metaData)) : null,
27
29
  React.createElement(PageConstructor, { content: content, custom: actualComponentMap, navigation: navigation }))),
28
30
  React.createElement(PromptSignIn, Object.assign({}, promptSignInProps))));
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import React, { useMemo } from 'react';
2
+ import React, { useContext, useMemo } from 'react';
3
3
  import { PageConstructor, PageConstructorProvider, } from '@gravity-ui/page-constructor';
4
4
  import { MetaWrapper } from '../../components/MetaWrapper/MetaWrapper';
5
5
  import { PromptSignIn } from '../../components/PromptSignIn/PromptSignIn';
@@ -8,8 +8,10 @@ import { LikesContext } from '../../contexts/LikesContext';
8
8
  import { PostPageContext } from '../../contexts/PostPageContext';
9
9
  import { useExtendedComponentMap } from '../../hooks/useExtendedComponentMap';
10
10
  import { useLikes } from '../../hooks/useLikes';
11
+ import { SettingsContext } from '../../contexts/SettingsContext';
11
12
  import './BlogPostPage.css';
12
13
  export const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, settings, navigation, custom, shareOptions, isSignedInUser = false, onClickSignIn, }) => {
14
+ const { isAnimationEnabled } = useContext(SettingsContext);
13
15
  const { hasUserLike, likesCount, handleLike } = useLikes({
14
16
  hasLike: likes === null || likes === void 0 ? void 0 : likes.hasUserLike,
15
17
  count: likes === null || likes === void 0 ? void 0 : likes.likesCount,
@@ -37,7 +39,7 @@ export const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, s
37
39
  : undefined,
38
40
  shareOptions,
39
41
  } },
40
- React.createElement(PageConstructorProvider, Object.assign({}, settings),
42
+ React.createElement(PageConstructorProvider, Object.assign({}, settings, { projectSettings: Object.assign(Object.assign({}, ((settings === null || settings === void 0 ? void 0 : settings.projectSettings) || {})), { isAnimationEnabled }) }),
41
43
  metaData ? React.createElement(MetaWrapper, Object.assign({}, metaData)) : null,
42
44
  React.createElement(PageConstructor, { content: content, custom: actualComponentMap, navigation: navigation }))),
43
45
  React.createElement(PromptSignIn, Object.assign({}, promptSignInProps))));
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export interface SettingsContextProps {
3
3
  addNavigationLinkForPages?: boolean;
4
+ isAnimationEnabled?: boolean;
4
5
  getBlogPath?: (pathPrefix: string) => string;
5
6
  }
6
7
  export declare const SettingsContext: React.Context<SettingsContextProps>;
@@ -166,6 +166,9 @@ export declare const schemasForCustom: {
166
166
  ariaLabel: {
167
167
  type: string;
168
168
  };
169
+ contain: {
170
+ type: string;
171
+ };
169
172
  };
170
173
  } & {
171
174
  optionName: string;
@@ -367,11 +370,17 @@ export declare const schemasForCustom: {
367
370
  ariaLabel: {
368
371
  type: string;
369
372
  };
373
+ contain: {
374
+ type: string;
375
+ };
370
376
  };
371
377
  };
372
378
  youtube: {
373
379
  type: string;
374
380
  };
381
+ videoIframe: {
382
+ type: string;
383
+ };
375
384
  parallax: {
376
385
  type: string;
377
386
  };
@@ -483,7 +492,8 @@ export declare const schemasForCustom: {
483
492
  })[];
484
493
  };
485
494
  ratio: {
486
- type: string;
495
+ type: string[];
496
+ pattern: string;
487
497
  };
488
498
  iframe: {
489
499
  type: string;
@@ -1551,11 +1561,17 @@ export declare const schemasForCustom: {
1551
1561
  ariaLabel: {
1552
1562
  type: string;
1553
1563
  };
1564
+ contain: {
1565
+ type: string;
1566
+ };
1554
1567
  };
1555
1568
  };
1556
1569
  youtube: {
1557
1570
  type: string;
1558
1571
  };
1572
+ videoIframe: {
1573
+ type: string;
1574
+ };
1559
1575
  parallax: {
1560
1576
  type: string;
1561
1577
  };
@@ -1667,7 +1683,8 @@ export declare const schemasForCustom: {
1667
1683
  })[];
1668
1684
  };
1669
1685
  ratio: {
1670
- type: string;
1686
+ type: string[];
1687
+ pattern: string;
1671
1688
  };
1672
1689
  iframe: {
1673
1690
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/blog-constructor",
3
- "version": "6.4.2",
3
+ "version": "6.4.4-alpha.0",
4
4
  "description": "Gravity UI Blog Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -56,7 +56,14 @@
56
56
  "svgo:all": "svgo --config svgo.config.js -r -f assets",
57
57
  "test": "jest --maxWorkers=50%",
58
58
  "test:coverage": "jest --coverage",
59
- "test:watch": "jest --watchAll --maxWorkers=25%"
59
+ "test:watch": "jest --watchAll --maxWorkers=25%",
60
+ "playwright": "playwright test --config=playwright/playwright.config.ts",
61
+ "playwright:update": "npm run playwright -- -u",
62
+ "playwright:clear-cache": "rm -rf ./playwright/.cache",
63
+ "playwright:docker": "./scripts/playwright-docker.sh 'npm run playwright'",
64
+ "playwright:docker:update": "./scripts/playwright-docker.sh 'npm run playwright:update'",
65
+ "playwright:docker:clear-cache": "./scripts/playwright-docker.sh clear-cache",
66
+ "playwright:install": "playwright install --with-deps"
60
67
  },
61
68
  "dependencies": {
62
69
  "@bem-react/classname": "^1.6.0",
@@ -82,12 +89,14 @@
82
89
  "@commitlint/config-conventional": "^17.4.3",
83
90
  "@diplodoc/transform": "^4.10.8",
84
91
  "@gravity-ui/eslint-config": "^3.1.1",
85
- "@gravity-ui/page-constructor": "^5.18.0",
92
+ "@gravity-ui/page-constructor": "^5.27.0",
86
93
  "@gravity-ui/prettier-config": "^1.1.0",
87
94
  "@gravity-ui/stylelint-config": "^4.0.1",
88
95
  "@gravity-ui/tsconfig": "^1.0.0",
89
96
  "@gravity-ui/uikit": "^6.22.0",
90
97
  "@jest/environment": "^29.7.0",
98
+ "@playwright/experimental-ct-react": "^1.45.3",
99
+ "@playwright/test": "^1.45.3",
91
100
  "@storybook/addon-essentials": "^8.0.5",
92
101
  "@storybook/addon-mdx-gfm": "^8.0.5",
93
102
  "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
@@ -106,6 +115,7 @@
106
115
  "@types/react-helmet": "^6.1.5",
107
116
  "@types/ua-parser-js": "^0.7.36",
108
117
  "@types/uuid": "^9.0.7",
118
+ "@vitejs/plugin-react": "^4.3.1",
109
119
  "eslint": "^8.34.0",
110
120
  "eslint-plugin-no-not-accumulator-reassign": "^0.1.0",
111
121
  "eslint-plugin-testing-library": "^5.9.1",
@@ -132,7 +142,9 @@
132
142
  "storybook": "^8.0.5",
133
143
  "stylelint": "^15.11.0",
134
144
  "ts-jest": "^29.0.5",
135
- "typescript": "^4.9.3"
145
+ "typescript": "^4.9.3",
146
+ "vite-plugin-commonjs": "^0.10.3",
147
+ "vite-plugin-svgr": "^4.2.0"
136
148
  },
137
149
  "lint-staged": {
138
150
  "*.{css,scss}": [
@@ -1,7 +1,7 @@
1
1
  import { MarkdownItPluginCb } from '@diplodoc/transform/lib/plugins/typings';
2
2
  import { Lang } from '@gravity-ui/uikit';
3
3
  type TypographyConfigType = {
4
- [x: string]: Record<string, unknown>;
4
+ [x: string]: Record<string, unknown> | Record<string, unknown>[];
5
5
  };
6
6
  type TransformPageContentPropsType = {
7
7
  content: string;