@gravity-ui/page-constructor 1.22.0-alpha.0 → 1.22.1
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 +7 -0
- package/build/cjs/components/Title/Title.css +2 -8
- package/build/cjs/components/Title/Title.d.ts +1 -1
- package/build/cjs/components/Title/Title.js +2 -4
- package/build/cjs/models/constructor-items/common.d.ts +1 -1
- package/build/cjs/text-transform/blocks.js +7 -0
- package/build/cjs/utils/blocks.d.ts +1 -1
- package/build/cjs/utils/blocks.js +0 -2
- package/build/esm/components/Title/Title.css +2 -8
- package/build/esm/components/Title/Title.d.ts +1 -1
- package/build/esm/components/Title/Title.js +2 -4
- package/build/esm/models/constructor-items/common.d.ts +1 -1
- package/build/esm/text-transform/blocks.js +7 -0
- package/build/esm/utils/blocks.d.ts +1 -1
- package/build/esm/utils/blocks.js +0 -2
- package/package.json +1 -4
- package/server/models/constructor-items/common.d.ts +1 -1
- package/server/text-transform/blocks.js +7 -0
- package/server/utils/blocks.d.ts +1 -1
- package/server/utils/blocks.js +0 -2
- package/styles/mixins.scss +7 -9
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
|
|
|
@@ -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 {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -10,12 +10,6 @@ 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
|
-
}
|
|
19
13
|
.pc-title-block_size_s {
|
|
20
14
|
font-size: var(--yc-text-header-1-font-size);
|
|
21
15
|
line-height: var(--yc-text-header-1-line-height);
|
|
@@ -96,7 +90,7 @@ unpredictable css rules order in build */
|
|
|
96
90
|
margin-top: 0;
|
|
97
91
|
}
|
|
98
92
|
@media (max-width: 577px) {
|
|
99
|
-
.pc-title-block_size_l
|
|
93
|
+
.pc-title-block_size_l {
|
|
100
94
|
margin-top: 48px;
|
|
101
95
|
}
|
|
102
96
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextSize, TitleProps } from '../../models';
|
|
2
|
-
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 |
|
|
2
|
+
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24;
|
|
3
3
|
export interface TitleFullProps extends TitleProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
onClick?: () => void;
|
|
@@ -11,14 +11,12 @@ 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 10;
|
|
16
14
|
case 's':
|
|
17
|
-
return 16;
|
|
15
|
+
return 16;
|
|
18
16
|
case 'm':
|
|
19
17
|
return isMobile ? 20 : 24;
|
|
20
18
|
case 'l':
|
|
21
|
-
return isMobile ?
|
|
19
|
+
return isMobile ? 20 : 24;
|
|
22
20
|
default:
|
|
23
21
|
return 20;
|
|
24
22
|
}
|
|
@@ -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 = '
|
|
41
|
+
export type TextSize = '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";
|
|
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) => {
|
|
@@ -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 {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -10,12 +10,6 @@ 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
|
-
}
|
|
19
13
|
.pc-title-block_size_s {
|
|
20
14
|
font-size: var(--yc-text-header-1-font-size);
|
|
21
15
|
line-height: var(--yc-text-header-1-line-height);
|
|
@@ -96,7 +90,7 @@ unpredictable css rules order in build */
|
|
|
96
90
|
margin-top: 0;
|
|
97
91
|
}
|
|
98
92
|
@media (max-width: 577px) {
|
|
99
|
-
.pc-title-block_size_l
|
|
93
|
+
.pc-title-block_size_l {
|
|
100
94
|
margin-top: 48px;
|
|
101
95
|
}
|
|
102
96
|
}
|
|
@@ -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 |
|
|
3
|
+
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24;
|
|
4
4
|
export interface TitleFullProps extends TitleProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
onClick?: () => void;
|
|
@@ -8,14 +8,12 @@ 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 10;
|
|
13
11
|
case 's':
|
|
14
|
-
return 16;
|
|
12
|
+
return 16;
|
|
15
13
|
case 'm':
|
|
16
14
|
return isMobile ? 20 : 24;
|
|
17
15
|
case 'l':
|
|
18
|
-
return isMobile ?
|
|
16
|
+
return isMobile ? 20 : 24;
|
|
19
17
|
default:
|
|
20
18
|
return 20;
|
|
21
19
|
}
|
|
@@ -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 = '
|
|
41
|
+
export type TextSize = '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";
|
|
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) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -136,8 +136,5 @@
|
|
|
136
136
|
"*.{json,yaml,yml,md}": [
|
|
137
137
|
"prettier --write"
|
|
138
138
|
]
|
|
139
|
-
},
|
|
140
|
-
"publishConfig": {
|
|
141
|
-
"tag": "alpha"
|
|
142
139
|
}
|
|
143
140
|
}
|
|
@@ -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 = '
|
|
41
|
+
export type TextSize = '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
|
{
|
package/server/utils/blocks.d.ts
CHANGED
|
@@ -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";
|
|
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) => {
|
package/server/utils/blocks.js
CHANGED
package/styles/mixins.scss
CHANGED
|
@@ -141,17 +141,15 @@
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
@mixin label($size: m) {
|
|
144
|
-
@
|
|
145
|
-
@include text-size(body-1);
|
|
144
|
+
@include text-size(body-1);
|
|
146
145
|
|
|
147
|
-
|
|
146
|
+
$label-height: 20px;
|
|
148
147
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
148
|
+
display: inline-block;
|
|
149
|
+
padding: 0 8px;
|
|
150
|
+
border-radius: 2px;
|
|
151
|
+
height: $label-height;
|
|
152
|
+
line-height: $label-height;
|
|
155
153
|
|
|
156
154
|
@if $size == s {
|
|
157
155
|
@include text-size(caption-2);
|