@gravity-ui/page-constructor 1.22.0 → 1.22.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.22.1](https://github.com/gravity-ui/page-constructor/compare/v1.22.0...v1.22.1) (2023-03-07)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * add map block to text transform blocks [CLOUDFRONT-15094] ([#206](https://github.com/gravity-ui/page-constructor/issues/206)) ([a9323a1](https://github.com/gravity-ui/page-constructor/commit/a9323a1f895258af598106786157164ecde4a7fc))
9
+
3
10
  ## [1.22.0](https://github.com/gravity-ui/page-constructor/compare/v1.21.0...v1.22.0) (2023-03-07)
4
11
 
5
12
 
package/README.md CHANGED
@@ -298,3 +298,21 @@ enum PredefinedEventTypes {
298
298
  npm ci
299
299
  npm run dev
300
300
  ```
301
+
302
+ ## Release flow
303
+
304
+ In usual cases we use two types of commits:
305
+
306
+ 1. fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in Semantic Versioning).
307
+ 2. feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).
308
+ 3. BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
309
+
310
+ You can see all information [here](https://www.conventionalcommits.org/en/v1.0.0/).
311
+
312
+ When you receive the approval of your pull-request from the code owners and pass all the checks, please do the following:
313
+
314
+ 1. You should check if there is a release pull-request from robot with changes from another contributor (it looks like `chore(main): release 0.0.0`). If it exists, you should check why it is not merged. If the contributor agrees to release a shared version, follow the next step. If not, ask him to release his version, then follow the next step.
315
+ 2. Squash and merge your PR (It is important to release a new version with Github-Actions)
316
+ 3. Wait until robot creates a PR with a new version of the package and information about your changes in CHANGELOG.md. You can see the process on [the Actions tab](https://github.com/gravity-ui/page-constructor/actions).
317
+ 4. Check your changes in CHANGELOG.md and approve robot's PR.
318
+ 5. Squash and merge PR. You can see release process on [the Actions tab](https://github.com/gravity-ui/page-constructor/actions).
@@ -7,10 +7,10 @@ unpredictable css rules order in build */
7
7
  font-size: var(--yc-text-body-3-font-size);
8
8
  line-height: var(--yc-text-body-3-line-height);
9
9
  }
10
- .pc-block-header__description_titleSize_s {
10
+ .pc-block-header__description_titleSize_s, .pc-block-header__description_titleSize_xs {
11
11
  margin-top: 8px;
12
12
  }
13
- .pc-block-header__description_titleSize_s .yfm {
13
+ .pc-block-header__description_titleSize_s .yfm, .pc-block-header__description_titleSize_xs .yfm {
14
14
  font-size: var(--yc-text-body-2-font-size);
15
15
  line-height: var(--yc-text-body-2-line-height);
16
16
  }
@@ -1,4 +1,4 @@
1
- .pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s {
1
+ .pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s, .pc-title-block_size_xs {
2
2
  margin: 0;
3
3
  }
4
4
 
@@ -10,6 +10,12 @@ unpredictable css rules order in build */
10
10
  .pc-title-block_justify_end {
11
11
  text-align: right;
12
12
  }
13
+ .pc-title-block_size_xs {
14
+ font-size: var(--yc-text-body-3-font-size);
15
+ line-height: var(--yc-text-body-3-line-height);
16
+ color: var(--pc-text-header-color);
17
+ font-weight: var(--yc-text-accent-font-weight);
18
+ }
13
19
  .pc-title-block_size_s {
14
20
  font-size: var(--yc-text-header-1-font-size);
15
21
  line-height: var(--yc-text-header-1-line-height);
@@ -90,7 +96,7 @@ unpredictable css rules order in build */
90
96
  margin-top: 0;
91
97
  }
92
98
  @media (max-width: 577px) {
93
- .pc-title-block_size_l {
99
+ .pc-title-block_size_l:not(.pc-title-block_reset-margin) {
94
100
  margin-top: 48px;
95
101
  }
96
102
  }
@@ -1,5 +1,5 @@
1
1
  import { TextSize, TitleProps } from '../../models';
2
- export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24;
2
+ export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 12 | 20 | 24 | 40;
3
3
  export interface TitleFullProps extends TitleProps {
4
4
  className?: string;
5
5
  onClick?: () => void;
@@ -11,12 +11,14 @@ const mobileContext_1 = require("../../context/mobileContext");
11
11
  const b = (0, utils_1.block)('title-block');
12
12
  function getArrowSize(size, isMobile) {
13
13
  switch (size) {
14
+ case 'xs':
15
+ return 12;
14
16
  case 's':
15
17
  return 16;
16
18
  case 'm':
17
19
  return isMobile ? 20 : 24;
18
20
  case 'l':
19
- return isMobile ? 20 : 24;
21
+ return isMobile ? 24 : 40;
20
22
  default:
21
23
  return 20;
22
24
  }
@@ -38,7 +38,7 @@ export declare enum MediaVideoControlsType {
38
38
  Custom = "custom"
39
39
  }
40
40
  export type TextTheme = 'light' | 'dark';
41
- export type TextSize = 's' | 'm' | 'l';
41
+ export type TextSize = 'xs' | 's' | 'm' | 'l';
42
42
  export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
43
43
  export type HeaderWidth = 's' | 'm' | 'l';
44
44
  export type HeaderImageSize = 's' | 'm';
@@ -229,6 +229,13 @@ const config = {
229
229
  transformer: yfmTransformer,
230
230
  },
231
231
  ],
232
+ [models_1.BlockType.MapBlock]: [
233
+ ...blockHeaderTransfomer,
234
+ {
235
+ fields: ['title', 'additionalInfo'],
236
+ transformer: yfmTransformer,
237
+ },
238
+ ],
232
239
  [models_1.BlockType.TabsBlock]: [
233
240
  ...blockHeaderTransfomer,
234
241
  {
@@ -1,6 +1,6 @@
1
1
  import { ConstructorBlock } from '../models/constructor';
2
2
  import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
3
- export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
3
+ export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
4
4
  export declare function getBlockKey(block: ConstructorBlock, index: number): string;
5
5
  export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
6
6
  export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
@@ -8,6 +8,8 @@ function getHeaderTag(size) {
8
8
  return 'h1';
9
9
  case 's':
10
10
  return 'h4';
11
+ case 'xs':
12
+ return 'h5';
11
13
  case 'm':
12
14
  default:
13
15
  return 'h2';
@@ -7,10 +7,10 @@ unpredictable css rules order in build */
7
7
  font-size: var(--yc-text-body-3-font-size);
8
8
  line-height: var(--yc-text-body-3-line-height);
9
9
  }
10
- .pc-block-header__description_titleSize_s {
10
+ .pc-block-header__description_titleSize_s, .pc-block-header__description_titleSize_xs {
11
11
  margin-top: 8px;
12
12
  }
13
- .pc-block-header__description_titleSize_s .yfm {
13
+ .pc-block-header__description_titleSize_s .yfm, .pc-block-header__description_titleSize_xs .yfm {
14
14
  font-size: var(--yc-text-body-2-font-size);
15
15
  line-height: var(--yc-text-body-2-line-height);
16
16
  }
@@ -1,4 +1,4 @@
1
- .pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s {
1
+ .pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s, .pc-title-block_size_xs {
2
2
  margin: 0;
3
3
  }
4
4
 
@@ -10,6 +10,12 @@ unpredictable css rules order in build */
10
10
  .pc-title-block_justify_end {
11
11
  text-align: right;
12
12
  }
13
+ .pc-title-block_size_xs {
14
+ font-size: var(--yc-text-body-3-font-size);
15
+ line-height: var(--yc-text-body-3-line-height);
16
+ color: var(--pc-text-header-color);
17
+ font-weight: var(--yc-text-accent-font-weight);
18
+ }
13
19
  .pc-title-block_size_s {
14
20
  font-size: var(--yc-text-header-1-font-size);
15
21
  line-height: var(--yc-text-header-1-line-height);
@@ -90,7 +96,7 @@ unpredictable css rules order in build */
90
96
  margin-top: 0;
91
97
  }
92
98
  @media (max-width: 577px) {
93
- .pc-title-block_size_l {
99
+ .pc-title-block_size_l:not(.pc-title-block_reset-margin) {
94
100
  margin-top: 48px;
95
101
  }
96
102
  }
@@ -1,6 +1,6 @@
1
1
  import { TextSize, TitleProps } from '../../models';
2
2
  import './Title.css';
3
- export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24;
3
+ export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 12 | 20 | 24 | 40;
4
4
  export interface TitleFullProps extends TitleProps {
5
5
  className?: string;
6
6
  onClick?: () => void;
@@ -8,12 +8,14 @@ import './Title.css';
8
8
  const b = block('title-block');
9
9
  export function getArrowSize(size, isMobile) {
10
10
  switch (size) {
11
+ case 'xs':
12
+ return 12;
11
13
  case 's':
12
14
  return 16;
13
15
  case 'm':
14
16
  return isMobile ? 20 : 24;
15
17
  case 'l':
16
- return isMobile ? 20 : 24;
18
+ return isMobile ? 24 : 40;
17
19
  default:
18
20
  return 20;
19
21
  }
@@ -38,7 +38,7 @@ export declare enum MediaVideoControlsType {
38
38
  Custom = "custom"
39
39
  }
40
40
  export type TextTheme = 'light' | 'dark';
41
- export type TextSize = 's' | 'm' | 'l';
41
+ export type TextSize = 'xs' | 's' | 'm' | 'l';
42
42
  export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
43
43
  export type HeaderWidth = 's' | 'm' | 'l';
44
44
  export type HeaderImageSize = 's' | 'm';
@@ -223,6 +223,13 @@ const config = {
223
223
  transformer: yfmTransformer,
224
224
  },
225
225
  ],
226
+ [BlockType.MapBlock]: [
227
+ ...blockHeaderTransfomer,
228
+ {
229
+ fields: ['title', 'additionalInfo'],
230
+ transformer: yfmTransformer,
231
+ },
232
+ ],
226
233
  [BlockType.TabsBlock]: [
227
234
  ...blockHeaderTransfomer,
228
235
  {
@@ -1,6 +1,6 @@
1
1
  import { ConstructorBlock } from '../models/constructor';
2
2
  import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
3
- export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
3
+ export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
4
4
  export declare function getBlockKey(block: ConstructorBlock, index: number): string;
5
5
  export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
6
6
  export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
@@ -5,6 +5,8 @@ export function getHeaderTag(size) {
5
5
  return 'h1';
6
6
  case 's':
7
7
  return 'h4';
8
+ case 'xs':
9
+ return 'h5';
8
10
  case 'm':
9
11
  default:
10
12
  return 'h2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "1.22.0",
3
+ "version": "1.22.1-alpha.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -136,5 +136,8 @@
136
136
  "*.{json,yaml,yml,md}": [
137
137
  "prettier --write"
138
138
  ]
139
+ },
140
+ "publishConfig": {
141
+ "tag": "alpha"
139
142
  }
140
143
  }
@@ -38,7 +38,7 @@ export declare enum MediaVideoControlsType {
38
38
  Custom = "custom"
39
39
  }
40
40
  export type TextTheme = 'light' | 'dark';
41
- export type TextSize = 's' | 'm' | 'l';
41
+ export type TextSize = 'xs' | 's' | 'm' | 'l';
42
42
  export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
43
43
  export type HeaderWidth = 's' | 'm' | 'l';
44
44
  export type HeaderImageSize = 's' | 'm';
@@ -242,6 +242,13 @@ const config = {
242
242
  transformer: yfmTransformer,
243
243
  },
244
244
  ],
245
+ [models_1.BlockType.MapBlock]: [
246
+ ...blockHeaderTransfomer,
247
+ {
248
+ fields: ['title', 'additionalInfo'],
249
+ transformer: yfmTransformer,
250
+ },
251
+ ],
245
252
  [models_1.BlockType.TabsBlock]: [
246
253
  ...blockHeaderTransfomer,
247
254
  {
@@ -1,6 +1,6 @@
1
1
  import { ConstructorBlock } from '../models/constructor';
2
2
  import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
3
- export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
3
+ export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
4
4
  export declare function getBlockKey(block: ConstructorBlock, index: number): string;
5
5
  export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
6
6
  export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
@@ -8,6 +8,8 @@ function getHeaderTag(size) {
8
8
  return 'h1';
9
9
  case 's':
10
10
  return 'h4';
11
+ case 'xs':
12
+ return 'h5';
11
13
  case 'm':
12
14
  default:
13
15
  return 'h2';
@@ -141,15 +141,17 @@
141
141
  }
142
142
 
143
143
  @mixin label($size: m) {
144
- @include text-size(body-1);
144
+ @if $size == m {
145
+ @include text-size(body-1);
145
146
 
146
- $label-height: 20px;
147
+ $label-height: 20px;
147
148
 
148
- display: inline-block;
149
- padding: 0 8px;
150
- border-radius: 2px;
151
- height: $label-height;
152
- line-height: $label-height;
149
+ display: inline-block;
150
+ padding: 0 8px;
151
+ border-radius: 2px;
152
+ height: $label-height;
153
+ line-height: $label-height;
154
+ }
153
155
 
154
156
  @if $size == s {
155
157
  @include text-size(caption-2);