@gravity-ui/blog-constructor 8.3.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/build/cjs/blocks/SideCardList/SideCardList.css +47 -0
  2. package/build/cjs/blocks/SideCardList/SideCardList.d.ts +3 -0
  3. package/build/cjs/blocks/SideCardList/SideCardList.js +21 -0
  4. package/build/cjs/blocks/SideCardList/SideCardList.js.map +1 -0
  5. package/build/cjs/blocks/SideCardList/schema.d.ts +94 -0
  6. package/build/cjs/blocks/SideCardList/schema.js +37 -0
  7. package/build/cjs/blocks/SideCardList/schema.js.map +1 -0
  8. package/build/cjs/blocks/Take/Take.css +70 -0
  9. package/build/cjs/blocks/Take/Take.d.ts +2 -0
  10. package/build/cjs/blocks/Take/Take.js +28 -0
  11. package/build/cjs/blocks/Take/Take.js.map +1 -0
  12. package/build/cjs/blocks/Take/schema.d.ts +96 -0
  13. package/build/cjs/blocks/Take/schema.js +26 -0
  14. package/build/cjs/blocks/Take/schema.js.map +1 -0
  15. package/build/cjs/components/Wrapper/Wrapper.css +42 -0
  16. package/build/cjs/components/Wrapper/Wrapper.d.ts +1 -0
  17. package/build/cjs/components/Wrapper/Wrapper.js +2 -2
  18. package/build/cjs/components/Wrapper/Wrapper.js.map +1 -1
  19. package/build/cjs/constructor/blocksMap.d.ts +2 -0
  20. package/build/cjs/constructor/blocksMap.js +4 -0
  21. package/build/cjs/constructor/blocksMap.js.map +1 -1
  22. package/build/cjs/hooks/useExtendedComponentMap.d.ts +2 -0
  23. package/build/cjs/models/blocks.d.ts +21 -2
  24. package/build/cjs/models/blocks.js.map +1 -1
  25. package/build/cjs/models/common.d.ts +3 -1
  26. package/build/cjs/models/common.js +2 -0
  27. package/build/cjs/models/common.js.map +1 -1
  28. package/build/cjs/models/paddings.d.ts +1 -1
  29. package/build/cjs/models/paddings.js.map +1 -1
  30. package/build/cjs/schema/blocks.d.ts +1 -0
  31. package/build/cjs/schema/blocks.js +1 -0
  32. package/build/cjs/schema/blocks.js.map +1 -1
  33. package/build/cjs/schema/index.d.ts +96 -0
  34. package/build/cjs/schema/index.js +2 -1
  35. package/build/cjs/schema/index.js.map +1 -1
  36. package/build/esm/blocks/SideCardList/SideCardList.css +47 -0
  37. package/build/esm/blocks/SideCardList/SideCardList.d.ts +4 -0
  38. package/build/esm/blocks/SideCardList/SideCardList.js +18 -0
  39. package/build/esm/blocks/SideCardList/SideCardList.js.map +1 -0
  40. package/build/esm/blocks/SideCardList/schema.d.ts +94 -0
  41. package/build/esm/blocks/SideCardList/schema.js +34 -0
  42. package/build/esm/blocks/SideCardList/schema.js.map +1 -0
  43. package/build/esm/blocks/Take/Take.css +70 -0
  44. package/build/esm/blocks/Take/Take.d.ts +3 -0
  45. package/build/esm/blocks/Take/Take.js +24 -0
  46. package/build/esm/blocks/Take/Take.js.map +1 -0
  47. package/build/esm/blocks/Take/schema.d.ts +96 -0
  48. package/build/esm/blocks/Take/schema.js +23 -0
  49. package/build/esm/blocks/Take/schema.js.map +1 -0
  50. package/build/esm/components/Wrapper/Wrapper.css +42 -0
  51. package/build/esm/components/Wrapper/Wrapper.d.ts +1 -0
  52. package/build/esm/components/Wrapper/Wrapper.js +2 -2
  53. package/build/esm/components/Wrapper/Wrapper.js.map +1 -1
  54. package/build/esm/constructor/blocksMap.d.ts +2 -0
  55. package/build/esm/constructor/blocksMap.js +4 -0
  56. package/build/esm/constructor/blocksMap.js.map +1 -1
  57. package/build/esm/hooks/useExtendedComponentMap.d.ts +2 -0
  58. package/build/esm/models/blocks.d.ts +21 -2
  59. package/build/esm/models/blocks.js.map +1 -1
  60. package/build/esm/models/common.d.ts +3 -1
  61. package/build/esm/models/common.js +2 -0
  62. package/build/esm/models/common.js.map +1 -1
  63. package/build/esm/models/paddings.d.ts +1 -1
  64. package/build/esm/models/paddings.js.map +1 -1
  65. package/build/esm/schema/blocks.d.ts +1 -0
  66. package/build/esm/schema/blocks.js +1 -0
  67. package/build/esm/schema/blocks.js.map +1 -1
  68. package/build/esm/schema/index.d.ts +96 -0
  69. package/build/esm/schema/index.js +2 -1
  70. package/build/esm/schema/index.js.map +1 -1
  71. package/package.json +1 -1
  72. package/server/models/blocks.d.ts +21 -2
  73. package/server/models/common.d.ts +3 -1
  74. package/server/models/common.js +2 -0
  75. package/server/models/paddings.d.ts +1 -1
  76. package/styles/mixins.scss +60 -0
@@ -0,0 +1,96 @@
1
+ export declare const Take: {
2
+ "blog-take-block": {
3
+ type: string;
4
+ additionalProperties: boolean;
5
+ required: string[];
6
+ properties: {
7
+ text: {
8
+ type: string;
9
+ contentType: string;
10
+ };
11
+ author: {
12
+ type: string;
13
+ additionalProperties: boolean;
14
+ required: string[];
15
+ properties: {
16
+ firstName: {
17
+ type: string;
18
+ contentType: string;
19
+ };
20
+ secondName: {
21
+ type: string;
22
+ contentType: string;
23
+ };
24
+ description: {
25
+ type: string;
26
+ contentType: string;
27
+ };
28
+ avatar: {
29
+ type: string;
30
+ };
31
+ };
32
+ };
33
+ paddingTop: {
34
+ type: string;
35
+ enum: string[];
36
+ };
37
+ paddingBottom: {
38
+ type: string;
39
+ enum: string[];
40
+ };
41
+ fullWidth: {
42
+ type: string;
43
+ };
44
+ column: {
45
+ type: string;
46
+ enum: string[];
47
+ };
48
+ qa: {
49
+ type: string;
50
+ };
51
+ anchor: {
52
+ type: string;
53
+ additionalProperties: boolean;
54
+ required: string[];
55
+ properties: {
56
+ text: {
57
+ type: string;
58
+ contentType: string;
59
+ };
60
+ url: {
61
+ type: string;
62
+ };
63
+ urlTitle: {
64
+ type: string;
65
+ };
66
+ };
67
+ };
68
+ visible: {
69
+ type: string;
70
+ enum: string[];
71
+ };
72
+ resetPaddings: {
73
+ type: string;
74
+ };
75
+ context: {
76
+ type: string;
77
+ };
78
+ indent: {
79
+ type: string;
80
+ additionalProperties: boolean;
81
+ properties: {
82
+ top: {
83
+ enum: string[];
84
+ };
85
+ bottom: {
86
+ enum: string[];
87
+ };
88
+ };
89
+ };
90
+ type: {};
91
+ when: {
92
+ type: string;
93
+ };
94
+ };
95
+ };
96
+ };
@@ -0,0 +1,23 @@
1
+ import { validators } from '@gravity-ui/page-constructor';
2
+ import { BlockType } from "../../models/common.js";
3
+ import { BlogBlockBase } from "../../schema/common.js";
4
+ const { common: { BlockBaseProps }, } = validators;
5
+ export const Take = {
6
+ [BlockType.Take]: {
7
+ type: 'object',
8
+ additionalProperties: false,
9
+ required: ['text', 'author'],
10
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { text: { type: 'string', contentType: 'text' }, author: {
11
+ type: 'object',
12
+ additionalProperties: false,
13
+ required: ['firstName', 'secondName'],
14
+ properties: {
15
+ firstName: { type: 'string', contentType: 'text' },
16
+ secondName: { type: 'string', contentType: 'text' },
17
+ description: { type: 'string', contentType: 'yfm' },
18
+ avatar: { type: 'string' },
19
+ },
20
+ } }),
21
+ },
22
+ };
23
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Take/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAC9C,OAAO,EAAC,aAAa,EAAC,+BAA4B;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,UAAU,CAAC;AAEf,MAAM,CAAC,MAAM,IAAI,GAAG;IAChB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;QAC5B,UAAU,gDACH,cAAc,GACd,aAAa,KAChB,IAAI,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAC,EAC3C,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,QAAQ,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;gBACrC,UAAU,EAAE;oBACR,SAAS,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAC;oBAChD,UAAU,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAC;oBACjD,WAAW,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAC;oBACjD,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC;iBAC3B;aACJ,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps},\n} = validators;\n\nexport const Take = {\n [BlockType.Take]: {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'author'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n text: {type: 'string', contentType: 'text'},\n author: {\n type: 'object',\n additionalProperties: false,\n required: ['firstName', 'secondName'],\n properties: {\n firstName: {type: 'string', contentType: 'text'},\n secondName: {type: 'string', contentType: 'text'},\n description: {type: 'string', contentType: 'yfm'},\n avatar: {type: 'string'},\n },\n },\n },\n },\n};\n"]}
@@ -6,6 +6,9 @@ unpredictable css rules order in build */
6
6
  .bc-wrapper_padding-top_s {
7
7
  padding-top: 16px;
8
8
  }
