@gravity-ui/blog-constructor 3.2.0-alpha.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -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/CTA.css +27 -47
- 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/components/Paginator/Paginator.css +0 -1
- package/build/cjs/components/Paginator/components/PaginatorItem.js +4 -2
- package/build/cjs/constructor/BlogConstructorProvider.d.ts +2 -0
- package/build/cjs/constructor/BlogConstructorProvider.js +3 -1
- package/build/cjs/contexts/SettingsContext.d.ts +5 -0
- package/build/cjs/contexts/SettingsContext.js +8 -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/CTA.css +27 -47
- 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/components/Paginator/Paginator.css +0 -1
- package/build/esm/components/Paginator/components/PaginatorItem.js +5 -3
- package/build/esm/constructor/BlogConstructorProvider.d.ts +2 -0
- package/build/esm/constructor/BlogConstructorProvider.js +3 -1
- package/build/esm/contexts/SettingsContext.d.ts +5 -0
- package/build/esm/contexts/SettingsContext.js +2 -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 -5
@@ -0,0 +1,181 @@
|
|
1
|
+
export declare const Media: {
|
2
|
+
"blog-media-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
properties: {
|
6
|
+
text: {
|
7
|
+
type: string;
|
8
|
+
contentType: string;
|
9
|
+
};
|
10
|
+
color: {
|
11
|
+
type: string;
|
12
|
+
};
|
13
|
+
image: {
|
14
|
+
anyOf: ({
|
15
|
+
oneOf: ({
|
16
|
+
type: string;
|
17
|
+
properties: {
|
18
|
+
when: {
|
19
|
+
type: string;
|
20
|
+
};
|
21
|
+
};
|
22
|
+
} | {
|
23
|
+
type: string;
|
24
|
+
pattern: string;
|
25
|
+
})[];
|
26
|
+
} | {
|
27
|
+
type: string;
|
28
|
+
items: {
|
29
|
+
oneOf: ({
|
30
|
+
type: string;
|
31
|
+
properties: {
|
32
|
+
when: {
|
33
|
+
type: string;
|
34
|
+
};
|
35
|
+
};
|
36
|
+
} | {
|
37
|
+
type: string;
|
38
|
+
pattern: string;
|
39
|
+
})[];
|
40
|
+
};
|
41
|
+
})[];
|
42
|
+
};
|
43
|
+
video: {
|
44
|
+
type: string;
|
45
|
+
additionalProperties: boolean;
|
46
|
+
required: string[];
|
47
|
+
properties: {
|
48
|
+
src: {
|
49
|
+
type: string;
|
50
|
+
items: {
|
51
|
+
type: string;
|
52
|
+
};
|
53
|
+
};
|
54
|
+
loop: {
|
55
|
+
anyOf: ({
|
56
|
+
type: string;
|
57
|
+
additionalProperties: boolean;
|
58
|
+
required: string[];
|
59
|
+
properties: {
|
60
|
+
start: {
|
61
|
+
type: string;
|
62
|
+
};
|
63
|
+
end: {
|
64
|
+
type: string;
|
65
|
+
};
|
66
|
+
};
|
67
|
+
} | {
|
68
|
+
type: string;
|
69
|
+
})[];
|
70
|
+
};
|
71
|
+
type: {
|
72
|
+
type: string;
|
73
|
+
enum: string[];
|
74
|
+
};
|
75
|
+
muted: {
|
76
|
+
type: string;
|
77
|
+
};
|
78
|
+
playing: {
|
79
|
+
type: string;
|
80
|
+
};
|
81
|
+
elapsedTime: {
|
82
|
+
type: string;
|
83
|
+
};
|
84
|
+
playIcon: {
|
85
|
+
type: string;
|
86
|
+
additionalProperties: boolean;
|
87
|
+
properties: {
|
88
|
+
type: {
|
89
|
+
type: string;
|
90
|
+
enum: string[];
|
91
|
+
};
|
92
|
+
theme: {
|
93
|
+
type: string;
|
94
|
+
enum: string[];
|
95
|
+
};
|
96
|
+
text: {
|
97
|
+
type: string;
|
98
|
+
contentType: string;
|
99
|
+
};
|
100
|
+
};
|
101
|
+
};
|
102
|
+
controls: {
|
103
|
+
type: string;
|
104
|
+
enum: string[];
|
105
|
+
};
|
106
|
+
};
|
107
|
+
};
|
108
|
+
youtube: {
|
109
|
+
type: string;
|
110
|
+
};
|
111
|
+
parallax: {
|
112
|
+
type: string;
|
113
|
+
};
|
114
|
+
height: {
|
115
|
+
type: string;
|
116
|
+
};
|
117
|
+
previewImg: {
|
118
|
+
type: string;
|
119
|
+
};
|
120
|
+
dataLens: {
|
121
|
+
oneOf: ({
|
122
|
+
type: string;
|
123
|
+
additionalProperties: boolean;
|
124
|
+
required: string[];
|
125
|
+
properties: {
|
126
|
+
id: {
|
127
|
+
type: string;
|
128
|
+
};
|
129
|
+
theme: {
|
130
|
+
type: string;
|
131
|
+
enum: string[];
|
132
|
+
};
|
133
|
+
};
|
134
|
+
} | {
|
135
|
+
type: string;
|
136
|
+
})[];
|
137
|
+
};
|
138
|
+
paddingTop: {
|
139
|
+
type: string;
|
140
|
+
enum: string[];
|
141
|
+
};
|
142
|
+
paddingBottom: {
|
143
|
+
type: string;
|
144
|
+
enum: string[];
|
145
|
+
};
|
146
|
+
fullWidth: {
|
147
|
+
type: string;
|
148
|
+
};
|
149
|
+
column: {
|
150
|
+
type: string;
|
151
|
+
enum: string[];
|
152
|
+
};
|
153
|
+
anchor: {
|
154
|
+
type: string;
|
155
|
+
additionalProperties: boolean;
|
156
|
+
required: string[];
|
157
|
+
properties: {
|
158
|
+
text: {
|
159
|
+
type: string;
|
160
|
+
contentType: string;
|
161
|
+
};
|
162
|
+
url: {
|
163
|
+
type: string;
|
164
|
+
};
|
165
|
+
};
|
166
|
+
};
|
167
|
+
visible: {
|
168
|
+
type: string;
|
169
|
+
enum: string[];
|
170
|
+
};
|
171
|
+
resetPaddings: {
|
172
|
+
type: string;
|
173
|
+
};
|
174
|
+
context: {
|
175
|
+
type: string;
|
176
|
+
};
|
177
|
+
type: {};
|
178
|
+
when: {};
|
179
|
+
};
|
180
|
+
};
|
181
|
+
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { validators } from '@gravity-ui/page-constructor';
|
2
|
+
import { BlockType } from '../../models/common';
|
3
|
+
import { BlogBlockBase } from '../../schema/common';
|
4
|
+
const { common: { BlockBaseProps, MediaProps }, } = validators;
|
5
|
+
export const Media = {
|
6
|
+
[BlockType.Media]: {
|
7
|
+
type: 'object',
|
8
|
+
additionalProperties: false,
|
9
|
+
properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), MediaProps), { text: {
|
10
|
+
type: 'string',
|
11
|
+
contentType: 'text',
|
12
|
+
} }),
|
13
|
+
},
|
14
|
+
};
|
@@ -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
|
+
};
|
@@ -1,16 +1,18 @@
|
|
1
|
-
import React, { useContext } from 'react';
|
1
|
+
import React, { Fragment, useContext } from 'react';
|
2
2
|
import { Button } from '@gravity-ui/uikit';
|
3
3
|
import { LocaleContext } from '../../../contexts/LocaleContext';
|
4
|
+
import { SettingsContext } from '../../../contexts/SettingsContext';
|
4
5
|
import { block } from '../../../utils/cn';
|
5
6
|
import { getBlogPath } from '../../../utils/common';
|
6
7
|
import '../Paginator.css';
|
7
8
|
const b = block('paginator');
|
8
9
|
export const PaginatorItem = ({ dataKey, mods, content, onClick, loading = false, index, }) => {
|
9
10
|
const { locale } = useContext(LocaleContext);
|
11
|
+
const { addNavigationLinkForPages } = useContext(SettingsContext);
|
10
12
|
const urlPath = getBlogPath((locale === null || locale === void 0 ? void 0 : locale.pathPrefix) || '');
|
11
13
|
const itemKey = Number(dataKey) > 0 ? Number(dataKey) : dataKey;
|
12
14
|
const navTag = index > 1 ? `?page=${index}` : '';
|
13
15
|
const navigationLink = `${urlPath || ''}${navTag}`;
|
14
|
-
|
15
|
-
|
16
|
+
const renderButton = (React.createElement(Button, { view: "flat", size: "xl", className: b('item', mods), onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(itemKey), loading: loading && Boolean(mods.active) }, content));
|
17
|
+
return (React.createElement(Fragment, null, addNavigationLinkForPages ? (React.createElement("a", { href: navigationLink, className: b('link'), onClick: (event) => event.preventDefault() }, renderButton)) : (React.createElement(Fragment, null, renderButton))));
|
16
18
|
};
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
2
2
|
import { AnalyticsContextProps } from '@gravity-ui/page-constructor';
|
3
3
|
import { DeviceContextProps } from '../contexts/DeviceContext';
|
4
4
|
import { RouterContextProps } from '../contexts/RouterContext';
|
5
|
+
import { SettingsContextProps } from '../contexts/SettingsContext';
|
5
6
|
import { ThemeValueType } from '../contexts/theme/ThemeValueContext';
|
6
7
|
import { Locale } from '../models/locale';
|
7
8
|
export interface BlogConstructorProviderProps {
|
@@ -11,6 +12,7 @@ export interface BlogConstructorProviderProps {
|
|
11
12
|
theme?: ThemeValueType;
|
12
13
|
device?: DeviceContextProps;
|
13
14
|
analytics?: AnalyticsContextProps;
|
15
|
+
settings?: SettingsContextProps;
|
14
16
|
children?: React.ReactNode;
|
15
17
|
}
|
16
18
|
export declare const BlogConstructorProvider: React.FC<BlogConstructorProviderProps>;
|
@@ -5,14 +5,16 @@ import { DeviceContext } from '../contexts/DeviceContext';
|
|
5
5
|
import { LocaleContext } from '../contexts/LocaleContext';
|
6
6
|
import { MobileContext } from '../contexts/MobileContext';
|
7
7
|
import { RouterContext } from '../contexts/RouterContext';
|
8
|
+
import { SettingsContext } from '../contexts/SettingsContext';
|
8
9
|
import { ThemeValueContext } from '../contexts/theme/ThemeValueContext';
|
9
|
-
export const BlogConstructorProvider = ({ isMobile, locale = {}, router = {}, theme = DEFAULT_THEME, device = {}, analytics = {}, children, }) => {
|
10
|
+
export const BlogConstructorProvider = ({ isMobile, locale = {}, router = {}, theme = DEFAULT_THEME, device = {}, analytics = {}, settings = {}, children, }) => {
|
10
11
|
const context = [
|
11
12
|
React.createElement(ThemeValueContext.Provider, { value: { themeValue: theme }, key: "theme-context" }),
|
12
13
|
React.createElement(LocaleContext.Provider, { value: { locale }, key: "locale-context" }),
|
13
14
|
React.createElement(RouterContext.Provider, { value: router, key: "router-context" }),
|
14
15
|
React.createElement(MobileContext.Provider, { value: Boolean(isMobile), key: "is-mobile-context" }),
|
15
16
|
React.createElement(DeviceContext.Provider, { value: device, key: "device-context" }),
|
17
|
+
React.createElement(SettingsContext.Provider, { value: settings, key: "settings-context" }),
|
16
18
|
React.createElement(AnalyticsContext.Provider, { value: analytics, key: "analytics-context" }),
|
17
19
|
].reduceRight((prev, provider) => React.cloneElement(provider, {}, prev), children);
|
18
20
|
return React.createElement(Fragment, null, context);
|
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';
|