@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.
- package/CHANGELOG.md +7 -0
- package/build/cjs/blocks/Author/schema.d.ts +53 -0
- package/build/cjs/blocks/Author/schema.js +17 -0
- package/build/cjs/blocks/Banner/schema.d.ts +124 -0
- package/build/cjs/blocks/Banner/schema.js +22 -0
- package/build/cjs/blocks/CTA/schema.d.ts +124 -0
- package/build/cjs/blocks/CTA/schema.js +23 -0
- package/build/cjs/blocks/ColoredText/schema.d.ts +140 -0
- package/build/cjs/blocks/ColoredText/schema.js +29 -0
- package/build/cjs/blocks/Feed/schema.d.ts +66 -0
- package/build/cjs/blocks/Feed/schema.js +21 -0
- package/build/cjs/blocks/Header/schema.d.ts +376 -0
- package/build/cjs/blocks/Header/schema.js +14 -0
- package/build/cjs/blocks/Layout/schema.d.ts +60 -0
- package/build/cjs/blocks/Layout/schema.js +18 -0
- package/build/cjs/blocks/Media/schema.d.ts +181 -0
- package/build/cjs/blocks/Media/schema.js +17 -0
- package/build/cjs/blocks/Meta/schema.d.ts +49 -0
- package/build/cjs/blocks/Meta/schema.js +14 -0
- package/build/cjs/blocks/Suggest/schema.d.ts +49 -0
- package/build/cjs/blocks/Suggest/schema.js +14 -0
- package/build/cjs/blocks/YFM/schema.d.ts +54 -0
- package/build/cjs/blocks/YFM/schema.js +18 -0
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +1 -0
- package/build/cjs/schema/blocks.d.ts +10 -0
- package/build/cjs/schema/blocks.js +26 -0
- package/build/cjs/schema/common.d.ts +28 -0
- package/build/cjs/schema/common.js +25 -0
- package/build/cjs/schema/headers.d.ts +1 -0
- package/build/cjs/schema/headers.js +17 -0
- package/build/cjs/schema/index.d.ts +1288 -0
- package/build/cjs/schema/index.js +52 -0
- package/build/cjs/schema/utils.d.ts +9 -0
- package/build/cjs/schema/utils.js +9 -0
- package/build/esm/blocks/Author/schema.d.ts +53 -0
- package/build/esm/blocks/Author/schema.js +14 -0
- package/build/esm/blocks/Banner/schema.d.ts +124 -0
- package/build/esm/blocks/Banner/schema.js +19 -0
- package/build/esm/blocks/CTA/schema.d.ts +124 -0
- package/build/esm/blocks/CTA/schema.js +20 -0
- package/build/esm/blocks/ColoredText/schema.d.ts +140 -0
- package/build/esm/blocks/ColoredText/schema.js +26 -0
- package/build/esm/blocks/Feed/schema.d.ts +66 -0
- package/build/esm/blocks/Feed/schema.js +18 -0
- package/build/esm/blocks/Header/schema.d.ts +376 -0
- package/build/esm/blocks/Header/schema.js +11 -0
- package/build/esm/blocks/Layout/schema.d.ts +60 -0
- package/build/esm/blocks/Layout/schema.js +15 -0
- package/build/esm/blocks/Media/schema.d.ts +181 -0
- package/build/esm/blocks/Media/schema.js +14 -0
- package/build/esm/blocks/Meta/schema.d.ts +49 -0
- package/build/esm/blocks/Meta/schema.js +11 -0
- package/build/esm/blocks/Suggest/schema.d.ts +49 -0
- package/build/esm/blocks/Suggest/schema.js +11 -0
- package/build/esm/blocks/YFM/schema.d.ts +54 -0
- package/build/esm/blocks/YFM/schema.js +15 -0
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.js +1 -0
- package/build/esm/schema/blocks.d.ts +10 -0
- package/build/esm/schema/blocks.js +10 -0
- package/build/esm/schema/common.d.ts +28 -0
- package/build/esm/schema/common.js +21 -0
- package/build/esm/schema/headers.d.ts +1 -0
- package/build/esm/schema/headers.js +1 -0
- package/build/esm/schema/index.d.ts +1288 -0
- package/build/esm/schema/index.js +26 -0
- package/build/esm/schema/utils.d.ts +9 -0
- package/build/esm/schema/utils.js +5 -0
- package/package.json +2 -2
@@ -0,0 +1,49 @@
|
|
1
|
+
export declare const Meta: {
|
2
|
+
"blog-meta-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
properties: {
|
6
|
+
paddingTop: {
|
7
|
+
type: string;
|
8
|
+
enum: string[];
|
9
|
+
};
|
10
|
+
paddingBottom: {
|
11
|
+
type: string;
|
12
|
+
enum: string[];
|
13
|
+
};
|
14
|
+
fullWidth: {
|
15
|
+
type: string;
|
16
|
+
};
|
17
|
+
column: {
|
18
|
+
type: string;
|
19
|
+
enum: string[];
|
20
|
+
};
|
21
|
+
anchor: {
|
22
|
+
type: string;
|
23
|
+
additionalProperties: boolean;
|
24
|
+
required: string[];
|
25
|
+
properties: {
|
26
|
+
text: {
|
27
|
+
type: string;
|
28
|
+
contentType: string;
|
29
|
+
};
|
30
|
+
url: {
|
31
|
+
type: string;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
};
|
35
|
+
visible: {
|
36
|
+
type: string;
|
37
|
+
enum: string[];
|
38
|
+
};
|
39
|
+
resetPaddings: {
|
40
|
+
type: string;
|
41
|
+
};
|
42
|
+
context: {
|
43
|
+
type: string;
|
44
|
+
};
|
45
|
+
type: {};
|
46
|
+
when: {};
|
47
|
+
};
|
48
|
+
};
|
49
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { validators } from '@gravity-ui/page-constructor';
|
2
|
+
const { common: { BlockBaseProps }, } = validators;
|
3
|
+
import { BlockType } from '../../models/common';
|
4
|
+
import { BlogBlockBase } from '../../schema/common';
|
5
|
+
export const Meta = {
|
6
|
+
[BlockType.Meta]: {
|
7
|
+
type: 'object',
|
8
|
+
additionalProperties: false,
|
9
|
+
properties: Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase),
|
10
|
+
},
|
11
|
+
};
|
@@ -0,0 +1,49 @@
|
|
1
|
+
export declare const Suggest: {
|
2
|
+
"blog-suggest-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
properties: {
|
6
|
+
paddingTop: {
|
7
|
+
type: string;
|
8
|
+
enum: string[];
|
9
|
+
};
|
10
|
+
paddingBottom: {
|
11
|
+
type: string;
|
12
|
+
enum: string[];
|
13
|
+
};
|
14
|
+
fullWidth: {
|
15
|
+
type: string;
|
16
|
+
};
|
17
|
+
column: {
|
18
|
+
type: string;
|
19
|
+
enum: string[];
|
20
|
+
};
|
21
|
+
anchor: {
|
22
|
+
type: string;
|
23
|
+
additionalProperties: boolean;
|
24
|
+
required: string[];
|
25
|
+
properties: {
|
26
|
+
text: {
|
27
|
+
type: string;
|
28
|
+
contentType: string;
|
29
|
+
};
|
30
|
+
url: {
|
31
|
+
type: string;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
};
|
35
|
+
visible: {
|
36
|
+
type: string;
|
37
|
+
enum: string[];
|
38
|
+
};
|
39
|
+
resetPaddings: {
|
40
|
+
type: string;
|
41
|
+
};
|
42
|
+
context: {
|
43
|
+
type: string;
|
44
|
+
};
|
45
|
+
type: {};
|
46
|
+
when: {};
|
47
|
+
};
|
48
|
+
};
|
49
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { validators } from '@gravity-ui/page-constructor';
|
2
|
+
const { common: { BlockBaseProps }, } = validators;
|
3
|
+
import { BlockType } from '../../models/common';
|
4
|
+
import { BlogBlockBase } from '../../schema/common';
|
5
|
+
export const Suggest = {
|
6
|
+
[BlockType.Suggest]: {
|
7
|
+
type: 'object',
|
8
|
+
additionalProperties: false,
|
9
|
+
properties: Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase),
|
10
|
+
},
|
11
|
+
};
|
@@ -0,0 +1,54 @@
|
|
1
|
+
export declare const YFM: {
|
2
|
+
"blog-yfm-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
required: string[];
|
6
|
+
properties: {
|
7
|
+
text: {
|
8
|
+
type: string;
|
9
|
+
contentType: string;
|
10
|
+
};
|
11
|
+
paddingTop: {
|
12
|
+
type: string;
|
13
|
+
enum: string[];
|
14
|
+
};
|
15
|
+
paddingBottom: {
|
16
|
+
type: string;
|
17
|
+
enum: string[];
|
18
|
+
};
|
19
|
+
fullWidth: {
|
20
|
+
type: string;
|
21
|
+
};
|
22
|
+
column: {
|
23
|
+
type: string;
|
24
|
+
enum: string[];
|
25
|
+
};
|
26
|
+
anchor: {
|
27
|
+
type: string;
|
28
|
+
additionalProperties: boolean;
|
29
|
+
required: string[];
|
30
|
+
properties: {
|
31
|
+
text: {
|
32
|
+
type: string;
|
33
|
+
contentType: string;
|
34
|
+
};
|
35
|
+
url: {
|
36
|
+
type: string;
|
37
|
+
};
|
38
|
+
};
|
39
|
+
};
|
40
|
+
visible: {
|
41
|
+
type: string;
|
42
|
+
enum: string[];
|
43
|
+
};
|
44
|
+
resetPaddings: {
|
45
|
+
type: string;
|
46
|
+
};
|
47
|
+
context: {
|
48
|
+
type: string;
|
49
|
+
};
|
50
|
+
type: {};
|
51
|
+
when: {};
|
52
|
+
};
|
53
|
+
};
|
54
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { validators } from '@gravity-ui/page-constructor';
|
2
|
+
const { common: { BlockBaseProps }, } = validators;
|
3
|
+
import { BlockType } from '../../models/common';
|
4
|
+
import { BlogBlockBase } from '../../schema/common';
|
5
|
+
export const YFM = {
|
6
|
+
[BlockType.YFM]: {
|
7
|
+
type: 'object',
|
8
|
+
additionalProperties: false,
|
9
|
+
required: ['text'],
|
10
|
+
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { text: {
|
11
|
+
type: 'string',
|
12
|
+
contentType: 'yfm',
|
13
|
+
} }),
|
14
|
+
},
|
15
|
+
};
|
package/build/esm/index.d.ts
CHANGED
@@ -4,4 +4,5 @@ export { BlogPostPage } from './containers/BlogPostPage/BlogPostPage';
|
|
4
4
|
export { BlogPage } from './containers/BlogPage/BlogPage';
|
5
5
|
export * from './models/common';
|
6
6
|
export * from './models/locale';
|
7
|
+
export * from './schema';
|
7
8
|
export { BREAKPOINTS } from './constants';
|
package/build/esm/index.js
CHANGED
@@ -4,4 +4,5 @@ export { BlogPostPage } from './containers/BlogPostPage/BlogPostPage';
|
|
4
4
|
export { BlogPage } from './containers/BlogPage/BlogPage';
|
5
5
|
export * from './models/common';
|
6
6
|
export * from './models/locale';
|
7
|
+
export * from './schema';
|
7
8
|
export { BREAKPOINTS } from './constants';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export * from '../blocks/Author/schema';
|
2
|
+
export * from '../blocks/Banner/schema';
|
3
|
+
export * from '../blocks/ColoredText/schema';
|
4
|
+
export * from '../blocks/CTA/schema';
|
5
|
+
export * from '../blocks/Feed/schema';
|
6
|
+
export * from '../blocks/Layout/schema';
|
7
|
+
export * from '../blocks/Media/schema';
|
8
|
+
export * from '../blocks/Meta/schema';
|
9
|
+
export * from '../blocks/Suggest/schema';
|
10
|
+
export * from '../blocks/YFM/schema';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export * from '../blocks/Author/schema';
|
2
|
+
export * from '../blocks/Banner/schema';
|
3
|
+
export * from '../blocks/ColoredText/schema';
|
4
|
+
export * from '../blocks/CTA/schema';
|
5
|
+
export * from '../blocks/Feed/schema';
|
6
|
+
export * from '../blocks/Layout/schema';
|
7
|
+
export * from '../blocks/Media/schema';
|
8
|
+
export * from '../blocks/Meta/schema';
|
9
|
+
export * from '../blocks/Suggest/schema';
|
10
|
+
export * from '../blocks/YFM/schema';
|
@@ -0,0 +1,28 @@
|
|
1
|
+
export interface ObjectSchema extends Record<string, unknown> {
|
2
|
+
properties: object;
|
3
|
+
}
|
4
|
+
export declare const filteredItem: (itemsSchema: ObjectSchema) => {
|
5
|
+
type: string;
|
6
|
+
properties: {
|
7
|
+
when: {
|
8
|
+
type: string;
|
9
|
+
};
|
10
|
+
};
|
11
|
+
};
|
12
|
+
export declare const BlogBlockBase: {
|
13
|
+
paddingTop: {
|
14
|
+
type: string;
|
15
|
+
enum: string[];
|
16
|
+
};
|
17
|
+
paddingBottom: {
|
18
|
+
type: string;
|
19
|
+
enum: string[];
|
20
|
+
};
|
21
|
+
fullWidth: {
|
22
|
+
type: string;
|
23
|
+
};
|
24
|
+
column: {
|
25
|
+
type: string;
|
26
|
+
enum: string[];
|
27
|
+
};
|
28
|
+
};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
const sizeTypes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
2
|
+
export const filteredItem = (itemsSchema) => (Object.assign(Object.assign({}, itemsSchema), { type: 'object', properties: Object.assign({ when: {
|
3
|
+
type: 'string',
|
4
|
+
} }, itemsSchema.properties) }));
|
5
|
+
export const BlogBlockBase = {
|
6
|
+
paddingTop: {
|
7
|
+
type: 'string',
|
8
|
+
enum: sizeTypes,
|
9
|
+
},
|
10
|
+
paddingBottom: {
|
11
|
+
type: 'string',
|
12
|
+
enum: sizeTypes,
|
13
|
+
},
|
14
|
+
fullWidth: {
|
15
|
+
type: 'boolean',
|
16
|
+
},
|
17
|
+
column: {
|
18
|
+
type: 'string',
|
19
|
+
enum: ['left', 'right'],
|
20
|
+
},
|
21
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '../blocks/Header/schema';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '../blocks/Header/schema';
|