@gravity-ui/blog-constructor 11.0.1 → 11.2.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 (105) hide show
  1. package/build/cjs/blocks/Author/schema.d.ts +14 -3
  2. package/build/cjs/blocks/Author/schema.js +1 -1
  3. package/build/cjs/blocks/Author/schema.js.map +1 -1
  4. package/build/cjs/blocks/Banner/Banner.js +5 -2
  5. package/build/cjs/blocks/Banner/Banner.js.map +1 -1
  6. package/build/cjs/blocks/Banner/schema.d.ts +89 -13
  7. package/build/cjs/blocks/CTA/schema.d.ts +89 -13
  8. package/build/cjs/blocks/CTA/schema.js +1 -1
  9. package/build/cjs/blocks/CTA/schema.js.map +1 -1
  10. package/build/cjs/blocks/ColoredText/ColoredText.js +4 -1
  11. package/build/cjs/blocks/ColoredText/ColoredText.js.map +1 -1
  12. package/build/cjs/blocks/ColoredText/schema.d.ts +124 -29
  13. package/build/cjs/blocks/ColoredText/schema.js +4 -4
  14. package/build/cjs/blocks/ColoredText/schema.js.map +1 -1
  15. package/build/cjs/blocks/CompactMedia/schema.d.ts +13 -6
  16. package/build/cjs/blocks/Feed/schema.d.ts +11 -2
  17. package/build/cjs/blocks/Form/schema.d.ts +69 -38
  18. package/build/cjs/blocks/Form/schema.js +5 -22
  19. package/build/cjs/blocks/Form/schema.js.map +1 -1
  20. package/build/cjs/blocks/Header/schema.d.ts +164 -73
  21. package/build/cjs/blocks/Header/schema.js +3 -1
  22. package/build/cjs/blocks/Header/schema.js.map +1 -1
  23. package/build/cjs/blocks/Layout/schema.d.ts +11 -2
  24. package/build/cjs/blocks/Media/schema.d.ts +13 -6
  25. package/build/cjs/blocks/Meta/schema.d.ts +11 -2
  26. package/build/cjs/blocks/SideCardList/schema.d.ts +69 -6
  27. package/build/cjs/blocks/SideCardList/schema.js +16 -19
  28. package/build/cjs/blocks/SideCardList/schema.js.map +1 -1
  29. package/build/cjs/blocks/Suggest/schema.d.ts +11 -2
  30. package/build/cjs/blocks/Take/schema.d.ts +25 -2
  31. package/build/cjs/blocks/Take/schema.js +2 -2
  32. package/build/cjs/blocks/Take/schema.js.map +1 -1
  33. package/build/cjs/blocks/YFM/schema.d.ts +11 -2
  34. package/build/cjs/constructor/blocksMap.d.ts +9 -9
  35. package/build/cjs/constructor/blocksMap.js +9 -9
  36. package/build/cjs/constructor/blocksMap.js.map +1 -1
  37. package/build/cjs/containers/BlogPostPage/BlogPostPage.css +9 -1
  38. package/build/cjs/hooks/useExtendedComponentMap.d.ts +9 -9
  39. package/build/cjs/models/blocks.d.ts +3 -3
  40. package/build/cjs/models/blocks.js.map +1 -1
  41. package/build/cjs/schema/blocks.d.ts +4 -2
  42. package/build/cjs/schema/blocks.js +4 -2
  43. package/build/cjs/schema/blocks.js.map +1 -1
  44. package/build/cjs/schema/common.d.ts +4 -0
  45. package/build/cjs/schema/common.js +8 -10
  46. package/build/cjs/schema/common.js.map +1 -1
  47. package/build/cjs/schema/index.d.ts +1044 -299
  48. package/build/cjs/schema/index.js +5 -3
  49. package/build/cjs/schema/index.js.map +1 -1
  50. package/build/cjs/utils/common.d.ts +1 -2
  51. package/build/esm/blocks/Author/schema.d.ts +14 -3
  52. package/build/esm/blocks/Author/schema.js +1 -1
  53. package/build/esm/blocks/Author/schema.js.map +1 -1
  54. package/build/esm/blocks/Banner/Banner.js +5 -2
  55. package/build/esm/blocks/Banner/Banner.js.map +1 -1
  56. package/build/esm/blocks/Banner/schema.d.ts +89 -13
  57. package/build/esm/blocks/CTA/schema.d.ts +89 -13
  58. package/build/esm/blocks/CTA/schema.js +1 -1
  59. package/build/esm/blocks/CTA/schema.js.map +1 -1
  60. package/build/esm/blocks/ColoredText/ColoredText.js +5 -2
  61. package/build/esm/blocks/ColoredText/ColoredText.js.map +1 -1
  62. package/build/esm/blocks/ColoredText/schema.d.ts +124 -29
  63. package/build/esm/blocks/ColoredText/schema.js +4 -4
  64. package/build/esm/blocks/ColoredText/schema.js.map +1 -1
  65. package/build/esm/blocks/CompactMedia/schema.d.ts +13 -6
  66. package/build/esm/blocks/Feed/schema.d.ts +11 -2
  67. package/build/esm/blocks/Form/schema.d.ts +69 -38
  68. package/build/esm/blocks/Form/schema.js +4 -21
  69. package/build/esm/blocks/Form/schema.js.map +1 -1
  70. package/build/esm/blocks/Header/schema.d.ts +164 -73
  71. package/build/esm/blocks/Header/schema.js +3 -1
  72. package/build/esm/blocks/Header/schema.js.map +1 -1
  73. package/build/esm/blocks/Layout/schema.d.ts +11 -2
  74. package/build/esm/blocks/Media/schema.d.ts +13 -6
  75. package/build/esm/blocks/Meta/schema.d.ts +11 -2
  76. package/build/esm/blocks/SideCardList/schema.d.ts +69 -6
  77. package/build/esm/blocks/SideCardList/schema.js +16 -19
  78. package/build/esm/blocks/SideCardList/schema.js.map +1 -1
  79. package/build/esm/blocks/Suggest/schema.d.ts +11 -2
  80. package/build/esm/blocks/Take/schema.d.ts +25 -2
  81. package/build/esm/blocks/Take/schema.js +3 -3
  82. package/build/esm/blocks/Take/schema.js.map +1 -1
  83. package/build/esm/blocks/YFM/schema.d.ts +11 -2
  84. package/build/esm/constructor/blocksMap.d.ts +9 -9
  85. package/build/esm/constructor/blocksMap.js +9 -9
  86. package/build/esm/constructor/blocksMap.js.map +1 -1
  87. package/build/esm/containers/BlogPostPage/BlogPostPage.css +9 -1
  88. package/build/esm/hooks/useExtendedComponentMap.d.ts +9 -9
  89. package/build/esm/models/blocks.d.ts +3 -3
  90. package/build/esm/models/blocks.js.map +1 -1
  91. package/build/esm/schema/blocks.d.ts +4 -2
  92. package/build/esm/schema/blocks.js +4 -2
  93. package/build/esm/schema/blocks.js.map +1 -1
  94. package/build/esm/schema/common.d.ts +4 -0
  95. package/build/esm/schema/common.js +7 -9
  96. package/build/esm/schema/common.js.map +1 -1
  97. package/build/esm/schema/index.d.ts +1044 -299
  98. package/build/esm/schema/index.js +5 -3
  99. package/build/esm/schema/index.js.map +1 -1
  100. package/build/esm/utils/common.d.ts +1 -2
  101. package/package.json +3 -3
  102. package/server/models/blocks.d.ts +3 -3
  103. package/styles/storybook/common.scss +6 -0
  104. package/styles/styles.css +9 -1
  105. package/styles/yfm.css +9 -1
