@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,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Meta = 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.Meta = {
|
9
|
+
[common_1.BlockType.Meta]: {
|
10
|
+
type: 'object',
|
11
|
+
additionalProperties: false,
|
12
|
+
properties: Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase),
|
13
|
+
},
|
14
|
+
};
|
@@ -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,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Suggest = 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.Suggest = {
|
9
|
+
[common_1.BlockType.Suggest]: {
|
10
|
+
type: 'object',
|
11
|
+
additionalProperties: false,
|
12
|
+
properties: Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase),
|
13
|
+
},
|
14
|
+
};
|
@@ -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,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.YFM = 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.YFM = {
|
9
|
+
[common_1.BlockType.YFM]: {
|
10
|
+
type: 'object',
|
11
|
+
additionalProperties: false,
|
12
|
+
required: ['text'],
|
13
|
+
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), { text: {
|
14
|
+
type: 'string',
|
15
|
+
contentType: 'yfm',
|
16
|
+
} }),
|
17
|
+
},
|
18
|
+
};
|
package/build/cjs/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/cjs/index.js
CHANGED
@@ -25,5 +25,6 @@ var BlogPage_1 = require("./containers/BlogPage/BlogPage");
|
|
25
25
|
Object.defineProperty(exports, "BlogPage", { enumerable: true, get: function () { return BlogPage_1.BlogPage; } });
|
26
26
|
__exportStar(require("./models/common"), exports);
|
27
27
|
__exportStar(require("./models/locale"), exports);
|
28
|
+
__exportStar(require("./schema"), exports);
|
28
29
|
var constants_1 = require("./constants");
|
29
30
|
Object.defineProperty(exports, "BREAKPOINTS", { enumerable: true, get: function () { return constants_1.BREAKPOINTS; } });
|
@@ -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,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("../blocks/Author/schema"), exports);
|
18
|
+
__exportStar(require("../blocks/Banner/schema"), exports);
|
19
|
+
__exportStar(require("../blocks/ColoredText/schema"), exports);
|
20
|
+
__exportStar(require("../blocks/CTA/schema"), exports);
|
21
|
+
__exportStar(require("../blocks/Feed/schema"), exports);
|
22
|
+
__exportStar(require("../blocks/Layout/schema"), exports);
|
23
|
+
__exportStar(require("../blocks/Media/schema"), exports);
|
24
|
+
__exportStar(require("../blocks/Meta/schema"), exports);
|
25
|
+
__exportStar(require("../blocks/Suggest/schema"), exports);
|
26
|
+
__exportStar(require("../blocks/YFM/schema"), exports);
|
@@ -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,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BlogBlockBase = exports.filteredItem = void 0;
|
4
|
+
const sizeTypes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
5
|
+
const filteredItem = (itemsSchema) => (Object.assign(Object.assign({}, itemsSchema), { type: 'object', properties: Object.assign({ when: {
|
6
|
+
type: 'string',
|
7
|
+
} }, itemsSchema.properties) }));
|
8
|
+
exports.filteredItem = filteredItem;
|
9
|
+
exports.BlogBlockBase = {
|
10
|
+
paddingTop: {
|
11
|
+
type: 'string',
|
12
|
+
enum: sizeTypes,
|
13
|
+
},
|
14
|
+
paddingBottom: {
|
15
|
+
type: 'string',
|
16
|
+
enum: sizeTypes,
|
17
|
+
},
|
18
|
+
fullWidth: {
|
19
|
+
type: 'boolean',
|
20
|
+
},
|
21
|
+
column: {
|
22
|
+
type: 'string',
|
23
|
+
enum: ['left', 'right'],
|
24
|
+
},
|
25
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '../blocks/Header/schema';
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("../blocks/Header/schema"), exports);
|