9
+ .bc-wrapper_padding-top_sm {
10
+ padding-top: 24px;
11
+ }
9
12
  .bc-wrapper_padding-top_m {
10
13
  padding-top: 32px;
11
14
  }
@@ -21,6 +24,9 @@ unpredictable css rules order in build */
21
24
  .bc-wrapper_padding-bottom_s {
22
25
  padding-bottom: 16px;
23
26
  }
27
+ .bc-wrapper_padding-bottom_sm {
28
+ padding-bottom: 24px;
29
+ }
24
30
  .bc-wrapper_padding-bottom_m {
25
31
  padding-bottom: 32px;
26
32
  }
@@ -29,4 +35,40 @@ unpredictable css rules order in build */
29
35
  }
30
36
  .bc-wrapper_padding-bottom_xl {
31
37
  padding-bottom: 64px;
38
+ }
39
+ .bc-wrapper_padding-left_xs {
40
+ padding-left: 0px;
41
+ }
42
+ .bc-wrapper_padding-left_s {
43
+ padding-left: 16px;
44
+ }
45
+ .bc-wrapper_padding-left_sm {
46
+ padding-left: 24px;
47
+ }
48
+ .bc-wrapper_padding-left_m {
49
+ padding-left: 32px;
50
+ }
51
+ .bc-wrapper_padding-left_l {
52
+ padding-left: 48px;
53
+ }
54
+ .bc-wrapper_padding-left_xl {
55
+ padding-left: 64px;
56
+ }
57
+ .bc-wrapper_padding-right_xs {
58
+ padding-right: 0px;
59
+ }
60
+ .bc-wrapper_padding-right_s {
61
+ padding-right: 16px;
62
+ }
63
+ .bc-wrapper_padding-right_sm {
64
+ padding-right: 24px;
65
+ }
66
+ .bc-wrapper_padding-right_m {
67
+ padding-right: 32px;
68
+ }
69
+ .bc-wrapper_padding-right_l {
70
+ padding-right: 48px;
71
+ }
72
+ .bc-wrapper_padding-right_xl {
73
+ padding-right: 64px;
32
74
  }
@@ -5,6 +5,7 @@ import './Wrapper.css';
5
5
  type WrapperProps = ClassNameProps & QAProps & {
6
6
  paddings?: Paddings;
7
7
  children?: React.ReactNode;
8
+ style?: React.CSSProperties;
8
9
  };
9
10
  export declare const Wrapper: React.FunctionComponent<WrapperProps>;
10
11
  export {};
@@ -3,10 +3,10 @@ import { DEFAULT_PADDINGS } from "../../constants.js";
3
3
  import { block } from "../../utils/cn.js";
4
4
  import './Wrapper.css';
5
5
  const b = block('wrapper');
6
- export const Wrapper = ({ children, paddings = DEFAULT_PADDINGS, className, qa, }) => (_jsx("section", { className: b({
6
+ export const Wrapper = ({ children, paddings = DEFAULT_PADDINGS, className, qa, style, }) => (_jsx("section", { className: b({
7
7
  ['padding-top']: (paddings === null || paddings === void 0 ? void 0 : paddings.top) || 'xs',
8
8
  ['padding-bottom']: (paddings === null || paddings === void 0 ? void 0 : paddings.bottom) || 'l',
9
9
  ['padding-left']: (paddings === null || paddings === void 0 ? void 0 : paddings.left) || '',
10
10
  ['padding-right']: (paddings === null || paddings === void 0 ? void 0 : paddings.right) || '',
11
- }, className), "data-qa": qa, children: children }));
11
+ }, className), "data-qa": qa, style: style, children: children }));
12
12
  //# sourceMappingURL=Wrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Wrapper.js","sourceRoot":"../../../../src","sources":["components/Wrapper/Wrapper.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,gBAAgB,EAAC,2BAAwB;AAGjD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAQ3B,MAAM,CAAC,MAAM,OAAO,GAA0C,CAAC,EAC3D,QAAQ,EACR,QAAQ,GAAG,gBAAgB,EAC3B,SAAS,EACT,EAAE,GACL,EAAE,EAAE,CAAC,CACF,kBACI,SAAS,EAAE,CAAC,CACR;QACI,CAAC,aAAa,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,KAAI,IAAI;QACtC,CAAC,gBAAgB,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,KAAI,GAAG;QAC3C,CAAC,cAAc,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,KAAI,EAAE;QACtC,CAAC,eAAe,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,KAAI,EAAE;KAC3C,EACD,SAAS,CACZ,aACQ,EAAE,YAEV,QAAQ,GACH,CACb,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {DEFAULT_PADDINGS} from '../../constants';\nimport {ClassNameProps, QAProps} from '../../models/common';\nimport {Paddings} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Wrapper.scss';\n\nconst b = block('wrapper');\n\ntype WrapperProps = ClassNameProps &\n QAProps & {\n paddings?: Paddings;\n children?: React.ReactNode;\n };\n\nexport const Wrapper: React.FunctionComponent<WrapperProps> = ({\n children,\n paddings = DEFAULT_PADDINGS,\n className,\n qa,\n}) => (\n <section\n className={b(\n {\n ['padding-top']: paddings?.top || 'xs',\n ['padding-bottom']: paddings?.bottom || 'l',\n ['padding-left']: paddings?.left || '',\n ['padding-right']: paddings?.right || '',\n },\n className,\n )}\n data-qa={qa}\n >\n {children}\n </section>\n);\n"]}
