@gravity-ui/blog-constructor 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/cjs/blocks/Author/schema.d.ts +53 -0
  3. package/build/cjs/blocks/Author/schema.js +17 -0
  4. package/build/cjs/blocks/Banner/schema.d.ts +124 -0
  5. package/build/cjs/blocks/Banner/schema.js +22 -0
  6. package/build/cjs/blocks/CTA/schema.d.ts +124 -0
  7. package/build/cjs/blocks/CTA/schema.js +23 -0
  8. package/build/cjs/blocks/ColoredText/schema.d.ts +140 -0
  9. package/build/cjs/blocks/ColoredText/schema.js +29 -0
  10. package/build/cjs/blocks/Feed/schema.d.ts +66 -0
  11. package/build/cjs/blocks/Feed/schema.js +21 -0
  12. package/build/cjs/blocks/Header/schema.d.ts +376 -0
  13. package/build/cjs/blocks/Header/schema.js +14 -0
  14. package/build/cjs/blocks/Layout/schema.d.ts +60 -0
  15. package/build/cjs/blocks/Layout/schema.js +18 -0
  16. package/build/cjs/blocks/Media/schema.d.ts +181 -0
  17. package/build/cjs/blocks/Media/schema.js +17 -0
  18. package/build/cjs/blocks/Meta/schema.d.ts +49 -0
  19. package/build/cjs/blocks/Meta/schema.js +14 -0
  20. package/build/cjs/blocks/Suggest/schema.d.ts +49 -0
  21. package/build/cjs/blocks/Suggest/schema.js +14 -0
  22. package/build/cjs/blocks/YFM/schema.d.ts +54 -0
  23. package/build/cjs/blocks/YFM/schema.js +18 -0
  24. package/build/cjs/index.d.ts +1 -0
  25. package/build/cjs/index.js +1 -0
  26. package/build/cjs/schema/blocks.d.ts +10 -0
  27. package/build/cjs/schema/blocks.js +26 -0
  28. package/build/cjs/schema/common.d.ts +28 -0
  29. package/build/cjs/schema/common.js +25 -0
  30. package/build/cjs/schema/headers.d.ts +1 -0
  31. package/build/cjs/schema/headers.js +17 -0
  32. package/build/cjs/schema/index.d.ts +1288 -0
  33. package/build/cjs/schema/index.js +52 -0
  34. package/build/cjs/schema/utils.d.ts +9 -0
  35. package/build/cjs/schema/utils.js +9 -0
  36. package/build/esm/blocks/Author/schema.d.ts +53 -0
  37. package/build/esm/blocks/Author/schema.js +14 -0
  38. package/build/esm/blocks/Banner/schema.d.ts +124 -0
  39. package/build/esm/blocks/Banner/schema.js +19 -0
  40. package/build/esm/blocks/CTA/schema.d.ts +124 -0
  41. package/build/esm/blocks/CTA/schema.js +20 -0
  42. package/build/esm/blocks/ColoredText/schema.d.ts +140 -0
  43. package/build/esm/blocks/ColoredText/schema.js +26 -0
  44. package/build/esm/blocks/Feed/schema.d.ts +66 -0
  45. package/build/esm/blocks/Feed/schema.js +18 -0
  46. package/build/esm/blocks/Header/schema.d.ts +376 -0
  47. package/build/esm/blocks/Header/schema.js +11 -0
  48. package/build/esm/blocks/Layout/schema.d.ts +60 -0
  49. package/build/esm/blocks/Layout/schema.js +15 -0
  50. package/build/esm/blocks/Media/schema.d.ts +181 -0
  51. package/build/esm/blocks/Media/schema.js +14 -0
  52. package/build/esm/blocks/Meta/schema.d.ts +49 -0
  53. package/build/esm/blocks/Meta/schema.js +11 -0
  54. package/build/esm/blocks/Suggest/schema.d.ts +49 -0
  55. package/build/esm/blocks/Suggest/schema.js +11 -0
  56. package/build/esm/blocks/YFM/schema.d.ts +54 -0
  57. package/build/esm/blocks/YFM/schema.js +15 -0
  58. package/build/esm/index.d.ts +1 -0
  59. package/build/esm/index.js +1 -0
  60. package/build/esm/schema/blocks.d.ts +10 -0
  61. package/build/esm/schema/blocks.js +10 -0
  62. package/build/esm/schema/common.d.ts +28 -0
  63. package/build/esm/schema/common.js +21 -0
  64. package/build/esm/schema/headers.d.ts +1 -0
  65. package/build/esm/schema/headers.js +1 -0
  66. package/build/esm/schema/index.d.ts +1288 -0
  67. package/build/esm/schema/index.js +26 -0
  68. package/build/esm/schema/utils.d.ts +9 -0
  69. package/build/esm/schema/utils.js +5 -0
  70. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.2.0](https://github.com/gravity-ui/blog-constructor/compare/v3.1.1...v3.2.0) (2023-05-15)
4
+
5
+
6
+ ### Features
7
+
8
+ * create schemas ([#41](https://github.com/gravity-ui/blog-constructor/issues/41)) ([f4f28f3](https://github.com/gravity-ui/blog-constructor/commit/f4f28f367db6d18588602d734623863ccfea1a01))
9
+
3
10
  ## [3.1.1](https://github.com/gravity-ui/blog-constructor/compare/v3.1.0...v3.1.1) (2023-05-11)
4
11
 
5
12
 
@@ -0,0 +1,53 @@
1
+ export declare const Author: {
2
+ "blog-author-block": {
3
+ type: string;
4
+ additionalProperties: boolean;
5
+ required: string[];
6
+ properties: {
7
+ authorId: {
8
+ type: string;
9
+ };
10
+ paddingTop: {
11
+ type: string;
12
+ enum: string[];
13
+ };
14
+ paddingBottom: {
15
+ type: string;
16
+ enum: string[];
17
+ };
18
+ fullWidth: {
19
+ type: string;
20
+ };
21
+ column: {
22
+ type: string;
23
+ enum: string[];
24
+ };
25
+ anchor: {
26
+ type: string;
27
+ additionalProperties: boolean;
28
+ required: string[];
29
+ properties: {
30
+ text: {
31
+ type: string;
32
+ contentType: string;
33
+ };
34
+ url: {
35
+ type: string;
36
+ };
37
+ };
38
+ };
39
+ visible: {
40
+ type: string;
41
+ enum: string[];
42
+ };
43
+ resetPaddings: {
44
+ type: string;
45
+ };
46
+ context: {
47
+ type: string;
48
+ };
49
+ type: {};
50
+ when: {};
51
+ };
52
+ };
53
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Author = void 0;
4
+ const page_constructor_1 = require("@gravity-ui/page-constructor");
5
+ const { common: { BlockBaseProps }, } = page_constructor_1.validators;
6
+ const common_1 = require("../../models/common");
7
+ const common_2 = require("../../schema/common");
8
+ exports.Author = {
9
+ [common_1.BlockType.Author]: {
10
+ type: 'object',
11
+ additionalProperties: false,
12
+ required: ['authorId'],
13
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { authorId: {
14
+ type: 'number',
15
+ } }),
16
+ },
17
+ };
@@ -0,0 +1,124 @@
1
+ export declare const Banner: {
2
+ "blog-banner-block": {
3
+ type: string;
4
+ additionalProperties: boolean;
5
+ required: string[];
6
+ properties: {
7
+ color: {
8
+ type: string;
9
+ };
10
+ image: {
11
+ type: string;
12
+ };
13
+ imageSize: {
14
+ type: string;
15
+ enum: string[];
16
+ };
17
+ title: {
18
+ oneOf: ({
19
+ type: string;
20
+ additionalProperties: boolean;
21
+ required: string[];
22
+ properties: {
23
+ text: {
24
+ type: string;
25
+ contentType: string;
26
+ };
27
+ textSize: {
28
+ type: string;
29
+ enum: string[];
30
+ };
31
+ url: {
32
+ type: string;
33
+ };
34
+ resetMargin: {
35
+ type: string;
36
+ };
37
+ };
38
+ } | {
39
+ type: string;
40
+ contentType: string;
41
+ })[];
42
+ };
43
+ text: {
44
+ type: string;
45
+ contentType: string;
46
+ };
47
+ additionalInfo: {
48
+ type: string;
49
+ contentType: string;
50
+ };
51
+ size: {
52
+ type: string;
53
+ enum: string[];
54
+ };
55
+ links: {
56
+ type: string;
57
+ items: {
58
+ type: string;
59
+ properties: {
60
+ when: {
61
+ type: string;
62
+ };
63
+ };
64
+ };
65
+ };
66
+ buttons: {
67
+ type: string;
68
+ items: {
69
+ type: string;
70
+ properties: {
71
+ when: {
72
+ type: string;
73
+ };
74
+ };
75
+ };
76
+ };
77
+ theme: {
78
+ type: string;
79
+ enum: string[];
80
+ };
81
+ paddingTop: {
82
+ type: string;
83
+ enum: string[];
84
+ };
85
+ paddingBottom: {
86
+ type: string;
87
+ enum: string[];
88
+ };
89
+ fullWidth: {
90
+ type: string;
91
+ };
92
+ column: {
93
+ type: string;
94
+ enum: string[];
95
+ };
96
+ anchor: {
97
+ type: string;
98
+ additionalProperties: boolean;
99
+ required: string[];
100
+ properties: {
101
+ text: {
102
+ type: string;
103
+ contentType: string;
104
+ };
105
+ url: {
106
+ type: string;
107
+ };
108
+ };
109
+ };
110
+ visible: {
111
+ type: string;
112
+ enum: string[];
113
+ };
114
+ resetPaddings: {
115
+ type: string;
116
+ };
117
+ context: {
118
+ type: string;
119
+ };
120
+ type: {};
121
+ when: {};
122
+ };
123
+ };
124
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Banner = void 0;
4
+ const page_constructor_1 = require("@gravity-ui/page-constructor");
5
+ const common_1 = require("../../models/common");
6
+ const common_2 = require("../../schema/common");
7
+ const { subBlocks: { ContentBase }, common: { BlockBaseProps }, } = page_constructor_1.validators;
8
+ exports.Banner = {
9
+ [common_1.BlockType.Banner]: {
10
+ type: 'object',
11
+ additionalProperties: false,
12
+ required: ['title', 'text', 'image'],
13
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), ContentBase), { color: {
14
+ type: 'string',
15
+ }, image: {
16
+ type: 'string',
17
+ }, imageSize: {
18
+ type: 'string',
19
+ enum: ['s', 'm'],
20
+ } }),
21
+ },
22
+ };
@@ -0,0 +1,124 @@
1
+ export declare const CTA: {
2
+ "blog-cta-block": {
3
+ type: string;
4
+ additionalProperties: boolean;
5
+ required: string[];
6
+ properties: {
7
+ items: {
8
+ type: string;
9
+ items: {
10
+ type: string;
11
+ additionalProperties: boolean;
12
+ required: string[];
13
+ properties: {
14
+ title: {
15
+ oneOf: ({
16
+ type: string;
17
+ additionalProperties: boolean;
18
+ required: string[];
19
+ properties: {
20
+ text: {
21
+ type: string;
22
+ contentType: string;
23
+ };
24
+ textSize: {
25
+ type: string;
26
+ enum: string[];
27
+ };
28
+ url: {
29
+ type: string;
30
+ };
31
+ resetMargin: {
32
+ type: string;
33
+ };
34
+ };
35
+ } | {
36
+ type: string;
37
+ contentType: string;
38
+ })[];
39
+ };
40
+ text: {
41
+ type: string;
42
+ contentType: string;
43
+ };
44
+ additionalInfo: {
45
+ type: string;
46
+ contentType: string;
47
+ };
48
+ size: {
49
+ type: string;
50
+ enum: string[];
51
+ };
52
+ links: {
53
+ type: string;
54
+ items: {
55
+ type: string;
56
+ properties: {
57
+ when: {
58
+ type: string;
59
+ };
60
+ };
61
+ };
62
+ };
63
+ buttons: {
64
+ type: string;
65
+ items: {
66
+ type: string;
67
+ properties: {
68
+ when: {
69
+ type: string;
70
+ };
71
+ };
72
+ };
73
+ };
74
+ theme: {
75
+ type: string;
76
+ enum: string[];
77
+ };
78
+ };
79
+ };
80
+ };
81
+ paddingTop: {
82
+ type: string;
83
+ enum: string[];
84
+ };
85
+ paddingBottom: {
86
+ type: string;
87
+ enum: string[];
88
+ };
89
+ fullWidth: {
90
+ type: string;
91
+ };
92
+ column: {
93
+ type: string;
94
+ enum: string[];
95
+ };
96
+ anchor: {
97
+ type: string;
98
+ additionalProperties: boolean;
99
+ required: string[];
100
+ properties: {
101
+ text: {
102
+ type: string;
103
+ contentType: string;
104
+ };
105
+ url: {
106
+ type: string;
107
+ };
108
+ };
109
+ };
110
+ visible: {
111
+ type: string;
112
+ enum: string[];
113
+ };
114
+ resetPaddings: {
115
+ type: string;
116
+ };
117
+ context: {
118
+ type: string;
119
+ };
120
+ type: {};
121
+ when: {};
122
+ };
123
+ };
124
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CTA = void 0;
4
+ const page_constructor_1 = require("@gravity-ui/page-constructor");
5
+ const common_1 = require("../../models/common");
6
+ const common_2 = require("../../schema/common");
7
+ const { subBlocks: { ContentBase }, common: { BlockBaseProps }, } = page_constructor_1.validators;
8
+ exports.CTA = {
9
+ [common_1.BlockType.CTA]: {
10
+ type: 'object',
11
+ additionalProperties: false,
12
+ required: ['items'],
13
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { items: {
14
+ type: 'array',
15
+ items: {
16
+ type: 'object',
17
+ additionalProperties: false,
18
+ required: ['title', 'links'],
19
+ properties: Object.assign({}, ContentBase),
20
+ },
21
+ } }),
22
+ },
23
+ };
@@ -0,0 +1,140 @@
1
+ export declare const ColoredText: {
2
+ "blog-colored-text-block": {
3
+ type: string;
4
+ additionalProperties: boolean;
5
+ required: string[];
6
+ properties: {
7
+ background: {
8
+ type: string;
9
+ additionalProperties: boolean;
10
+ properties: {
11
+ image: {
12
+ oneOf: ({
13
+ type: string;
14
+ properties: {
15
+ when: {
16
+ type: string;
17
+ };
18
+ };
19
+ } | {
20
+ type: string;
21
+ pattern: string;
22
+ })[];
23
+ };
24
+ color: {
25
+ type: string;
26
+ };
27
+ altText: {
28
+ type: string;
29
+ contentType: string;
30
+ };
31
+ };
32
+ };
33
+ title: {
34
+ oneOf: ({
35
+ type: string;
36
+ additionalProperties: boolean;
37
+ required: string[];
38
+ properties: {
39
+ text: {
40
+ type: string;
41
+ contentType: string;
42
+ };
43
+ textSize: {
44
+ type: string;
45
+ enum: string[];
46
+ };
47
+ url: {
48
+ type: string;
49
+ };
50
+ resetMargin: {
51
+ type: string;
52
+ };
53
+ };
54
+ } | {
55
+ type: string;
56
+ contentType: string;
57
+ })[];
58
+ };
59
+ text: {
60
+ type: string;
61
+ contentType: string;
62
+ };
63
+ additionalInfo: {
64
+ type: string;
65
+ contentType: string;
66
+ };
67
+ size: {
68
+ type: string;
69
+ enum: string[];
70
+ };
71
+ links: {
72
+ type: string;
73
+ items: {
74
+ type: string;
75
+ properties: {
76
+ when: {
77
+ type: string;
78
+ };
79
+ };
80
+ };
81
+ };
82
+ buttons: {
83
+ type: string;
84
+ items: {
85
+ type: string;
86
+ properties: {
87
+ when: {
88
+ type: string;
89
+ };
90
+ };
91
+ };
92
+ };
93
+ theme: {
94
+ type: string;
95
+ enum: string[];
96
+ };
97
+ paddingTop: {
98
+ type: string;
99
+ enum: string[];
100
+ };
101
+ paddingBottom: {
102
+ type: string;
103
+ enum: string[];
104
+ };
105
+ fullWidth: {
106
+ type: string;
107
+ };
108
+ column: {
109
+ type: string;
110
+ enum: string[];
111
+ };
112
+ anchor: {
113
+ type: string;
114
+ additionalProperties: boolean;
115
+ required: string[];
116
+ properties: {
117
+ text: {
118
+ type: string;
119
+ contentType: string;
120
+ };
121
+ url: {
122
+ type: string;
123
+ };
124
+ };
125
+ };
126
+ visible: {
127
+ type: string;
128
+ enum: string[];
129
+ };
130
+ resetPaddings: {
131
+ type: string;
132
+ };
133
+ context: {
134
+ type: string;
135
+ };
136
+ type: {};
137
+ when: {};
138
+ };
139
+ };
140
+ };
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ColoredText = void 0;
4
+ const page_constructor_1 = require("@gravity-ui/page-constructor");
5
+ const common_1 = require("../../models/common");
6
+ const common_2 = require("../../schema/common");
7
+ const { subBlocks: { ContentBase }, components: { ImageProps }, common: { BlockBaseProps }, } = page_constructor_1.validators;
8
+ const BackgroundProps = {
9
+ type: 'object',
10
+ additionalProperties: false,
11
+ properties: {
12
+ image: ImageProps,
13
+ color: {
14
+ type: 'string',
15
+ },
16
+ altText: {
17
+ type: 'string',
18
+ contentType: 'text',
19
+ },
20
+ },
21
+ };
22
+ exports.ColoredText = {
23
+ [common_1.BlockType.ColoredText]: {
24
+ type: 'object',
25
+ additionalProperties: false,
26
+ required: ['text'],
27
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), ContentBase), { background: BackgroundProps }),
28
+ },
29
+ };
@@ -0,0 +1,66 @@
1
+ export declare const Feed: {
2
+ "blog-feed-block": {
3
+ additionalProperties: boolean;
4
+ required: never[];
5
+ properties: {
6
+ title: {
7
+ type: string;
8
+ additionalProperties: boolean;
9
+ required: string[];
10
+ properties: {
11
+ text: {
12
+ type: string;
13
+ contentType: string;
14
+ };
15
+ textSize: {
16
+ type: string;
17
+ enum: string[];
18
+ };
19
+ url: {
20
+ type: string;
21
+ };
22
+ resetMargin: {
23
+ type: string;
24
+ };
25
+ };
26
+ };
27
+ image: {
28
+ type: string;
29
+ };
30
+ description: {
31
+ type: string;
32
+ contentType: string;
33
+ };
34
+ size: {
35
+ type: string;
36
+ enum: string[];
37
+ };
38
+ anchor: {
39
+ type: string;
40
+ additionalProperties: boolean;
41
+ required: string[];
42
+ properties: {
43
+ text: {
44
+ type: string;
45
+ contentType: string;
46
+ };
47
+ url: {
48
+ type: string;
49
+ };
50
+ };
51
+ };
52
+ visible: {
53
+ type: string;
54
+ enum: string[];
55
+ };
56
+ resetPaddings: {
57
+ type: string;
58
+ };
59
+ context: {
60
+ type: string;
61
+ };
62
+ type: {};
63
+ when: {};
64
+ };
65
+ };
66
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Feed = void 0;
4
+ const page_constructor_1 = require("@gravity-ui/page-constructor");
5
+ const { common: { TitleProps, BlockBaseProps }, } = page_constructor_1.validators;
6
+ const common_1 = require("../../models/common");
7
+ exports.Feed = {
8
+ [common_1.BlockType.Feed]: {
9
+ additionalProperties: false,
10
+ required: [],
11
+ properties: Object.assign(Object.assign({}, BlockBaseProps), { title: TitleProps, image: {
12
+ type: 'string',
13
+ }, description: {
14
+ type: 'string',
15
+ contentType: 'text',
16
+ }, size: {
17
+ type: 'string',
18
+ enum: ['s', 'm'],
19
+ } }),
20
+ },
21
+ };