You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* changed the maximum number of bubbles that can be included in a carousel
* add box justifyContent and alignItems property
* add box background
* change flex image size
* change flex icon, text and span size
* add flex text and button adjustMode
* add deprecated to flex spacer
Co-authored-by: xingo xu <xingoxu@users.noreply.github.com>
Copy file name to clipboardExpand all lines: lib/types.ts
+107-2Lines changed: 107 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -890,7 +890,7 @@ export type FlexBlockStyle = {
890
890
exporttypeFlexCarousel={
891
891
type: "carousel";
892
892
/**
893
-
* (Max: 10 bubbles)
893
+
* (Max: 12 bubbles)
894
894
*/
895
895
contents: FlexBubble[];
896
896
};
@@ -1061,6 +1061,25 @@ export type FlexBox = {
1061
1061
* Specify an [action object](https://developers.line.biz/en/reference/messaging-api/#action-objects).
1062
1062
*/
1063
1063
action?: Action;
1064
+
/**
1065
+
* How child elements are aligned along the main axis of the parent element. If the
1066
+
* parent element is a horizontal box, this only takes effect when its child elements have
1067
+
* their `flex` property set equal to 0. For more information, see [Arranging a box's child elements and free space](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#justify-property)
1068
+
* in the Messaging API documentation.
1069
+
*/
1070
+
justifyContent?:
1071
+
|"flex-start"
1072
+
|"center"
1073
+
|"flex-end"
1074
+
|"space-between"
1075
+
|"space-around"
1076
+
|"space-evenly";
1077
+
/**
1078
+
* How child elements are aligned along the cross axis of the parent element. For more
1079
+
* information, see [Arranging a box's child elements and free space](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#justify-property) in the Messaging API documentation.
1080
+
*/
1081
+
alignItems?: "flex-start"|"center"|"flex-end";
1082
+
background?: Background;
1064
1083
}&Offset;
1065
1084
1066
1085
exporttypeOffset={
@@ -1095,6 +1114,49 @@ export type Offset = {
1095
1114
offsetEnd?: string;
1096
1115
};
1097
1116
1117
+
exporttypeBackground={
1118
+
/**
1119
+
* The type of background used. Specify these values:
1120
+
* - `linearGradient`: Linear gradient. For more information, see [Linear gradient backgrounds](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#linear-gradient-bg) in the Messaging API documentation.
1121
+
*/
1122
+
type: "linearGradient";
1123
+
/**
1124
+
* The angle at which a linear gradient moves. Specify the angle using an integer value
1125
+
* like `90deg` (90 degrees) or a decimal number like `23.5deg` (23.5 degrees) in the
1126
+
* half-open interval [0, 360). The direction of the linear gradient rotates clockwise as the
1127
+
* angle increases. Given a value of `0deg`, the gradient starts at the bottom and ends at
1128
+
* the top; given a value of `45deg`, the gradient starts at the bottom-left corner and ends
1129
+
* at the top-right corner; given a value of 90deg, the gradient starts at the left and ends
1130
+
* at the right; and given a value of `180deg`, the gradient starts at the top and ends at
1131
+
* the bottom. For more information, see [Direction (angle) of linear gradient backgrounds](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#linear-gradient-bg-angle) in the Messaging API documentation.
1132
+
*/
1133
+
angle: string;
1134
+
/**
1135
+
* The color at the gradient's starting point. Use a hexadecimal color code in the
1136
+
* `#RRGGBB` or `#RRGGBBAA` format.
1137
+
*/
1138
+
startColor: string;
1139
+
/**
1140
+
* The color at the gradient's ending point. Use a hexadecimal color code in the
1141
+
* `#RRGGBB` or `#RRGGBBAA` format.
1142
+
*/
1143
+
endColor: string;
1144
+
/**
1145
+
* The color in the middle of the gradient. Use a hexadecimal color code in the `#RRGGBB`
1146
+
* or `#RRGGBBAA` format. Specify a value for the `background.centerColor` property to
1147
+
* create a gradient that has three colors. For more information, see [Intermediate color stops for linear gradients](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#linear-gradient-bg-center-color) in the
1148
+
* Messaging API documentation.
1149
+
*/
1150
+
centerColor?: string;
1151
+
/**
1152
+
* The position of the intermediate color stop. Specify an integer or decimal value
1153
+
* between `0%` (the starting point) and `100%` (the ending point). This is `50%` by
1154
+
* default. For more information, see [Intermediate color stops for linear gradients](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#linear-gradient-bg-center-color) in the
1155
+
* Messaging API documentation.
1156
+
*/
1157
+
centerPosition?: string;
1158
+
};
1159
+
1098
1160
/**
1099
1161
* This component draws a button.
1100
1162
*
@@ -1163,6 +1225,18 @@ export type FlexButton = {
1163
1225
* property will be ignored.
1164
1226
*/
1165
1227
gravity?: "top"|"bottom"|"center";
1228
+
/**
1229
+
* The method by which to adjust the text font size. Specify this value:
1230
+
*
1231
+
* - `shrink-to-fit`: Automatically shrink the font
1232
+
* size to fit the width of the component. This
1233
+
* property takes a "best-effort" approach that may
1234
+
* work differently—or not at all!—on some platforms.
1235
+
* For more information, see [Automatically shrink fonts to fit](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#adjusts-fontsize-to-fit)
1236
+
* in the Messaging API documentation.
1237
+
* - LINE 10.13.0 or later for iOS and Android
1238
+
*/
1239
+
adjustMode?: "shrink-to-fit";
1166
1240
}&Offset;
1167
1241
1168
1242
/**
@@ -1209,8 +1283,10 @@ export type FlexIcon = {
1209
1283
* Maximum size of the icon width.
1210
1284
* The size increases in the order of listing.
1211
1285
* The default value is `md`.
1286
+
* For more information, see [Icon, text, and span size](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#other-component-size) in the Messaging API documentation.
1212
1287
*/
1213
1288
size?:
1289
+
|string
1214
1290
|"xxs"
1215
1291
|"xs"
1216
1292
|"sm"
@@ -1292,8 +1368,10 @@ export type FlexImage = {
1292
1368
* Maximum size of the image width.
1293
1369
* The size increases in the order of listing.
1294
1370
* The default value is `md`.
1371
+
* For more information, see [Image size](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#image-size) in the Messaging API documentation.
1295
1372
*/
1296
1373
size?:
1374
+
|string
1297
1375
|"xxs"
1298
1376
|"xs"
1299
1377
|"sm"
@@ -1361,6 +1439,7 @@ export type FlexSeparator = {
1361
1439
/**
1362
1440
* This is an invisible component that places a fixed-size space at the
1363
1441
* beginning or end of the box.
1442
+
* @deprecated
1364
1443
*/
1365
1444
exporttypeFlexSpacer={
1366
1445
type: "spacer";
@@ -1379,6 +1458,18 @@ export type FlexText = {
1379
1458
* Array of spans. Be sure to set either one of the `text` property or `contents` property. If you set the `contents` property, `text` is ignored.
1380
1459
*/
1381
1460
contents?: FlexSpan[];
1461
+
/**
1462
+
* The method by which to adjust the text font size. Specify this value:
1463
+
*
1464
+
* - `shrink-to-fit`: Automatically shrink the font
1465
+
* size to fit the width of the component. This
1466
+
* property takes a "best-effort" approach that may
1467
+
* work differently—or not at all!—on some platforms.
1468
+
* For more information, see [Automatically shrink fonts to fit](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#adjusts-fontsize-to-fit)
1469
+
* in the Messaging API documentation.
1470
+
* - LINE 10.13.0 or later for iOS and Android
1471
+
*/
1472
+
adjustMode?: "shrink-to-fit";
1382
1473
/**
1383
1474
* The ratio of the width or height of this box within the parent box.
1384
1475
*
@@ -1405,8 +1496,10 @@ export type FlexText = {
1405
1496
* Font size.
1406
1497
* The size increases in the order of listing.
1407
1498
* The default value is `md`.
1499
+
* For more information, see [Icon, text, and span size](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#other-component-size) in the Messaging API documentation.
1408
1500
*/
1409
1501
size?:
1502
+
|string
1410
1503
|"xxs"
1411
1504
|"xs"
1412
1505
|"sm"
@@ -1504,8 +1597,20 @@ export type FlexSpan = {
1504
1597
color?: string;
1505
1598
/**
1506
1599
* Font size. You can specify one of the following values: `xxs`, `xs`, `sm`, `md`, `lg`, `xl`, `xxl`, `3xl`, `4xl`, or `5xl`. The size increases in the order of listing. The default value is `md`.
1600
+
* For more information, see [Icon, text, and span size](https://developers.line.biz/en/docs/messaging-api/flex-message-layout/#other-component-size) in the Messaging API documentation.
1507
1601
*/
1508
-
size?: string;
1602
+
size?:
1603
+
|string
1604
+
|"xxs"
1605
+
|"xs"
1606
+
|"sm"
1607
+
|"md"
1608
+
|"lg"
1609
+
|"xl"
1610
+
|"xxl"
1611
+
|"3xl"
1612
+
|"4xl"
1613
+
|"5xl";
1509
1614
/**
1510
1615
* Font weight. You can specify one of the following values: `regular` or `bold`. Specifying `bold` makes the font bold. The default value is `regular`.
0 commit comments