1
+ {"version":3,"file":"Wrapper.js","sourceRoot":"../../../../src","sources":["components/Wrapper/Wrapper.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,gBAAgB,EAAC,2BAAwB;AAGjD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAS3B,MAAM,CAAC,MAAM,OAAO,GAA0C,CAAC,EAC3D,QAAQ,EACR,QAAQ,GAAG,gBAAgB,EAC3B,SAAS,EACT,EAAE,EACF,KAAK,GACR,EAAE,EAAE,CAAC,CACF,kBACI,SAAS,EAAE,CAAC,CACR;QACI,CAAC,aAAa,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,KAAI,IAAI;QACtC,CAAC,gBAAgB,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,KAAI,GAAG;QAC3C,CAAC,cAAc,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,KAAI,EAAE;QACtC,CAAC,eAAe,CAAC,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,KAAI,EAAE;KAC3C,EACD,SAAS,CACZ,aACQ,EAAE,EACX,KAAK,EAAE,KAAK,YAEX,QAAQ,GACH,CACb,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {DEFAULT_PADDINGS} from '../../constants';\nimport {ClassNameProps, QAProps} from '../../models/common';\nimport {Paddings} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Wrapper.scss';\n\nconst b = block('wrapper');\n\ntype WrapperProps = ClassNameProps &\n QAProps & {\n paddings?: Paddings;\n children?: React.ReactNode;\n style?: React.CSSProperties;\n };\n\nexport const Wrapper: React.FunctionComponent<WrapperProps> = ({\n children,\n paddings = DEFAULT_PADDINGS,\n className,\n qa,\n style,\n}) => (\n <section\n className={b(\n {\n ['padding-top']: paddings?.top || 'xs',\n ['padding-bottom']: paddings?.bottom || 'l',\n ['padding-left']: paddings?.left || '',\n ['padding-right']: paddings?.right || '',\n },\n className,\n )}\n data-qa={qa}\n style={style}\n >\n {children}\n </section>\n);\n"]}
@@ -12,6 +12,8 @@ declare const _default: {
12
12
  "blog-feed-block": ({ image }: import("../models/blocks.js").FeedProps) => import("react/jsx-runtime").JSX.Element;
13
13
  "blog-form-block": ({ paddingTop, paddingBottom, ...props }: import("../models/blocks.js").FormProps) => import("react/jsx-runtime").JSX.Element | null;
14
14
  "blog-compact-media-block": ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }: import("../models/blocks.js").CompactMediaProps) => import("react/jsx-runtime").JSX.Element;
15
+ "blog-take-block": (props: import("../models/blocks.js").TakeProps) => import("react/jsx-runtime").JSX.Element;
16
+ "blog-side-card-list-block": ({ title, items, paddingTop, paddingBottom }: import("../models/blocks.js").SideCardListProps) => import("react/jsx-runtime").JSX.Element;
15
17
  };
