@gravity-ui/blog-constructor 4.1.0 → 4.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,8 @@ export declare const Media: {
11
11
  type: string;
12
12
  };
13
13
  image: {
14
- anyOf: ({
14
+ oneOf: ({
15
+ optionName: string;
15
16
  oneOf: ({
16
17
  type: string;
17
18
  properties: {
@@ -22,7 +23,10 @@ export declare const Media: {
22
23
  } | {
23
24
  type: string;
24
25
  pattern: string;
26
+ optionName: string;
25
27
  })[];
28
+ type?: undefined;
29
+ items?: undefined;
26
30
  } | {
27
31
  type: string;
28
32
  items: {
@@ -36,8 +40,10 @@ export declare const Media: {
36
40
  } | {
37
41
  type: string;
38
42
  pattern: string;
43
+ optionName: string;
39
44
  })[];
40
45
  };
46
+ optionName: string;
41
47
  })[];
42
48
  };
43
49
  video: {
@@ -52,7 +58,8 @@ export declare const Media: {
52
58
  };
53
59
  };
54
60
  loop: {
55
- anyOf: ({
61
+ oneOf: ({
62
+ optionName: string;
56
63
  type: string;
57
64
  additionalProperties: boolean;
58
65
  required: string[];
@@ -66,6 +73,7 @@ export declare const Media: {
66
73
  };
67
74
  } | {
68
75
  type: string;
76
+ optionName: string;
69
77
  })[];
70
78
  };
71
79
  type: {
@@ -75,13 +83,13 @@ export declare const Media: {
75
83
  muted: {
76
84
  type: string;
77
85
  };
78
- playing: {
86
+ autoplay: {
79
87
  type: string;
80
88
  };
81
89
  elapsedTime: {
82
90
  type: string;
83
91
  };
84
- playIcon: {
92
+ playButton: {
85
93
  type: string;
86
94
  additionalProperties: boolean;
87
95
  properties: {
@@ -119,6 +127,10 @@ export declare const Media: {
119
127
  };
120
128
  dataLens: {
121
129
  oneOf: ({
130
+ type: string;
131
+ optionName: string;
132
+ } | {
133
+ optionName: string;
122
134
  type: string;
123
135
  additionalProperties: boolean;
124
136
  required: string[];
@@ -131,8 +143,6 @@ export declare const Media: {
131
143
  enum: string[];
132
144
  };
133
145
  };
134
- } | {
135
- type: string;
136
146
  })[];
137
147
  };
138
148
  fullscreen: {
@@ -26,6 +26,6 @@ export const Sharing = ({ theme, metrikaGoal }) => {
26
26
  handleMetrika();
27
27
  }, [handleAnalyticsGlobal, handleMetrika]);
28
28
  return (React.createElement("div", { className: b('item') },
29
- React.createElement("span", { className: b('icon') },
29
+ React.createElement("div", { className: b('icon') },
30
30
  React.createElement(SharePopover, { url: getAbsolutePath(router), className: b('share'), iconClass: b('share-icon'), switcherClassName: b('switcher', { theme }), tooltipClassName: b('popup'), useWebShareApi: isMobile, direction: 'column', buttonTitle: i18(Keyset.ActionShare), customIcon: ShareArrowUp, placement: "bottom", openByHover: false, shareOptions: shareOptions, handleMetrika: handleAnalytics }))));
31
31
  };
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import React, { useMemo } from 'react';
12
+ import React, { Fragment, useMemo } from 'react';
13
13
  import { PageConstructor, PageConstructorProvider, } from '@gravity-ui/page-constructor';
14
14
  import { MetaWrapper } from '../../components/MetaWrapper/MetaWrapper';
15
15
  import { PromptSignIn } from '../../components/PromptSignIn/PromptSignIn';
@@ -21,7 +21,7 @@ import './BlogPage.css';
21
21
  export const BlogPage = ({ content, posts, tags, services, getPosts, metaData, hasLikes = false, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser = false, onClickSignIn, }) => {
22
22
  const _a = usePromptSignInProps(onClickSignIn), { requireSignIn } = _a, promptSignInProps = __rest(_a, ["requireSignIn"]);
23
23
  const likes = useMemo(() => ({ toggleLike, hasLikes, isSignedInUser, requireSignIn }), [toggleLike, hasLikes, isSignedInUser, requireSignIn]);
24
- return (React.createElement("main", null,
24
+ return (React.createElement(Fragment, null,
25
25
  React.createElement(LikesContext.Provider, { value: likes },
26
26
  React.createElement(FeedContext.Provider, { value: {
27
27
  posts: posts.posts,
@@ -13,24 +13,23 @@ export const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, s
13
13
  toggleLikeCallback: likes === null || likes === void 0 ? void 0 : likes.toggleLike,
14
14
  postId: post === null || post === void 0 ? void 0 : post.blogPostId,
15
15
  });
16
- return (React.createElement("main", null,
17
- React.createElement(LikesContext.Provider, { value: {
18
- toggleLike: likes === null || likes === void 0 ? void 0 : likes.toggleLike,
19
- hasLikes: Boolean(likes),
16
+ return (React.createElement(LikesContext.Provider, { value: {
17
+ toggleLike: likes === null || likes === void 0 ? void 0 : likes.toggleLike,
18
+ hasLikes: Boolean(likes),
19
+ } },
20
+ React.createElement(PostPageContext.Provider, { value: {
21
+ post,
22
+ suggestedPosts,
23
+ likes: likes
24
+ ? {
25
+ handleUserLike: handleLike,
26
+ hasUserLike,
27
+ likesCount,
28
+ }
29
+ : undefined,
30
+ shareOptions,
20
31
  } },
21
- React.createElement(PostPageContext.Provider, { value: {
22
- post,
23
- suggestedPosts,
24
- likes: likes
25
- ? {
26
- handleUserLike: handleLike,
27
- hasUserLike,
28
- likesCount,
29
- }
30
- : undefined,
31
- shareOptions,
32
- } },
33
- React.createElement(PageConstructorProvider, Object.assign({}, settings),
34
- metaData ? React.createElement(MetaWrapper, Object.assign({}, metaData)) : null,
35
- React.createElement(PageConstructor, { content: content, custom: componentMap, navigation: navigation }))))));
32
+ React.createElement(PageConstructorProvider, Object.assign({}, settings),
33
+ metaData ? React.createElement(MetaWrapper, Object.assign({}, metaData)) : null,
34
+ React.createElement(PageConstructor, { content: content, custom: componentMap, navigation: navigation })))));
36
35
  };
@@ -22,6 +22,7 @@ export declare const schemasForCustom: {
22
22
  description: {
23
23
  type: string;
24
24
  contentType: string;
25
+ inputType: string;
25
26
  };
26
27
  width: {
27
28
  type: string;
@@ -43,7 +44,7 @@ export declare const schemasForCustom: {
43
44
  enum: string[];
44
45
  };
45
46
  image: {
46
- oneOf: ({
47
+ oneOf: (({
47
48
  oneOf: ({
48
49
  type: string;
49
50
  properties: {
@@ -54,16 +55,20 @@ export declare const schemasForCustom: {
54
55
  } | {
55
56
  type: string;
56
57
  pattern: string;
58
+ optionName: string;
57
59
  })[];
58
- } | {
60
+ } & {
61
+ optionName: string;
62
+ }) | {
59
63
  type: string;
60
64
  additionalProperties: boolean;
61
65
  required: import("@gravity-ui/page-constructor").Theme[];
62
66
  properties: {};
67
+ optionName: string;
63
68
  })[];
64
69
  };
65
70
  video: {
66
- oneOf: ({
71
+ oneOf: (({
67
72
  type: string;
68
73
  additionalProperties: boolean;
69
74
  required: string[];
@@ -75,7 +80,8 @@ export declare const schemasForCustom: {
75
80
  };
76
81
  };
77
82
  loop: {
78
- anyOf: ({
83
+ oneOf: ({
84
+ optionName: string;
79
85
  type: string;
80
86
  additionalProperties: boolean;
81
87
  required: string[];
@@ -89,6 +95,7 @@ export declare const schemasForCustom: {
89
95
  };
90
96
  } | {
91
97
  type: string;
98
+ optionName: string;
92
99
  })[];
93
100
  };
94
101
  type: {
@@ -98,13 +105,13 @@ export declare const schemasForCustom: {
98
105
  muted: {
99
106
  type: string;
100
107
  };
101
- playing: {
108
+ autoplay: {
102
109
  type: string;
103
110
  };
104
111
  elapsedTime: {
105
112
  type: string;
106
113
  };
107
- playIcon: {
114
+ playButton: {
108
115
  type: string;
109
116
  additionalProperties: boolean;
110
117
  properties: {
@@ -127,11 +134,14 @@ export declare const schemasForCustom: {
127
134
  enum: string[];
128
135
  };
129
136
  };
130
- } | {
137
+ } & {
138
+ optionName: string;
139
+ }) | {
131
140
  type: string;
132
141
  additionalProperties: boolean;
133
142
  required: import("@gravity-ui/page-constructor").Theme[];
134
143
  properties: {};
144
+ optionName: string;
135
145
  })[];
136
146
  };
137
147
  backLink: {
@@ -156,7 +166,7 @@ export declare const schemasForCustom: {
156
166
  enum: string[];
157
167
  };
158
168
  background: {
159
- oneOf: ({
169
+ oneOf: (({
160
170
  type: string;
161
171
  additionalProperties: boolean;
162
172
  required: never[];
@@ -171,7 +181,8 @@ export declare const schemasForCustom: {
171
181
  type: string;
172
182
  };
173
183
  image: {
174
- anyOf: ({
184
+ oneOf: ({
185
+ optionName: string;
175
186
  oneOf: ({
176
187
  type: string;
177
188
  properties: {
@@ -182,7 +193,10 @@ export declare const schemasForCustom: {
182
193
  } | {
183
194
  type: string;
184
195
  pattern: string;
196
+ optionName: string;
185
197
  })[];
198
+ type?: undefined;
199
+ items?: undefined;
186
200
  } | {
187
201
  type: string;
188
202
  items: {
@@ -196,8 +210,10 @@ export declare const schemasForCustom: {
196
210
  } | {
197
211
  type: string;
198
212
  pattern: string;
213
+ optionName: string;
199
214
  })[];
200
215
  };
216
+ optionName: string;
201
217
  })[];
202
218
  };
203
219
  video: {
@@ -212,7 +228,8 @@ export declare const schemasForCustom: {
212
228
  };
213
229
  };
214
230
  loop: {
215
- anyOf: ({
231
+ oneOf: ({
232
+ optionName: string;
216
233
  type: string;
217
234
  additionalProperties: boolean;
218
235
  required: string[];
@@ -226,6 +243,7 @@ export declare const schemasForCustom: {
226
243
  };
227
244
  } | {
228
245
  type: string;
246
+ optionName: string;
229
247
  })[];
230
248
  };
231
249
  type: {
@@ -235,13 +253,13 @@ export declare const schemasForCustom: {
235
253
  muted: {
236
254
  type: string;
237
255
  };
238
- playing: {
256
+ autoplay: {
239
257
  type: string;
240
258
  };
241
259
  elapsedTime: {
242
260
  type: string;
243
261
  };
244
- playIcon: {
262
+ playButton: {
245
263
  type: string;
246
264
  additionalProperties: boolean;
247
265
  properties: {
@@ -279,6 +297,10 @@ export declare const schemasForCustom: {
279
297
  };
280
298
  dataLens: {
281
299
  oneOf: ({
300
+ type: string;
301
+ optionName: string;
302
+ } | {
303
+ optionName: string;
282
304
  type: string;
283
305
  additionalProperties: boolean;
284
306
  required: string[];
@@ -291,8 +313,6 @@ export declare const schemasForCustom: {
291
313
  enum: string[];
292
314
  };
293
315
  };
294
- } | {
295
- type: string;
296
316
  })[];
297
317
  };
298
318
  fullscreen: {
@@ -377,11 +397,14 @@ export declare const schemasForCustom: {
377
397
  })[];
378
398
  };
379
399
  };
380
- } | {
400
+ } & {
401
+ optionName: string;
402
+ }) | {
381
403
  type: string;
382
404
  additionalProperties: boolean;
383
405
  required: import("@gravity-ui/page-constructor").Theme[];
384
406
  properties: {};
407
+ optionName: string;
385
408
  })[];
386
409
  };
387
410
  theme: {
@@ -536,6 +559,11 @@ export declare const schemasForCustom: {
536
559
  };
537
560
  title: {
538
561
  oneOf: ({
562
+ type: string;
563
+ contentType: string;
564
+ optionName: string;
565
+ } | {
566
+ optionName: string;
539
567
  type: string;
540
568
  additionalProperties: boolean;
541
569
  required: string[];
@@ -555,14 +583,13 @@ export declare const schemasForCustom: {
555
583
  type: string;
556
584
  };
557
585
  };
558
- } | {
559
- type: string;
560
- contentType: string;
586
+ contentType?: undefined;
561
587
  })[];
562
588
  };
563
589
  text: {
564
590
  type: string;
565
591
  contentType: string;
592
+ inputType: string;
566
593
  };
567
594
  additionalInfo: {
568
595
  type: string;
@@ -663,6 +690,7 @@ export declare const schemasForCustom: {
663
690
  } | {
664
691
  type: string;
665
692
  pattern: string;
693
+ optionName: string;
666
694
  })[];
667
695
  };
668
696
  color: {
@@ -676,6 +704,11 @@ export declare const schemasForCustom: {
676
704
  };
677
705
  title: {
678
706
  oneOf: ({
707
+ type: string;
708
+ contentType: string;
709
+ optionName: string;
710
+ } | {
711
+ optionName: string;
679
712
  type: string;
680
713
  additionalProperties: boolean;
681
714
  required: string[];
@@ -695,14 +728,13 @@ export declare const schemasForCustom: {
695
728
  type: string;
696
729
  };
697
730
  };
698
- } | {
699
- type: string;
700
- contentType: string;
731
+ contentType?: undefined;
701
732
  })[];
702
733
  };
703
734
  text: {
704
735
  type: string;
705
736
  contentType: string;
737
+ inputType: string;
706
738
  };
707
739
  additionalInfo: {
708
740
  type: string;
@@ -797,6 +829,11 @@ export declare const schemasForCustom: {
797
829
  properties: {
798
830
  title: {
799
831
  oneOf: ({
832
+ type: string;
833
+ contentType: string;
834
+ optionName: string;
835
+ } | {
836
+ optionName: string;
800
837
  type: string;
801
838
  additionalProperties: boolean;
802
839
  required: string[];
@@ -816,14 +853,13 @@ export declare const schemasForCustom: {
816
853
  type: string;
817
854
  };
818
855
  };
819
- } | {
820
- type: string;
821
- contentType: string;
856
+ contentType?: undefined;
822
857
  })[];
823
858
  };
824
859
  text: {
825
860
  type: string;
826
861
  contentType: string;
862
+ inputType: string;
827
863
  };
828
864
  additionalInfo: {
829
865
  type: string;
@@ -1045,7 +1081,8 @@ export declare const schemasForCustom: {
1045
1081
  type: string;
1046
1082
  };
1047
1083
  image: {
1048
- anyOf: ({
1084
+ oneOf: ({
1085
+ optionName: string;
1049
1086
  oneOf: ({
1050
1087
  type: string;
1051
1088
  properties: {
@@ -1056,7 +1093,10 @@ export declare const schemasForCustom: {
1056
1093
  } | {
1057
1094
  type: string;
1058
1095
  pattern: string;
1096
+ optionName: string;
1059
1097
  })[];
1098
+ type?: undefined;
1099
+ items?: undefined;
1060
1100
  } | {
1061
1101
  type: string;
1062
1102
  items: {
@@ -1070,8 +1110,10 @@ export declare const schemasForCustom: {
1070
1110
  } | {
1071
1111
  type: string;
1072
1112
  pattern: string;
1113
+ optionName: string;
1073
1114
  })[];
1074
1115
  };
1116
+ optionName: string;
1075
1117
  })[];
1076
1118
  };
1077
1119
  video: {
@@ -1086,7 +1128,8 @@ export declare const schemasForCustom: {
1086
1128
  };
1087
1129
  };
1088
1130
  loop: {
1089
- anyOf: ({
1131
+ oneOf: ({
1132
+ optionName: string;
1090
1133
  type: string;
1091
1134
  additionalProperties: boolean;
1092
1135
  required: string[];
@@ -1100,6 +1143,7 @@ export declare const schemasForCustom: {
1100
1143
  };
1101
1144
  } | {
1102
1145
  type: string;
1146
+ optionName: string;
1103
1147
  })[];
1104
1148
  };
1105
1149
  type: {
@@ -1109,13 +1153,13 @@ export declare const schemasForCustom: {
1109
1153
  muted: {
1110
1154
  type: string;
1111
1155
  };
1112
- playing: {
1156
+ autoplay: {
1113
1157
  type: string;
1114
1158
  };
1115
1159
  elapsedTime: {
1116
1160
  type: string;
1117
1161
  };
1118
- playIcon: {
1162
+ playButton: {
1119
1163
  type: string;
1120
1164
  additionalProperties: boolean;
1121
1165
  properties: {
@@ -1153,6 +1197,10 @@ export declare const schemasForCustom: {
1153
1197
  };
1154
1198
  dataLens: {
1155
1199
  oneOf: ({
1200
+ type: string;
1201
+ optionName: string;
1202
+ } | {
1203
+ optionName: string;
1156
1204
  type: string;
1157
1205
  additionalProperties: boolean;
1158
1206
  required: string[];
@@ -1165,8 +1213,6 @@ export declare const schemasForCustom: {
1165
1213
  enum: string[];
1166
1214
  };
1167
1215
  };
1168
- } | {
1169
- type: string;
1170
1216
  })[];
1171
1217
  };
1172
1218
  fullscreen: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/blog-constructor",
3
- "version": "4.1.0",
3
+ "version": "4.1.2",
4
4
  "description": "Gravity UI Blog Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -66,14 +66,14 @@
66
66
  "@doc-tools/transform": "^2.9.0",
67
67
  "@gravity-ui/uikit": "^4.1.0",
68
68
  "@gravity-ui/page-constructor": "^3.1.1",
69
- "react": "^16.0.0 || ^17.0.0 | ^18.0.0"
69
+ "react": "^16.0.0 || ^17.0.0 || ^18.0.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@babel/core": "^7.15.8",
73
73
  "@commitlint/config-conventional": "^17.4.3",
74
74
  "@doc-tools/transform": "^2.9.0",
75
75
  "@gravity-ui/eslint-config": "^2.0.0",
76
- "@gravity-ui/page-constructor": "^3.1.1",
76
+ "@gravity-ui/page-constructor": "^3.8.1",
77
77
  "@gravity-ui/prettier-config": "^1.0.1",
78
78
  "@gravity-ui/stylelint-config": "^1.0.0",
79
79
  "@gravity-ui/tsconfig": "^1.0.0",