@@ -21,9 +21,9 @@ export declare const Media: {
21
21
  };
22
22
  };
23
23
  } | {
24
+ optionName: string;
24
25
  type: string;
25
26
  pattern: string;
26
- optionName: string;
27
27
  items?: undefined;
28
28
  } | {
29
29
  type: string;
@@ -36,7 +36,6 @@ export declare const Media: {
36
36
  };
37
37
  };
38
38
  optionName: string;
39
- pattern?: undefined;
40
39
  })[];
41
40
  type?: undefined;
42
41
  items?: undefined;
@@ -51,9 +50,9 @@ export declare const Media: {
51
50
  };
52
51
  };
53
52
  } | {
53
+ optionName: string;
54
54
  type: string;
55
55
  pattern: string;
56
- optionName: string;
57
56
  items?: undefined;
58
57
  } | {
59
58
  type: string;
@@ -66,7 +65,6 @@ export declare const Media: {
66
65
  };
67
66
  };
68
67
  optionName: string;
69
- pattern?: undefined;
70
68
  })[];
71
69
  };
72
70
  optionName: string;
@@ -349,8 +347,17 @@ export declare const Media: {
349
347
  };
350
348
  };
351
349
  visible: {
352
- type: string;
353
- enum: string[];
350
+ oneOf: ({
351
+ type: string;
352
+ enum: string[];
353
+ additionalProperties?: undefined;
354
+ properties?: undefined;
355
+ } | {
356
+ type: string;
357
+ additionalProperties: boolean;
358
+ properties: {};
359
+ enum?: undefined;
360
+ })[];
354
361
  };
355
362
  resetPaddings: {
356
363
  type: string;
@@ -39,8 +39,17 @@ export declare const Meta: {
39
39
  };
40
40
  };
41
41
  visible: {
42
- type: string;
43
- enum: string[];
42
+ oneOf: ({
43
+ type: string;
44
+ enum: string[];
45
+ additionalProperties?: undefined;
46
+ properties?: undefined;
47
+ } | {
48
+ type: string;
49
+ additionalProperties: boolean;
50
+ properties: {};
51
+ enum?: undefined;
52
+ })[];
44
53
  };