16
18
  headers: {
17
19
  "blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -9,7 +9,9 @@ import { Header } from "../blocks/Header/Header.js";
9
9
  import { Layout } from "../blocks/Layout/Layout.js";
10
10
  import { Media } from "../blocks/Media/Media.js";
11
11
  import { Meta } from "../blocks/Meta/Meta.js";
12
+ import { SideCardList } from "../blocks/SideCardList/SideCardList.js";
12
13
  import { Suggest } from "../blocks/Suggest/Suggest.js";
14
+ import { Take } from "../blocks/Take/Take.js";
13
15
  import { YFM } from "../blocks/YFM/YFM.js";
14
16
  import { BlockType } from "../models/common.js";
15
17
  const blocks = {
@@ -25,6 +27,8 @@ const blocks = {
25
27
  [BlockType.Feed]: Feed,
26
28
  [BlockType.Form]: Form,
27
29
  [BlockType.CompactMedia]: CompactMedia,
30
+ [BlockType.Take]: Take,
31
+ [BlockType.SideCardList]: SideCardList,
28
32
  };
29
33
  const headers = {
30
34
  [BlockType.Header]: Header,
@@ -1 +1 @@
1
- {"version":3,"file":"blocksMap.js","sourceRoot":"../../../src","sources":["constructor/blocksMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,GAAG,EAAC,6BAA0B;AACtC,OAAO,EAAC,WAAW,EAAC,6CAA0C;AAC9D,OAAO,EAAC,YAAY,EAAC,+CAA4C;AACjE,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,KAAK,EAAC,iCAA8B;AAC5C,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,OAAO,EAAC,qCAAkC;AAClD,OAAO,EAAC,GAAG,EAAC,6BAA0B;AACtC,OAAO,EAAC,SAAS,EAAC,4BAAyB;AAE3C,MAAM,MAAM,GAAG;IACX,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;IACpB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK;IACxB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;IACpB,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW;IACpC,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO;IAC5B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY;CACzC,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;CAC7B,CAAC;AAEF,eAAe,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC","sourcesContent":["import {Author} from '../blocks/Author/Author';\nimport {Banner} from '../blocks/Banner/Banner';\nimport {CTA} from '../blocks/CTA/CTA';\nimport {ColoredText} from '../blocks/ColoredText/ColoredText';\nimport {CompactMedia} from '../blocks/CompactMedia/CompactMedia';\nimport {Feed} from '../blocks/Feed/Feed';\nimport {Form} from '../blocks/Form/Form';\nimport {Header} from '../blocks/Header/Header';\nimport {Layout} from '../blocks/Layout/Layout';\nimport {Media} from '../blocks/Media/Media';\nimport {Meta} from '../blocks/Meta/Meta';\nimport {Suggest} from '../blocks/Suggest/Suggest';\nimport {YFM} from '../blocks/YFM/YFM';\nimport {BlockType} from '../models/common';\n\nconst blocks = {\n [BlockType.YFM]: YFM,\n [BlockType.Layout]: Layout,\n [BlockType.Media]: Media,\n [BlockType.Banner]: Banner,\n [BlockType.CTA]: CTA,\n [BlockType.ColoredText]: ColoredText,\n [BlockType.Author]: Author,\n [BlockType.Suggest]: Suggest,\n [BlockType.Meta]: Meta,\n [BlockType.Feed]: Feed,\n [BlockType.Form]: Form,\n [BlockType.CompactMedia]: CompactMedia,\n};\n\nconst headers = {\n [BlockType.Header]: Header,\n};\n\nexport default {blocks, headers};\n"]}
1
+ {"version":3,"file":"blocksMap.js","sourceRoot":"../../../src","sources":["constructor/blocksMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,GAAG,EAAC,6BAA0B;AACtC,OAAO,EAAC,WAAW,EAAC,6CAA0C;AAC9D,OAAO,EAAC,YAAY,EAAC,+CAA4C;AACjE,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,MAAM,EAAC,mCAAgC;AAC/C,OAAO,EAAC,KAAK,EAAC,iCAA8B;AAC5C,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,YAAY,EAAC,+CAA4C;AACjE,OAAO,EAAC,OAAO,EAAC,qCAAkC;AAClD,OAAO,EAAC,IAAI,EAAC,+BAA4B;AACzC,OAAO,EAAC,GAAG,EAAC,6BAA0B;AACtC,OAAO,EAAC,SAAS,EAAC,4BAAyB;AAE3C,MAAM,MAAM,GAAG;IACX,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;IACpB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK;IACxB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;IACpB,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW;IACpC,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;IAC1B,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO;IAC5B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY;IACtC,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;IACtB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY;CACzC,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;CAC7B,CAAC;AAEF,eAAe,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC","sourcesContent":["import {Author} from '../blocks/Author/Author';\nimport {Banner} from '../blocks/Banner/Banner';\nimport {CTA} from '../blocks/CTA/CTA';\nimport {ColoredText} from '../blocks/ColoredText/ColoredText';\nimport {CompactMedia} from '../blocks/CompactMedia/CompactMedia';\nimport {Feed} from '../blocks/Feed/Feed';\nimport {Form} from '../blocks/Form/Form';\nimport {Header} from '../blocks/Header/Header';\nimport {Layout} from '../blocks/Layout/Layout';\nimport {Media} from '../blocks/Media/Media';\nimport {Meta} from '../blocks/Meta/Meta';\nimport {SideCardList} from '../blocks/SideCardList/SideCardList';\nimport {Suggest} from '../blocks/Suggest/Suggest';\nimport {Take} from '../blocks/Take/Take';\nimport {YFM} from '../blocks/YFM/YFM';\nimport {BlockType} from '../models/common';\n\nconst blocks = {\n [BlockType.YFM]: YFM,\n [BlockType.Layout]: Layout,\n [BlockType.Media]: Media,\n [BlockType.Banner]: Banner,\n [BlockType.CTA]: CTA,\n [BlockType.ColoredText]: ColoredText,\n [BlockType.Author]: Author,\n [BlockType.Suggest]: Suggest,\n [BlockType.Meta]: Meta,\n [BlockType.Feed]: Feed,\n [BlockType.Form]: Form,\n [BlockType.CompactMedia]: CompactMedia,\n [BlockType.Take]: Take,\n [BlockType.SideCardList]: SideCardList,\n};\n\nconst headers = {\n [BlockType.Header]: Header,\n};\n\nexport default {blocks, headers};\n"]}
@@ -14,6 +14,8 @@ export declare const useExtendedComponentMap: (custom: CustomConfig | undefined)
14
14
  "blog-feed-block": ({ image }: import("../models/blocks.js").FeedProps) => import("react/jsx-runtime").JSX.Element;
15
15
  "blog-form-block": ({ paddingTop, paddingBottom, ...props }: import("../models/blocks.js").FormProps) => import("react/jsx-runtime").JSX.Element | null;
16
16
  "blog-compact-media-block": ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }: import("../models/blocks.js").CompactMediaProps) => import("react/jsx-runtime").JSX.Element;
17
+ "blog-take-block": (props: import("../models/blocks.js").TakeProps) => import("react/jsx-runtime").JSX.Element;
18
+ "blog-side-card-list-block": ({ title, items, paddingTop, paddingBottom }: import("../models/blocks.js").SideCardListProps) => import("react/jsx-runtime").JSX.Element;
17
19
  };
18
20
  headers: {
19
21
  "blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
2
+ import { AuthorItem, ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
3
3
  import { BlockType, ClassNameProps, PostData, QAProps } from "./common.js";
4
4
  import { PaddingsYFMProps } from "./paddings.js";
5
5
  export type AuthorProps = ClassNameProps & {
@@ -53,6 +53,19 @@ export type FormProps = {
53
53
  export type CompactMediaProps = {
54
54
  description?: string;
55
55
  } & PaddingsYFMProps & Partial<Pick<PCMediaProps, 'image'>>;
56
+ export type TakeProps = YFMProps & {
57
+ author: AuthorItem;
58
+ color?: string;
59
+ noBackground?: boolean;
60
+ };
61
+ export type SideCard = Pick<PCMediaProps, 'image'> & {
62
+ description: string;
63
+ url: string;
64
+ };
65
+ export type SideCardListProps = {
66
+ title?: string;
67
+ items: SideCard[];
68
+ } & PaddingsYFMProps;
56
69
  export type AuthorBlockModel = {
57
70
  type: BlockType.Author;
58
71
  } & AuthorProps;
@@ -92,7 +105,13 @@ export type FormBlockModel = {
92
105
  export type CompactMediaBlockModel = {
93
106
  type: BlockType.CompactMedia;
94
107
  } & CompactMediaProps;
95
- export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel;
108
+ export type TakeBlockModel = {
109
+ type: BlockType.Take;
110
+ } & TakeProps;
111
+ export type SideCardListBlockModel = {
112
+ type: BlockType.SideCardList;
113
+ } & SideCardListProps;
114
+ export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel | TakeBlockModel | SideCardListBlockModel;
96
115
  export type Block = BlockModel & {
97
116
  [x: string]: any;
98
117
  };
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["models/blocks.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nimport {\n ContentBlockProps,\n FormBlockData,\n HeaderBlockProps,\n MediaProps as PCMediaProps,\n TextTheme,\n} from '@gravity-ui/page-constructor';\n\nimport {BlockType, ClassNameProps, PostData, QAProps} from './common';\nimport {PaddingsYFMProps} from './paddings';\n\n// blocks props\nexport type AuthorProps = ClassNameProps & {\n authorId: number | string;\n image: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type BannerProps = ContentBlockProps &\n QAProps & {\n color?: string;\n image?: string;\n imageSize?: 's' | 'm';\n } & PaddingsYFMProps;\n\nexport type ColoredTextProps = ContentBlockProps &\n QAProps & {\n background?: {\n color?: string;\n image?: string;\n altText?: string;\n };\n } & PaddingsYFMProps;\n\nexport type CTAProps = QAProps & {\n items: Array<ContentBlockProps>;\n} & PaddingsYFMProps;\n\ntype HeaderBlogProps = {\n imageInGrid?: boolean;\n};\n\nexport type HeaderProps = HeaderBlockProps & PaddingsYFMProps & HeaderBlogProps;\n\nexport type LayoutProps = {\n fullWidth?: boolean;\n mobileOrder?: string;\n children: React.ReactElement[];\n} & PaddingsYFMProps;\n\nexport type MediaProps = ClassNameProps &\n PaddingsYFMProps &\n Partial<\n Pick<\n PCMediaProps,\n | 'youtube'\n | 'previewImg'\n | 'image'\n | 'video'\n | 'dataLens'\n | 'videoIframe'\n | 'videoMicrodata'\n >\n > & {\n text?: string;\n };\n\nexport type MetaProps = QAProps & {\n locale: string;\n theme?: TextTheme;\n} & PaddingsYFMProps;\n\nexport type SuggestProps = ClassNameProps & {\n posts: PostData[];\n} & PaddingsYFMProps;\n\nexport type YFMProps = {\n text: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type FeedProps = {\n image: string;\n};\n\nexport type FormProps = {\n formData: FormBlockData;\n border?: 'shadow' | 'line' | 'none';\n} & PaddingsYFMProps &\n QAProps;\n\nexport type CompactMediaProps = {\n description?: string;\n} & PaddingsYFMProps &\n Partial<Pick<PCMediaProps, 'image'>>;\n\n// blocks models\nexport type AuthorBlockModel = {\n type: BlockType.Author;\n} & AuthorProps;\n\nexport type BannerBlockModel = {\n type: BlockType.Banner;\n} & BannerProps;\n\nexport type ColoredTextBlockModel = {\n type: BlockType.ColoredText;\n} & ColoredTextProps;\n\nexport type CTABlockModel = {\n type: BlockType.CTA;\n} & CTAProps;\n\nexport type HeaderBlockModel = {\n type: BlockType.Header;\n} & HeaderProps;\n\nexport type LayoutBlockModel = {\n type: BlockType.Layout;\n} & LayoutProps;\n\nexport type MediaBlockModel = {\n type: BlockType.Media;\n} & MediaProps;\n\nexport type MetaBlockModel = {\n type: BlockType.Meta;\n} & MetaProps;\n\nexport type SuggestBlockModel = {\n type: BlockType.Suggest;\n} & SuggestProps;\n\nexport type YFMBlockModel = {\n type: BlockType.YFM;\n} & YFMProps;\n\nexport type FeedBlockModel = {\n type: BlockType.Feed;\n} & FeedProps;\n\nexport type FormBlockModel = {\n type: BlockType.Form;\n} & FormProps;\n\nexport type CompactMediaBlockModel = {\n type: BlockType.CompactMedia;\n} & CompactMediaProps;\n\nexport type BlockModel =\n | AuthorBlockModel\n | BannerBlockModel\n | ColoredTextBlockModel\n | CTABlockModel\n | HeaderBlockModel\n | LayoutBlockModel\n | MediaBlockModel\n | MetaBlockModel\n | SuggestBlockModel\n | YFMBlockModel\n | FeedBlockModel\n | CompactMediaBlockModel;\n\nexport type Block = BlockModel & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [x: string]: any;\n};\n"]}
1
+ {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["models/blocks.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nimport {\n AuthorItem,\n ContentBlockProps,\n FormBlockData,\n HeaderBlockProps,\n MediaProps as PCMediaProps,\n TextTheme,\n} from '@gravity-ui/page-constructor';\n\nimport {BlockType, ClassNameProps, PostData, QAProps} from './common';\nimport {PaddingsYFMProps} from './paddings';\n\n// blocks props\nexport type AuthorProps = ClassNameProps & {\n authorId: number | string;\n image: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type BannerProps = ContentBlockProps &\n QAProps & {\n color?: string;\n image?: string;\n imageSize?: 's' | 'm';\n } & PaddingsYFMProps;\n\nexport type ColoredTextProps = ContentBlockProps &\n QAProps & {\n background?: {\n color?: string;\n image?: string;\n altText?: string;\n };\n } & PaddingsYFMProps;\n\nexport type CTAProps = QAProps & {\n items: Array<ContentBlockProps>;\n} & PaddingsYFMProps;\n\ntype HeaderBlogProps = {\n imageInGrid?: boolean;\n};\n\nexport type HeaderProps = HeaderBlockProps & PaddingsYFMProps & HeaderBlogProps;\n\nexport type LayoutProps = {\n fullWidth?: boolean;\n mobileOrder?: string;\n children: React.ReactElement[];\n} & PaddingsYFMProps;\n\nexport type MediaProps = ClassNameProps &\n PaddingsYFMProps &\n Partial<\n Pick<\n PCMediaProps,\n | 'youtube'\n | 'previewImg'\n | 'image'\n | 'video'\n | 'dataLens'\n | 'videoIframe'\n | 'videoMicrodata'\n >\n > & {\n text?: string;\n };\n\nexport type MetaProps = QAProps & {\n locale: string;\n theme?: TextTheme;\n} & PaddingsYFMProps;\n\nexport type SuggestProps = ClassNameProps & {\n posts: PostData[];\n} & PaddingsYFMProps;\n\nexport type YFMProps = {\n text: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type FeedProps = {\n image: string;\n};\n\nexport type FormProps = {\n formData: FormBlockData;\n border?: 'shadow' | 'line' | 'none';\n} & PaddingsYFMProps &\n QAProps;\n\nexport type CompactMediaProps = {\n description?: string;\n} & PaddingsYFMProps &\n Partial<Pick<PCMediaProps, 'image'>>;\n\nexport type TakeProps = YFMProps & {\n author: AuthorItem;\n color?: string;\n noBackground?: boolean;\n};\n\nexport type SideCard = Pick<PCMediaProps, 'image'> & {\n description: string;\n url: string;\n};\n\nexport type SideCardListProps = {\n title?: string;\n items: SideCard[];\n} & PaddingsYFMProps;\n\n// blocks models\nexport type AuthorBlockModel = {\n type: BlockType.Author;\n} & AuthorProps;\n\nexport type BannerBlockModel = {\n type: BlockType.Banner;\n} & BannerProps;\n\nexport type ColoredTextBlockModel = {\n type: BlockType.ColoredText;\n} & ColoredTextProps;\n\nexport type CTABlockModel = {\n type: BlockType.CTA;\n} & CTAProps;\n\nexport type HeaderBlockModel = {\n type: BlockType.Header;\n} & HeaderProps;\n\nexport type LayoutBlockModel = {\n type: BlockType.Layout;\n} & LayoutProps;\n\nexport type MediaBlockModel = {\n type: BlockType.Media;\n} & MediaProps;\n\nexport type MetaBlockModel = {\n type: BlockType.Meta;\n} & MetaProps;\n\nexport type SuggestBlockModel = {\n type: BlockType.Suggest;\n} & SuggestProps;\n\nexport type YFMBlockModel = {\n type: BlockType.YFM;\n} & YFMProps;\n\nexport type FeedBlockModel = {\n type: BlockType.Feed;\n} & FeedProps;\n\nexport type FormBlockModel = {\n type: BlockType.Form;\n} & FormProps;\n\nexport type CompactMediaBlockModel = {\n type: BlockType.CompactMedia;\n} & CompactMediaProps;\n\nexport type TakeBlockModel = {\n type: BlockType.Take;\n} & TakeProps;\n\nexport type SideCardListBlockModel = {\n type: BlockType.SideCardList;\n} & SideCardListProps;\n\nexport type BlockModel =\n | AuthorBlockModel\n | BannerBlockModel\n | ColoredTextBlockModel\n | CTABlockModel\n | HeaderBlockModel\n | LayoutBlockModel\n | MediaBlockModel\n | MetaBlockModel\n | SuggestBlockModel\n | YFMBlockModel\n | FeedBlockModel\n | CompactMediaBlockModel\n | TakeBlockModel\n | SideCardListBlockModel;\n\nexport type Block = BlockModel & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [x: string]: any;\n};\n"]}
@@ -98,7 +98,9 @@ export declare enum BlockType {
98
98
  Meta = "blog-meta-block",
99
99
  Feed = "blog-feed-block",
100
100
  Form = "blog-form-block",
101
- CompactMedia = "blog-compact-media-block"
101
+ CompactMedia = "blog-compact-media-block",
102
+ Take = "blog-take-block",
103
+ SideCardList = "blog-side-card-list-block"
102
104
  }
103
105
  export type MetaProps = {
104
106
  metaComponent: JSX.Element;
@@ -18,6 +18,8 @@ export var BlockType;
18
18
  BlockType["Feed"] = "blog-feed-block";
19
19
  BlockType["Form"] = "blog-form-block";
20
20
  BlockType["CompactMedia"] = "blog-compact-media-block";
21
+ BlockType["Take"] = "blog-take-block";
22
+ BlockType["SideCardList"] = "blog-side-card-list-block";
21
23
  })(BlockType || (BlockType = {}));
22
24
  export var DefaultEventNames;
23
25
  (function (DefaultEventNames) {
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"../../../src","sources":["models/common.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,wBAAe,CAAA;IACf,sBAAa,CAAA;AACjB,CAAC,EAHW,KAAK,KAAL,KAAK,QAGhB;AA2FD,MAAM,CAAN,IAAY,SAcX;AAdD,WAAY,SAAS;IACjB,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,oDAAuC,CAAA;IACvC,yCAA4B,CAAA;IAC5B,2CAA8B,CAAA;IAC9B,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;AAC7C,CAAC,EAdW,SAAS,KAAT,SAAS,QAcpB;AA+DD,MAAM,CAAN,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IACzB,uDAAkC,CAAA;IAClC,qDAAgC,CAAA;IAChC,wDAAmC,CAAA;IACnC,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,+CAA0B,CAAA;IAC1B,uDAAkC,CAAA;IAClC,wDAAmC,CAAA;AACvC,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,QAU5B;AAWD,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,4BAAY,CAAA;AAChB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,sCAAS,CAAA;IACT,sCAAS,CAAA;AACb,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC","sourcesContent":["import * as React from 'react';\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {MarkdownItPluginCb} from '@diplodoc/transform/lib/plugins/typings';\nimport {HeaderBlockProps as PageConstructorHeaderBlockProps} from '@gravity-ui/page-constructor';\nimport {IBrowser, IDevice} from 'ua-parser-js';\n\nimport {Locale} from '../models/locale';\n\nexport enum Theme {\n Light = 'light',\n Dark = 'dark',\n}\n\nexport interface ClassNameProps {\n className?: string;\n}\n\nexport type Author = {\n id: number | string;\n avatar: string | null;\n createdAt: string;\n updatedAt: string;\n firstName: string | null;\n secondName: string | null;\n description: string | null;\n fullDescription: string | null;\n shortDescription: string | null;\n} & {\n [x: string]: string | null;\n};\n\nexport type Service = {\n id: number | string;\n slug: string;\n name: string;\n} & {\n [x: string]: string | null;\n};\n\nexport type Query = Record<string, number | string | null>;\n\n//page models\n\nexport interface Menu {\n title: string;\n}\n\nexport interface WithDeviceProps {\n device: IDevice;\n browser: IBrowser;\n isRobot: boolean;\n}\n\nexport interface PostsProps {\n posts: PostData[];\n count: number;\n totalCount: number;\n pinnedPost?: PostData;\n}\n\nexport type Tag = {\n slug: string;\n name: string;\n createdAt?: string;\n updatedAt?: string;\n icon?: string;\n isDeleted?: boolean;\n locale?: string;\n blogTagId?: number | string;\n count?: number;\n};\n\nexport interface PostData {\n author?: string;\n authors?: Author[];\n blogPostId?: number | string;\n content?: string;\n date: string;\n description?: string;\n hasUserLike: boolean;\n htmlTitle: string;\n id: number;\n image: string;\n isPublished?: boolean;\n sharedImage?: string;\n likes: number;\n locale: Locale;\n metaDescription?: string | null;\n metaTitle?: string | null;\n readingTime?: number;\n shareDescription?: string;\n shareImage?: string;\n shareTitle?: string;\n slug: string;\n keywords?: string[];\n tags: Tag[];\n textTitle: string;\n title: string;\n url: string;\n noIndex?: boolean;\n}\n\nexport enum BlockType {\n Header = 'blog-header-block',\n YFM = 'blog-yfm-block',\n Layout = 'blog-layout-block',\n Media = 'blog-media-block',\n Banner = 'blog-banner-block',\n CTA = 'blog-cta-block',\n ColoredText = 'blog-colored-text-block',\n Author = 'blog-author-block',\n Suggest = 'blog-suggest-block',\n Meta = 'blog-meta-block',\n Feed = 'blog-feed-block',\n Form = 'blog-form-block',\n CompactMedia = 'blog-compact-media-block',\n}\n\nexport type MetaProps = {\n metaComponent: JSX.Element;\n needHelmetWrapper: boolean;\n};\n\nexport type MetaOrganizationType = {\n url: string;\n appTitle: string;\n legalName: string;\n supportEmail: string;\n};\n\nexport interface PostMetaProps {\n title: string;\n date: string;\n image: string;\n canonicalUrl: string;\n content?: string;\n description?: string;\n sharing: {\n shareTitle: string;\n shareDescription: string;\n shareImage: string;\n shareGenImage: string;\n shareGenTitle: string;\n };\n keywords?: string[];\n noIndex?: boolean;\n authors?: Author[];\n tags?: Tag[];\n organization: MetaOrganizationType;\n}\n\nexport type ToggleLikeCallbackType = ({\n postId,\n hasLike,\n}: {\n postId?: number | string;\n hasLike?: boolean;\n}) => void;\n\nexport interface HeaderBlockProps extends PageConstructorHeaderBlockProps {\n backLink?: {\n url: string;\n title: React.ReactNode;\n };\n}\n\nexport type GetPostsRequest = {\n tags: string | undefined;\n page: number;\n perPage: number;\n savedOnly: boolean;\n search: string | undefined;\n services: string | undefined;\n};\n\nexport type GetPostsType = (query: GetPostsRequest) => Promise<PostsProps>;\n\nexport type HandleChangeQueryParams = (params: Query) => void;\n\nexport enum DefaultEventNames {\n ShareButton = 'share-button-click',\n SaveButton = 'save-button-click',\n ShowMore = 'show-more-button-click',\n PaginatorHome = 'paginator-home-button-click',\n PaginatorNext = 'paginator-next-button-click',\n PaginatorPage = 'paginator-page-button-click',\n Tag = 'selector-tag-click',\n Service = 'selector-service-click',\n SaveOnly = 'save-only-button-click',\n}\n\nexport type FetchArgs = {\n page?: number;\n query: Query;\n};\n\nexport interface QAProps {\n qa?: string;\n}\n\nexport enum PostCardSize {\n SMALL = 's',\n MEDIUM = 'm',\n}\n\nexport enum PostCardTitleHeadingLevel {\n H2 = 'h2',\n H3 = 'h3',\n}\n\nexport interface TransformPostOptions {\n plugins?: MarkdownItPluginCb[];\n}\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"../../../src","sources":["models/common.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,wBAAe,CAAA;IACf,sBAAa,CAAA;AACjB,CAAC,EAHW,KAAK,KAAL,KAAK,QAGhB;AA2FD,MAAM,CAAN,IAAY,SAgBX;AAhBD,WAAY,SAAS;IACjB,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,oDAAuC,CAAA;IACvC,yCAA4B,CAAA;IAC5B,2CAA8B,CAAA;IAC9B,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,qCAAwB,CAAA;IACxB,uDAA0C,CAAA;AAC9C,CAAC,EAhBW,SAAS,KAAT,SAAS,QAgBpB;AA+DD,MAAM,CAAN,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IACzB,uDAAkC,CAAA;IAClC,qDAAgC,CAAA;IAChC,wDAAmC,CAAA;IACnC,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,+CAA0B,CAAA;IAC1B,uDAAkC,CAAA;IAClC,wDAAmC,CAAA;AACvC,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,QAU5B;AAWD,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,4BAAY,CAAA;AAChB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,sCAAS,CAAA;IACT,sCAAS,CAAA;AACb,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC","sourcesContent":["import * as React from 'react';\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {MarkdownItPluginCb} from '@diplodoc/transform/lib/plugins/typings';\nimport {HeaderBlockProps as PageConstructorHeaderBlockProps} from '@gravity-ui/page-constructor';\nimport {IBrowser, IDevice} from 'ua-parser-js';\n\nimport {Locale} from '../models/locale';\n\nexport enum Theme {\n Light = 'light',\n Dark = 'dark',\n}\n\nexport interface ClassNameProps {\n className?: string;\n}\n\nexport type Author = {\n id: number | string;\n avatar: string | null;\n createdAt: string;\n updatedAt: string;\n firstName: string | null;\n secondName: string | null;\n description: string | null;\n fullDescription: string | null;\n shortDescription: string | null;\n} & {\n [x: string]: string | null;\n};\n\nexport type Service = {\n id: number | string;\n slug: string;\n name: string;\n} & {\n [x: string]: string | null;\n};\n\nexport type Query = Record<string, number | string | null>;\n\n//page models\n\nexport interface Menu {\n title: string;\n}\n\nexport interface WithDeviceProps {\n device: IDevice;\n browser: IBrowser;\n isRobot: boolean;\n}\n\nexport interface PostsProps {\n posts: PostData[];\n count: number;\n totalCount: number;\n pinnedPost?: PostData;\n}\n\nexport type Tag = {\n slug: string;\n name: string;\n createdAt?: string;\n updatedAt?: string;\n icon?: string;\n isDeleted?: boolean;\n locale?: string;\n blogTagId?: number | string;\n count?: number;\n};\n\nexport interface PostData {\n author?: string;\n authors?: Author[];\n blogPostId?: number | string;\n content?: string;\n date: string;\n description?: string;\n hasUserLike: boolean;\n htmlTitle: string;\n id: number;\n image: string;\n isPublished?: boolean;\n sharedImage?: string;\n likes: number;\n locale: Locale;\n metaDescription?: string | null;\n metaTitle?: string | null;\n readingTime?: number;\n shareDescription?: string;\n shareImage?: string;\n shareTitle?: string;\n slug: string;\n keywords?: string[];\n tags: Tag[];\n textTitle: string;\n title: string;\n url: string;\n noIndex?: boolean;\n}\n\nexport enum BlockType {\n Header = 'blog-header-block',\n YFM = 'blog-yfm-block',\n Layout = 'blog-layout-block',\n Media = 'blog-media-block',\n Banner = 'blog-banner-block',\n CTA = 'blog-cta-block',\n ColoredText = 'blog-colored-text-block',\n Author = 'blog-author-block',\n Suggest = 'blog-suggest-block',\n Meta = 'blog-meta-block',\n Feed = 'blog-feed-block',\n Form = 'blog-form-block',\n CompactMedia = 'blog-compact-media-block',\n Take = 'blog-take-block',\n SideCardList = 'blog-side-card-list-block',\n}\n\nexport type MetaProps = {\n metaComponent: JSX.Element;\n needHelmetWrapper: boolean;\n};\n\nexport type MetaOrganizationType = {\n url: string;\n appTitle: string;\n legalName: string;\n supportEmail: string;\n};\n\nexport interface PostMetaProps {\n title: string;\n date: string;\n image: string;\n canonicalUrl: string;\n content?: string;\n description?: string;\n sharing: {\n shareTitle: string;\n shareDescription: string;\n shareImage: string;\n shareGenImage: string;\n shareGenTitle: string;\n };\n keywords?: string[];\n noIndex?: boolean;\n authors?: Author[];\n tags?: Tag[];\n organization: MetaOrganizationType;\n}\n\nexport type ToggleLikeCallbackType = ({\n postId,\n hasLike,\n}: {\n postId?: number | string;\n hasLike?: boolean;\n}) => void;\n\nexport interface HeaderBlockProps extends PageConstructorHeaderBlockProps {\n backLink?: {\n url: string;\n title: React.ReactNode;\n };\n}\n\nexport type GetPostsRequest = {\n tags: string | undefined;\n page: number;\n perPage: number;\n savedOnly: boolean;\n search: string | undefined;\n services: string | undefined;\n};\n\nexport type GetPostsType = (query: GetPostsRequest) => Promise<PostsProps>;\n\nexport type HandleChangeQueryParams = (params: Query) => void;\n\nexport enum DefaultEventNames {\n ShareButton = 'share-button-click',\n SaveButton = 'save-button-click',\n ShowMore = 'show-more-button-click',\n PaginatorHome = 'paginator-home-button-click',\n PaginatorNext = 'paginator-next-button-click',\n PaginatorPage = 'paginator-page-button-click',\n Tag = 'selector-tag-click',\n Service = 'selector-service-click',\n SaveOnly = 'save-only-button-click',\n}\n\nexport type FetchArgs = {\n page?: number;\n query: Query;\n};\n\nexport interface QAProps {\n qa?: string;\n}\n\nexport enum PostCardSize {\n SMALL = 's',\n MEDIUM = 'm',\n}\n\nexport enum PostCardTitleHeadingLevel {\n H2 = 'h2',\n H3 = 'h3',\n}\n\nexport interface TransformPostOptions {\n plugins?: MarkdownItPluginCb[];\n}\n"]}
@@ -4,7 +4,7 @@ export declare enum PaddingsDirections {
4
4
  left = "left",
5
5
  right = "right"
6
6
  }
7
- export type PaddingSize = 'xs' | 's' | 'm' | 'l' | 'xl';
7
+ export type PaddingSize = 'xs' | 's' | 'sm' | 'm' | 'l' | 'xl';
8
8
  export type Paddings = {
9
9
  [key in PaddingsDirections]?: PaddingSize;
10
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"paddings.js","sourceRoot":"../../../src","sources":["models/paddings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,qCAAe,CAAA;AACnB,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B","sourcesContent":["export enum PaddingsDirections {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport type PaddingSize = 'xs' | 's' | 'm' | 'l' | 'xl';\n\nexport type Paddings = {\n [key in PaddingsDirections]?: PaddingSize;\n};\n\nexport type PaddingsYFMProps = {\n paddingTop?: PaddingSize;\n paddingBottom?: PaddingSize;\n paddingRight?: PaddingSize;\n paddingLeft?: PaddingSize;\n};\n"]}
1
+ {"version":3,"file":"paddings.js","sourceRoot":"../../../src","sources":["models/paddings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,qCAAe,CAAA;AACnB,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B","sourcesContent":["export enum PaddingsDirections {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport type PaddingSize = 'xs' | 's' | 'sm' | 'm' | 'l' | 'xl';\n\nexport type Paddings = {\n [key in PaddingsDirections]?: PaddingSize;\n};\n\nexport type PaddingsYFMProps = {\n paddingTop?: PaddingSize;\n paddingBottom?: PaddingSize;\n paddingRight?: PaddingSize;\n paddingLeft?: PaddingSize;\n};\n"]}
@@ -9,3 +9,4 @@ export * from "../blocks/Meta/schema.js";
9
9
  export * from "../blocks/Suggest/schema.js";
10
10
  export * from "../blocks/YFM/schema.js";
11
11
  export * from "../blocks/CompactMedia/schema.js";
12
+ export * from "../blocks/Take/schema.js";
@@ -9,4 +9,5 @@ export * from "../blocks/Meta/schema.js";
9
9
  export * from "../blocks/Suggest/schema.js";
10
10
  export * from "../blocks/YFM/schema.js";
11
11
  export * from "../blocks/CompactMedia/schema.js";
12
+ export * from "../blocks/Take/schema.js";
12
13
  //# sourceMappingURL=blocks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["schema/blocks.ts"],"names":[],"mappings":"AAAA,2CAAwC;AACxC,2CAAwC;AACxC,gDAA6C;AAC7C,wCAAqC;AACrC,yCAAsC;AACtC,2CAAwC;AACxC,0CAAuC;AACvC,yCAAsC;AACtC,4CAAyC;AACzC,wCAAqC;AACrC,iDAA8C","sourcesContent":["export * from '../blocks/Author/schema';\nexport * from '../blocks/Banner/schema';\nexport * from '../blocks/ColoredText/schema';\nexport * from '../blocks/CTA/schema';\nexport * from '../blocks/Feed/schema';\nexport * from '../blocks/Layout/schema';\nexport * from '../blocks/Media/schema';\nexport * from '../blocks/Meta/schema';\nexport * from '../blocks/Suggest/schema';\nexport * from '../blocks/YFM/schema';\nexport * from '../blocks/CompactMedia/schema';\n"]}
1
+ {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["schema/blocks.ts"],"names":[],"mappings":"AAAA,2CAAwC;AACxC,2CAAwC;AACxC,gDAA6C;AAC7C,wCAAqC;AACrC,yCAAsC;AACtC,2CAAwC;AACxC,0CAAuC;AACvC,yCAAsC;AACtC,4CAAyC;AACzC,wCAAqC;AACrC,iDAA8C;AAC9C,yCAAsC","sourcesContent":["export * from '../blocks/Author/schema';\nexport * from '../blocks/Banner/schema';\nexport * from '../blocks/ColoredText/schema';\nexport * from '../blocks/CTA/schema';\nexport * from '../blocks/Feed/schema';\nexport * from '../blocks/Layout/schema';\nexport * from '../blocks/Media/schema';\nexport * from '../blocks/Meta/schema';\nexport * from '../blocks/Suggest/schema';\nexport * from '../blocks/YFM/schema';\nexport * from '../blocks/CompactMedia/schema';\nexport * from '../blocks/Take/schema';\n"]}
@@ -2136,5 +2136,101 @@ export declare const schemasForCustom: {
2136
2136
  };
2137
2137
  };
2138
2138
  };
2139
+ "blog-take-block": {
2140
+ "blog-take-block": {
2141
+ type: string;
2142
+ additionalProperties: boolean;
2143
+ required: string[];
2144
+ properties: {
2145
+ text: {
2146
+ type: string;
2147
+ contentType: string;
2148
+ };
2149
+ author: {
2150
+ type: string;
2151
+ additionalProperties: boolean;
2152
+ required: string[];
2153
+ properties: {
2154
+ firstName: {
2155
+ type: string;
2156
+ contentType: string;
2157
+ };
2158
+ secondName: {
2159
+ type: string;
2160
+ contentType: string;
2161
+ };
2162
+ description: {
2163
+ type: string;
2164
+ contentType: string;
2165
+ };
2166
+ avatar: {
2167
+ type: string;
2168
+ };
2169
+ };
2170
+ };
2171
+ paddingTop: {
2172
+ type: string;
2173
+ enum: string[];
2174
+ };
2175
+ paddingBottom: {
2176
+ type: string;
2177
+ enum: string[];
2178
+ };
2179
+ fullWidth: {
2180
+ type: string;
2181
+ };
2182
+ column: {
2183
+ type: string;
2184
+ enum: string[];
2185
+ };
2186
+ qa: {
2187
+ type: string;
2188
+ };
2189
+ anchor: {
2190
+ type: string;
2191
+ additionalProperties: boolean;
2192
+ required: string[];
2193
+ properties: {
2194
+ text: {
2195
+ type: string;
2196
+ contentType: string;
2197
+ };
2198
+ url: {
2199
+ type: string;
2200
+ };
2201
+ urlTitle: {
2202
+ type: string;
2203
+ };
2204
+ };
2205
+ };
2206
+ visible: {
2207
+ type: string;
2208
+ enum: string[];
2209
+ };
2210
+ resetPaddings: {
2211
+ type: string;
2212
+ };
2213
+ context: {
2214
+ type: string;
2215
+ };
2216
+ indent: {
2217
+ type: string;
2218
+ additionalProperties: boolean;
2219
+ properties: {
2220
+ top: {
2221
+ enum: string[];
2222
+ };
2223
+ bottom: {
2224
+ enum: string[];
2225
+ };
2226
+ };
2227
+ };
2228
+ type: {};
2229
+ when: {
2230
+ type: string;
2231
+ };
2232
+ };
2233
+ };
2234
+ };
2139
2235
  };
2140
2236
  };
@@ -1,7 +1,7 @@
1
1
  import { BlockType } from "../models/common.js";
2
2
  import * as blocks from "./blocks.js";
3
3
  import * as headers from "./headers.js";
4
- const { Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM, CompactMedia } = blocks;
4
+ const { Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM, CompactMedia, Take, } = blocks;
5
5
  const { Header } = headers;
6
6
  export const validators = {
7
7
  blocks,
@@ -23,6 +23,7 @@ export const schemasForCustom = {
23
23
  [BlockType.Suggest]: Suggest,
24
24
  [BlockType.YFM]: YFM,
25
25
  [BlockType.CompactMedia]: CompactMedia,
26
+ [BlockType.Take]: Take,
26
27
  },
27
28
  };
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,4BAAyB;AAE3C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,KAAK,OAAO,qBAAkB;AAErC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAC,GAC3F,MAAM,CAAC;AACX,MAAM,EAAC,MAAM,EAAC,GAAG,OAAO,CAAC;AAEzB,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,MAAM;IACN,OAAO;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,OAAO,EAAE;QACL,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;KAC7B;IACD,MAAM,EAAE;QACJ,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW;QACpC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK;QACxB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO;QAC5B,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY;KACzC;CACJ,CAAC","sourcesContent":["import {BlockType} from '../models/common';\n\nimport * as blocks from './blocks';\nimport * as headers from './headers';\n\nconst {Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM, CompactMedia} =\n blocks;\nconst {Header} = headers;\n\nexport const validators = {\n blocks,\n headers,\n};\n\nexport const schemasForCustom = {\n headers: {\n [BlockType.Header]: Header,\n },\n blocks: {\n [BlockType.Author]: Author,\n [BlockType.Banner]: Banner,\n [BlockType.ColoredText]: ColoredText,\n [BlockType.CTA]: CTA,\n [BlockType.Feed]: Feed,\n [BlockType.Layout]: Layout,\n [BlockType.Media]: Media,\n [BlockType.Meta]: Meta,\n [BlockType.Suggest]: Suggest,\n [BlockType.YFM]: YFM,\n [BlockType.CompactMedia]: CompactMedia,\n },\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,4BAAyB;AAE3C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,KAAK,OAAO,qBAAkB;AAErC,MAAM,EACF,MAAM,EACN,MAAM,EACN,WAAW,EACX,GAAG,EACH,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,OAAO,EACP,GAAG,EACH,YAAY,EACZ,IAAI,GACP,GAAG,MAAM,CAAC;AACX,MAAM,EAAC,MAAM,EAAC,GAAG,OAAO,CAAC;AAEzB,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,MAAM;IACN,OAAO;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,OAAO,EAAE;QACL,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;KAC7B;IACD,MAAM,EAAE;QACJ,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW;QACpC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK;QACxB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO;QAC5B,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY;QACtC,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI;KACzB;CACJ,CAAC","sourcesContent":["import {BlockType} from '../models/common';\n\nimport * as blocks from './blocks';\nimport * as headers from './headers';\n\nconst {\n Author,\n Banner,\n ColoredText,\n CTA,\n Feed,\n Layout,\n Media,\n Meta,\n Suggest,\n YFM,\n CompactMedia,\n Take,\n} = blocks;\nconst {Header} = headers;\n\nexport const validators = {\n blocks,\n headers,\n};\n\nexport const schemasForCustom = {\n headers: {\n [BlockType.Header]: Header,\n },\n blocks: {\n [BlockType.Author]: Author,\n [BlockType.Banner]: Banner,\n [BlockType.ColoredText]: ColoredText,\n [BlockType.CTA]: CTA,\n [BlockType.Feed]: Feed,\n [BlockType.Layout]: Layout,\n [BlockType.Media]: Media,\n [BlockType.Meta]: Meta,\n [BlockType.Suggest]: Suggest,\n [BlockType.YFM]: YFM,\n [BlockType.CompactMedia]: CompactMedia,\n [BlockType.Take]: Take,\n },\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/blog-constructor",
3
- "version": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "description": "Gravity UI Blog Constructor",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
2
+ import { AuthorItem, ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
3
3
  import { BlockType, ClassNameProps, PostData, QAProps } from './common';
4
4
  import { PaddingsYFMProps } from './paddings';
5
5
  export type AuthorProps = ClassNameProps & {
@@ -53,6 +53,19 @@ export type FormProps = {
53
53
  export type CompactMediaProps = {
54
54
  description?: string;
55
55
  } & PaddingsYFMProps & Partial<Pick<PCMediaProps, 'image'>>;
56
+ export type TakeProps = YFMProps & {
57
+ author: AuthorItem;
58
+ color?: string;
59
+ noBackground?: boolean;
60
+ };
61
+ export type SideCard = Pick<PCMediaProps, 'image'> & {
62
+ description: string;
63
+ url: string;
64
+ };
65
+ export type SideCardListProps = {
66
+ title?: string;
67
+ items: SideCard[];
68
+ } & PaddingsYFMProps;
56
69
  export type AuthorBlockModel = {
57
70
  type: BlockType.Author;
58
71
  } & AuthorProps;
@@ -92,7 +105,13 @@ export type FormBlockModel = {
92
105
  export type CompactMediaBlockModel = {
93
106
  type: BlockType.CompactMedia;
94
107
  } & CompactMediaProps;
95
- export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel;
108
+ export type TakeBlockModel = {
109
+ type: BlockType.Take;
110
+ } & TakeProps;
111
+ export type SideCardListBlockModel = {
112
+ type: BlockType.SideCardList;
113
+ } & SideCardListProps;
114
+ export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel | TakeBlockModel | SideCardListBlockModel;
96
115
  export type Block = BlockModel & {
97
116
  [x: string]: any;
98
117
  };
@@ -98,7 +98,9 @@ export declare enum BlockType {
98
98
  Meta = "blog-meta-block",
99
99
  Feed = "blog-feed-block",
100
100
  Form = "blog-form-block",
101
- CompactMedia = "blog-compact-media-block"
101
+ CompactMedia = "blog-compact-media-block",
102
+ Take = "blog-take-block",
103
+ SideCardList = "blog-side-card-list-block"
102
104
  }
103
105
  export type MetaProps = {
104
106
  metaComponent: JSX.Element;