45
54
  resetPaddings: {
46
55
  type: string;
@@ -4,9 +4,6 @@ export declare const SideCardList: {
4
4
  additionalProperties: boolean;
5
5
  required: string[];
6
6
  properties: {
7
- className: {
8
- type: string;
9
- };
10
7
  title: {
11
8
  type: string;
12
9
  };
@@ -17,7 +14,64 @@ export declare const SideCardList: {
17
14
  required: string[];
18
15
  properties: {
19
16
  image: {
20
- type: string;
17
+ oneOf: ({
18
+ optionName: string;
19
+ oneOf: ({
20
+ type: string;
21
+ properties: {
22
+ when: {
23
+ type: string;
24
+ };
25
+ };
26
+ } | {
27
+ optionName: string;
28
+ type: string;
29
+ pattern: string;
30
+ items?: undefined;
31
+ } | {
32
+ type: string;
33
+ items: {
34
+ type: string;
35
+ properties: {
36
+ when: {
37
+ type: string;
38
+ };
39
+ };
40
+ };
41
+ optionName: string;
42
+ })[];
43
+ type?: undefined;
44
+ items?: undefined;
45
+ } | {
46
+ type: string;
47
+ items: {
48
+ oneOf: ({
49
+ type: string;
50
+ properties: {
51
+ when: {
52
+ type: string;
53
+ };
54
+ };
55
+ } | {
56
+ optionName: string;
57
+ type: string;
58
+ pattern: string;
59
+ items?: undefined;
60
+ } | {
61
+ type: string;
62
+ items: {
63
+ type: string;
64
+ properties: {
65
+ when: {
66
+ type: string;
67
+ };
68
+ };
69
+ };
70
+ optionName: string;
71
+ })[];
72
+ };
73
+ optionName: string;
74
+ })[];
21
75
  };
22
76
  description: {
23
77
  type: string;
@@ -64,8 +118,17 @@ export declare const SideCardList: {
64
118
  };
65
119
  };
66
120
  visible: {
67
- type: string;
68
- enum: string[];
121
+ oneOf: ({
122
+ type: string;
123
+ enum: string[];
124
+ additionalProperties?: undefined;
125
+ properties?: undefined;
126
+ } | {
127
+ type: string;
128
+ additionalProperties: boolean;
129
+ properties: {};
130
+ enum?: undefined;
131
+ })[];
69
132
  };
70
133
  resetPaddings: {
71
134
  type: string;
@@ -4,33 +4,30 @@ exports.SideCardList = void 0;
4
4
  const page_constructor_1 = require("@gravity-ui/page-constructor");
5
5
  const common_1 = require("../../models/common.js");
6
6
  const common_2 = require("../../schema/common.js");
7
- const { common: { BlockBaseProps }, } = page_constructor_1.validators;
7
+ const { common: { BlockBaseProps, MediaProps }, } = page_constructor_1.validators;
8
+ const SideCard = {
9
+ type: 'object',
10
+ required: ['image', 'description', 'url'],
11
+ properties: {
12
+ image: MediaProps.image,
13
+ description: {
14
+ type: 'string',
15
+ },
16
+ url: {
17
+ type: 'string',
18
+ },
19
+ },
20
+ };
8
21
  exports.SideCardList = {
9
22
  [common_1.BlockType.SideCardList]: {
10
23
  type: 'object',
11
24
  additionalProperties: false,
12
25
  required: ['items'],
13
- properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { className: {
14
- type: 'string',
15
- }, title: {
26
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { title: {
16
27
  type: 'string',
17
28
  }, items: {
18
29
  type: 'array',
19
- items: {
20
- type: 'object',
21
- required: ['image', 'description', 'url'],
22
- properties: {
23
- image: {
24
- type: 'string',
25
- },
26
- description: {
27
- type: 'string',
28
- },
29
- url: {
30
- type: 'string',
31
- },
32
- },
33
- },
30
+ items: SideCard,
34
31
  } }),
35
32
  },
36
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/SideCardList/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEF,QAAA,YAAY,GAAG;IACxB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,gDACH,cAAc,GACd,sBAAa,KAChB,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC;oBACzC,UAAU,EAAE;wBACR,KAAK,EAAE;4BACH,IAAI,EAAE,QAAQ;yBACjB;wBACD,WAAW,EAAE;4BACT,IAAI,EAAE,QAAQ;yBACjB;wBACD,GAAG,EAAE;4BACD,IAAI,EAAE,QAAQ;yBACjB;qBACJ;iBACJ;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 SideCardList = {\n [BlockType.SideCardList]: {\n type: 'object',\n additionalProperties: false,\n required: ['items'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n className: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n items: {\n type: 'array',\n items: {\n type: 'object',\n required: ['image', 'description', 'url'],\n properties: {\n image: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/SideCardList/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAE,UAAU,EAAC,GACvC,GAAG,6BAAU,CAAC;AAEf,MAAM,QAAQ,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC;IACzC,UAAU,EAAE;QACR,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,GAAG,EAAE;YACD,IAAI,EAAE,QAAQ;SACjB;KACJ;CACJ,CAAC;AAEW,QAAA,YAAY,GAAG;IACxB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,gDACH,cAAc,GACd,sBAAa,KAChB,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,QAAQ;aAClB,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, MediaProps},\n} = validators;\n\nconst SideCard = {\n type: 'object',\n required: ['image', 'description', 'url'],\n properties: {\n image: MediaProps.image,\n description: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n },\n};\n\nexport const SideCardList = {\n [BlockType.SideCardList]: {\n type: 'object',\n additionalProperties: false,\n required: ['items'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n title: {\n type: 'string',\n },\n items: {\n type: 'array',\n items: SideCard,\n },\n },\n },\n};\n"]}
@@ -39,8 +39,17 @@ export declare const Suggest: {
39
39
  };
40
40
  };
41
41
  visible: {
42
- type: string;
43
- enum: string[];
42
+ oneOf: ({
43
+ type: string;
44
+ enum: string[];
45
+ additionalProperties?: undefined;
46
+ properties?: undefined;
47
+ } | {
48
+ type: string;
49
+ additionalProperties: boolean;
50
+ properties: {};
51
+ enum?: undefined;
52
+ })[];
44
53
  };
45
54
  resetPaddings: {
46
55
  type: string;
@@ -4,6 +4,14 @@ export declare const Take: {
4
4
  additionalProperties: boolean;
5
5
  required: string[];
6
6
  properties: {
7
+ paddingRight: {
8
+ type: string;
9
+ enum: string[];
10
+ };
11
+ paddingLeft: {
12
+ type: string;
13
+ enum: string[];
14
+ };
7
15
  text: {
8
16
  type: string;
9
17
  contentType: string;
@@ -30,6 +38,12 @@ export declare const Take: {
30
38
  };
31
39
  };
32
40
  };
41
+ color: {
42
+ type: string;
43
+ };
44
+ noBackground: {
45
+ type: string;
46
+ };
33
47
  paddingTop: {
34
48
  type: string;
35
49
  enum: string[];
@@ -66,8 +80,17 @@ export declare const Take: {
66
80
  };
67
81
  };
68
82
  visible: {
69
- type: string;
70
- enum: string[];
83
+ oneOf: ({
84
+ type: string;
85
+ enum: string[];
86
+ additionalProperties?: undefined;
87
+ properties?: undefined;
88
+ } | {
89
+ type: string;
90
+ additionalProperties: boolean;
91
+ properties: {};
92
+ enum?: undefined;
93
+ })[];
71
94
  };
72
95
  resetPaddings: {
73
96
  type: string;
@@ -10,7 +10,7 @@ exports.Take = {
10
10
  type: 'object',
11
11
  additionalProperties: false,
12
12
  required: ['text', 'author'],
13
- properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { text: { type: 'string', contentType: 'text' }, author: {
13
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { paddingRight: common_2.PaddingSize, paddingLeft: common_2.PaddingSize, text: { type: 'string', contentType: 'text' }, author: {
14
14
  type: 'object',
15
15
  additionalProperties: false,
16
16
  required: ['firstName', 'secondName'],
@@ -20,7 +20,7 @@ exports.Take = {
20
20
  description: { type: 'string', contentType: 'yfm' },
21
21
  avatar: { type: 'string' },
22
22
  },
23
- } }),
23
+ }, color: { type: 'string' }, noBackground: { type: 'boolean' } }),
24
24
  },
25
25
  };
26
26
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Take/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEF,QAAA,IAAI,GAAG;IAChB,CAAC,kBAAS,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,sBAAa,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"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Take/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAA+D;AAE/D,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEF,QAAA,IAAI,GAAG;IAChB,CAAC,kBAAS,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,sBAAa,KAChB,YAAY,EAAE,oBAAW,EACzB,WAAW,EAAE,oBAAW,EACxB,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,EACD,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EACvB,YAAY,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC,GAClC;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase, PaddingSize} 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 paddingRight: PaddingSize,\n paddingLeft: PaddingSize,\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 color: {type: 'string'},\n noBackground: {type: 'boolean'},\n },\n },\n};\n"]}
@@ -44,8 +44,17 @@ export declare const YFM: {
44
44
  };
45
45
  };
46
46
  visible: {
47
- type: string;
48
- enum: string[];
47
+ oneOf: ({
48
+ type: string;
49
+ enum: string[];
50
+ additionalProperties?: undefined;
51
+ properties?: undefined;
52
+ } | {
53
+ type: string;
54
+ additionalProperties: boolean;
55
+ properties: {};
56
+ enum?: undefined;
57
+ })[];
49
58
  };
50
59
  resetPaddings: {
51
60
  type: string;
@@ -1,19 +1,19 @@
1
1
  declare const _default: {
2
2
  blocks: {
3
- "blog-yfm-block": (props: import("../models/blocks.js").YFMProps) => import("react/jsx-runtime").JSX.Element;
4
- "blog-layout-block": ({ fullWidth, mobileOrder, children, paddingTop, paddingBottom, }: React.PropsWithChildren<import("../models/blocks.js").LayoutProps>) => import("react/jsx-runtime").JSX.Element;
5
- "blog-media-block": ({ text, paddingTop, paddingBottom, ...mediaProps }: import("../models/blocks.js").MediaProps) => import("react/jsx-runtime").JSX.Element;
3
+ "blog-author-block": (props: import("../models/blocks.js").AuthorProps) => import("react/jsx-runtime").JSX.Element | null;
6
4
  "blog-banner-block": ({ color, imageSize, image, paddingTop, paddingBottom, qa, ...content }: import("../models/blocks.js").BannerProps) => import("react/jsx-runtime").JSX.Element;
7
- "blog-cta-block": ({ items, paddingTop, paddingBottom, qa }: import("../models/blocks.js").CTAProps) => import("react/jsx-runtime").JSX.Element;
8
5
  "blog-colored-text-block": ({ background, paddingTop, paddingBottom, qa, ...content }: import("../models/blocks.js").ColoredTextProps) => import("react/jsx-runtime").JSX.Element;
9
- "blog-author-block": (props: import("../models/blocks.js").AuthorProps) => import("react/jsx-runtime").JSX.Element | null;
10
- "blog-suggest-block": ({ paddingTop, paddingBottom }: import("../models/blocks.js").SuggestProps) => import("react/jsx-runtime").JSX.Element | null;
11
- "blog-meta-block": (props: import("../models/blocks.js").MetaProps) => import("react/jsx-runtime").JSX.Element;
6
+ "blog-compact-media-block": ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }: import("../models/blocks.js").CompactMediaProps) => import("react/jsx-runtime").JSX.Element;
7
+ "blog-cta-block": ({ items, paddingTop, paddingBottom, qa }: import("../models/blocks.js").CTAProps) => import("react/jsx-runtime").JSX.Element;
12
8
  "blog-feed-block": ({ image, title, resetTitleMargin }: import("../models/blocks.js").FeedProps) => import("react/jsx-runtime").JSX.Element;
13
9
  "blog-form-block": ({ paddingTop, paddingBottom, ...props }: import("../models/blocks.js").FormProps) => import("react/jsx-runtime").JSX.Element | null;
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;
10
+ "blog-layout-block": ({ fullWidth, mobileOrder, children, paddingTop, paddingBottom, }: React.PropsWithChildren<import("../models/blocks.js").LayoutProps>) => import("react/jsx-runtime").JSX.Element;
11
+ "blog-media-block": ({ text, paddingTop, paddingBottom, ...mediaProps }: import("../models/blocks.js").MediaProps) => import("react/jsx-runtime").JSX.Element;
12
+ "blog-meta-block": (props: import("../models/blocks.js").MetaProps) => import("react/jsx-runtime").JSX.Element;
16
13
  "blog-side-card-list-block": ({ title, items, paddingTop, paddingBottom }: import("../models/blocks.js").SideCardListProps) => import("react/jsx-runtime").JSX.Element;
14
+ "blog-suggest-block": ({ paddingTop, paddingBottom }: import("../models/blocks.js").SuggestProps) => import("react/jsx-runtime").JSX.Element | null;
15
+ "blog-take-block": (props: import("../models/blocks.js").TakeProps) => import("react/jsx-runtime").JSX.Element;
16
+ "blog-yfm-block": (props: import("../models/blocks.js").YFMProps) => import("react/jsx-runtime").JSX.Element;
17
17
  };
18
18
  headers: {
19
19
  "blog-header-block": (props: import("../models/blocks.js").HeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -17,20 +17,20 @@ const Take_1 = require("../blocks/Take/Take.js");
17
17
  const YFM_1 = require("../blocks/YFM/YFM.js");
18
18
  const common_1 = require("../models/common.js");
19
19
  const blocks = {
20
- [common_1.BlockType.YFM]: YFM_1.YFM,
21
- [common_1.BlockType.Layout]: Layout_1.Layout,
22
- [common_1.BlockType.Media]: Media_1.Media,
20
+ [common_1.BlockType.Author]: Author_1.Author,
23
21
  [common_1.BlockType.Banner]: Banner_1.Banner,
24
- [common_1.BlockType.CTA]: CTA_1.CTA,
25
22
  [common_1.BlockType.ColoredText]: ColoredText_1.ColoredText,
26
- [common_1.BlockType.Author]: Author_1.Author,
27
- [common_1.BlockType.Suggest]: Suggest_1.Suggest,
28
- [common_1.BlockType.Meta]: Meta_1.Meta,
23
+ [common_1.BlockType.CompactMedia]: CompactMedia_1.CompactMedia,
24
+ [common_1.BlockType.CTA]: CTA_1.CTA,
29
25
  [common_1.BlockType.Feed]: Feed_1.Feed,
30
26
  [common_1.BlockType.Form]: Form_1.Form,
31
- [common_1.BlockType.CompactMedia]: CompactMedia_1.CompactMedia,
32
- [common_1.BlockType.Take]: Take_1.Take,
27
+ [common_1.BlockType.Layout]: Layout_1.Layout,
28
+ [common_1.BlockType.Media]: Media_1.Media,
29
+ [common_1.BlockType.Meta]: Meta_1.Meta,
33
30
  [common_1.BlockType.SideCardList]: SideCardList_1.SideCardList,
31
+ [common_1.BlockType.Suggest]: Suggest_1.Suggest,
32
+ [common_1.BlockType.Take]: Take_1.Take,
33
+ [common_1.BlockType.YFM]: YFM_1.YFM,
34
34
  };
35
35
  const headers = {
36
36
  [common_1.BlockType.Header]: Header_1.Header,
@@ -1 +1 @@
1
- {"version":3,"file":"blocksMap.js","sourceRoot":"../../../src","sources":["constructor/blocksMap.ts"],"names":[],"mappings":";;AAAA,uDAA+C;AAC/C,uDAA+C;AAC/C,8CAAsC;AACtC,sEAA8D;AAC9D,yEAAiE;AACjE,iDAAyC;AACzC,iDAAyC;AACzC,uDAA+C;AAC/C,uDAA+C;AAC/C,oDAA4C;AAC5C,iDAAyC;AACzC,yEAAiE;AACjE,0DAAkD;AAClD,iDAAyC;AACzC,8CAAsC;AACtC,gDAA2C;AAE3C,MAAM,MAAM,GAAG;IACX,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,SAAG;IACpB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,KAAK,CAAC,EAAE,aAAK;IACxB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,SAAG;IACpB,CAAC,kBAAS,CAAC,WAAW,CAAC,EAAE,yBAAW;IACpC,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,OAAO,CAAC,EAAE,iBAAO;IAC5B,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE,2BAAY;IACtC,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE,2BAAY;CACzC,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;CAC7B,CAAC;AAEF,kBAAe,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"]}
1
+ {"version":3,"file":"blocksMap.js","sourceRoot":"../../../src","sources":["constructor/blocksMap.ts"],"names":[],"mappings":";;AAAA,uDAA+C;AAC/C,uDAA+C;AAC/C,8CAAsC;AACtC,sEAA8D;AAC9D,yEAAiE;AACjE,iDAAyC;AACzC,iDAAyC;AACzC,uDAA+C;AAC/C,uDAA+C;AAC/C,oDAA4C;AAC5C,iDAAyC;AACzC,yEAAiE;AACjE,0DAAkD;AAClD,iDAAyC;AACzC,8CAAsC;AACtC,gDAA2C;AAE3C,MAAM,MAAM,GAAG;IACX,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,WAAW,CAAC,EAAE,yBAAW;IACpC,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE,2BAAY;IACtC,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,SAAG;IACpB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;IAC1B,CAAC,kBAAS,CAAC,KAAK,CAAC,EAAE,aAAK;IACxB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE,2BAAY;IACtC,CAAC,kBAAS,CAAC,OAAO,CAAC,EAAE,iBAAO;IAC5B,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,WAAI;IACtB,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,SAAG;CACvB,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,eAAM;CAC7B,CAAC;AAEF,kBAAe,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.Author]: Author,\n [BlockType.Banner]: Banner,\n [BlockType.ColoredText]: ColoredText,\n [BlockType.CompactMedia]: CompactMedia,\n [BlockType.CTA]: CTA,\n [BlockType.Feed]: Feed,\n [BlockType.Form]: Form,\n [BlockType.Layout]: Layout,\n [BlockType.Media]: Media,\n [BlockType.Meta]: Meta,\n [BlockType.SideCardList]: SideCardList,\n [BlockType.Suggest]: Suggest,\n [BlockType.Take]: Take,\n [BlockType.YFM]: YFM,\n};\n\nconst headers = {\n [BlockType.Header]: Header,\n};\n\nexport default {blocks, headers};\n"]}
@@ -70,7 +70,15 @@ unpredictable css rules order in build */
70
70
  .yfm_constructor.yfm_constructor_size_s p {
71
71
  margin-bottom: 8px;
72
72
  }
73
- .yfm_constructor.yfm_constructor_theme_dark p {
73
+ .yfm_constructor.yfm_constructor_theme_dark h1,
74
+ .yfm_constructor.yfm_constructor_theme_dark h2,
75
+ .yfm_constructor.yfm_constructor_theme_dark h3,
76
+ .yfm_constructor.yfm_constructor_theme_dark h4,
77
+ .yfm_constructor.yfm_constructor_theme_dark h5,
78
+ .yfm_constructor.yfm_constructor_theme_dark h6,
79
+ .yfm_constructor.yfm_constructor_theme_dark span,
80
+ .yfm_constructor.yfm_constructor_theme_dark p,
81
+ .yfm_constructor.yfm_constructor_theme_dark li {
74
82
  color: var(--g-color-text-light-primary);
75
83
  }
76
84
 
@@ -2,20 +2,20 @@ import * as React from 'react';
2
2
  import { CustomConfig } from '@gravity-ui/page-constructor';
3
3
  export declare const useExtendedComponentMap: (custom: CustomConfig | undefined) => {
4
4
  blocks: {
5
- "blog-yfm-block": (props: import("../models/blocks.js").YFMProps) => import("react/jsx-runtime").JSX.Element;
6
- "blog-layout-block": ({ fullWidth, mobileOrder, children, paddingTop, paddingBottom, }: React.PropsWithChildren<import("../models/blocks.js").LayoutProps>) => import("react/jsx-runtime").JSX.Element;
7
- "blog-media-block": ({ text, paddingTop, paddingBottom, ...mediaProps }: import("../models/blocks.js").MediaProps) => import("react/jsx-runtime").JSX.Element;
5
+ "blog-author-block": (props: import("../models/blocks.js").AuthorProps) => import("react/jsx-runtime").JSX.Element | null;
8
6
  "blog-banner-block": ({ color, imageSize, image, paddingTop, paddingBottom, qa, ...content }: import("../models/blocks.js").BannerProps) => import("react/jsx-runtime").JSX.Element;
9
- "blog-cta-block": ({ items, paddingTop, paddingBottom, qa }: import("../models/blocks.js").CTAProps) => import("react/jsx-runtime").JSX.Element;
10
7
  "blog-colored-text-block": ({ background, paddingTop, paddingBottom, qa, ...content }: import("../models/blocks.js").ColoredTextProps) => import("react/jsx-runtime").JSX.Element;
11
- "blog-author-block": (props: import("../models/blocks.js").AuthorProps) => import("react/jsx-runtime").JSX.Element | null;
12
- "blog-suggest-block": ({ paddingTop, paddingBottom }: import("../models/blocks.js").SuggestProps) => import("react/jsx-runtime").JSX.Element | null;
13
- "blog-meta-block": (props: import("../models/blocks.js").MetaProps) => import("react/jsx-runtime").JSX.Element;
8
+ "blog-compact-media-block": ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }: import("../models/blocks.js").CompactMediaProps) => import("react/jsx-runtime").JSX.Element;
9
+ "blog-cta-block": ({ items, paddingTop, paddingBottom, qa }: import("../models/blocks.js").CTAProps) => import("react/jsx-runtime").JSX.Element;
14
10
  "blog-feed-block": ({ image, title, resetTitleMargin }: import("../models/blocks.js").FeedProps) => import("react/jsx-runtime").JSX.Element;
15
11
  "blog-form-block": ({ paddingTop, paddingBottom, ...props }: import("../models/blocks.js").FormProps) => import("react/jsx-runtime").JSX.Element | null;
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;
12
+ "blog-layout-block": ({ fullWidth, mobileOrder, children, paddingTop, paddingBottom, }: React.PropsWithChildren<import("../models/blocks.js").LayoutProps>) => import("react/jsx-runtime").JSX.Element;
13
+ "blog-media-block": ({ text, paddingTop, paddingBottom, ...mediaProps }: import("../models/blocks.js").MediaProps) => import("react/jsx-runtime").JSX.Element;
14
+ "blog-meta-block": (props: import("../models/blocks.js").MetaProps) => import("react/jsx-runtime").JSX.Element;
18
15
  "blog-side-card-list-block": ({ title, items, paddingTop, paddingBottom }: import("../models/blocks.js").SideCardListProps) => import("react/jsx-runtime").JSX.Element;
16
+ "blog-suggest-block": ({ paddingTop, paddingBottom }: import("../models/blocks.js").SuggestProps) => import("react/jsx-runtime").JSX.Element | null;
17
+ "blog-take-block": (props: import("../models/blocks.js").TakeProps) => import("react/jsx-runtime").JSX.Element;
18
+ "blog-yfm-block": (props: import("../models/blocks.js").YFMProps) => import("react/jsx-runtime").JSX.Element;
19
19
  };
20
20
  headers: {
21
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 { AuthorItem, ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
2
+ import { AuthorItem, ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme, ThemeSupporting } 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 & {
@@ -13,8 +13,8 @@ export type BannerProps = ContentBlockProps & QAProps & {
13
13
  } & PaddingsYFMProps;
14
14
  export type ColoredTextProps = ContentBlockProps & QAProps & {
15
15
  background?: {
16
- color?: string;
17
- image?: string;
16
+ color?: ThemeSupporting<string>;
17
+ image?: ThemeSupporting<string>;
18
18
  altText?: string;
19
19
  };
20
20
  } & PaddingsYFMProps;
@@ -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 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 title?: string;\n resetTitleMargin?: boolean;\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"]}
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 ThemeSupporting,\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?: ThemeSupporting<string>;\n image?: ThemeSupporting<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 title?: string;\n resetTitleMargin?: boolean;\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"]}
@@ -1,12 +1,14 @@
1
1
  export * from "../blocks/Author/schema.js";
2
2
  export * from "../blocks/Banner/schema.js";
3
3
  export * from "../blocks/ColoredText/schema.js";
4
+ export * from "../blocks/CompactMedia/schema.js";
4
5
  export * from "../blocks/CTA/schema.js";
5
6
  export * from "../blocks/Feed/schema.js";
7
+ export * from "../blocks/Form/schema.js";
6
8
  export * from "../blocks/Layout/schema.js";
7
9
  export * from "../blocks/Media/schema.js";
8
10
  export * from "../blocks/Meta/schema.js";
11
+ export * from "../blocks/SideCardList/schema.js";
9
12
  export * from "../blocks/Suggest/schema.js";
10
- export * from "../blocks/YFM/schema.js";
11
- export * from "../blocks/CompactMedia/schema.js";
12
13
  export * from "../blocks/Take/schema.js";
14
+ export * from "../blocks/YFM/schema.js";
@@ -4,13 +4,15 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("../blocks/Author/schema.js"), exports);
5
5
  tslib_1.__exportStar(require("../blocks/Banner/schema.js"), exports);
6
6
  tslib_1.__exportStar(require("../blocks/ColoredText/schema.js"), exports);
7
+ tslib_1.__exportStar(require("../blocks/CompactMedia/schema.js"), exports);
7
8
  tslib_1.__exportStar(require("../blocks/CTA/schema.js"), exports);
8
9
  tslib_1.__exportStar(require("../blocks/Feed/schema.js"), exports);
10
+ tslib_1.__exportStar(require("../blocks/Form/schema.js"), exports);
9
11
  tslib_1.__exportStar(require("../blocks/Layout/schema.js"), exports);
10
12
  tslib_1.__exportStar(require("../blocks/Media/schema.js"), exports);
11
13
  tslib_1.__exportStar(require("../blocks/Meta/schema.js"), exports);
14
+ tslib_1.__exportStar(require("../blocks/SideCardList/schema.js"), exports);
12
15
  tslib_1.__exportStar(require("../blocks/Suggest/schema.js"), exports);
13
- tslib_1.__exportStar(require("../blocks/YFM/schema.js"), exports);
14
- tslib_1.__exportStar(require("../blocks/CompactMedia/schema.js"), exports);
15
16
  tslib_1.__exportStar(require("../blocks/Take/schema.js"), exports);
17
+ tslib_1.__exportStar(require("../blocks/YFM/schema.js"), exports);
16
18
  //# sourceMappingURL=blocks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["schema/blocks.ts"],"names":[],"mappings":";;;AAAA,qEAAwC;AACxC,qEAAwC;AACxC,0EAA6C;AAC7C,kEAAqC;AACrC,mEAAsC;AACtC,qEAAwC;AACxC,oEAAuC;AACvC,mEAAsC;AACtC,sEAAyC;AACzC,kEAAqC;AACrC,2EAA8C;AAC9C,mEAAsC","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"]}
1
+ {"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["schema/blocks.ts"],"names":[],"mappings":";;;AAAA,qEAAwC;AACxC,qEAAwC;AACxC,0EAA6C;AAC7C,2EAA8C;AAC9C,kEAAqC;AACrC,mEAAsC;AACtC,mEAAsC;AACtC,qEAAwC;AACxC,oEAAuC;AACvC,mEAAsC;AACtC,2EAA8C;AAC9C,sEAAyC;AACzC,mEAAsC;AACtC,kEAAqC","sourcesContent":["export * from '../blocks/Author/schema';\nexport * from '../blocks/Banner/schema';\nexport * from '../blocks/ColoredText/schema';\nexport * from '../blocks/CompactMedia/schema';\nexport * from '../blocks/CTA/schema';\nexport * from '../blocks/Feed/schema';\nexport * from '../blocks/Form/schema';\nexport * from '../blocks/Layout/schema';\nexport * from '../blocks/Media/schema';\nexport * from '../blocks/Meta/schema';\nexport * from '../blocks/SideCardList/schema';\nexport * from '../blocks/Suggest/schema';\nexport * from '../blocks/Take/schema';\nexport * from '../blocks/YFM/schema';\n"]}
@@ -9,6 +9,10 @@ export declare const filteredItem: (itemsSchema: ObjectSchema) => {
9
9
  };
10
10
  };
11
11
  };
12
+ export declare const PaddingSize: {
13
+ type: string;
14
+ enum: string[];
15
+ };
12
16
  export declare const BlogBlockBase: {
13
17
  paddingTop: {
14
18
  type: string;
@@ -1,20 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BlogBlockBase = exports.filteredItem = void 0;
4
- const sizeTypes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
3
+ exports.BlogBlockBase = exports.PaddingSize = exports.filteredItem = void 0;
4
+ const sizeTypes = ['xs', 's', 'sm', 'm', 'l', 'xl'];
5
5
  const filteredItem = (itemsSchema) => (Object.assign(Object.assign({}, itemsSchema), { type: 'object', properties: Object.assign({ when: {
6
6
  type: 'string',
7
7
  } }, itemsSchema.properties) }));
8
8
  exports.filteredItem = filteredItem;
9
+ exports.PaddingSize = {
10
+ type: 'string',
11
+ enum: sizeTypes,
12
+ };
9
13
  exports.BlogBlockBase = {
10
- paddingTop: {
11
- type: 'string',
12
- enum: sizeTypes,
13
- },
14
- paddingBottom: {
15
- type: 'string',
16
- enum: sizeTypes,
17
- },
14
+ paddingTop: exports.PaddingSize,
15
+ paddingBottom: exports.PaddingSize,
18
16
  fullWidth: {
19
17
  type: 'boolean',
20
18
  },