@aws/mynah-ui 4.27.0 → 4.28.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/dist/static.d.ts CHANGED
@@ -345,6 +345,7 @@ export interface ChatItem extends ChatItemContent {
345
345
  type: ChatItemType;
346
346
  messageId?: string;
347
347
  snapToTop?: boolean;
348
+ autoCollapse?: boolean;
348
349
  canBeVoted?: boolean;
349
350
  fullWidth?: boolean;
350
351
  padding?: boolean;
package/docs/DATAMODEL.md CHANGED
@@ -1154,6 +1154,7 @@ interface ChatItem extends ChatItemContent{
1154
1154
  type: ChatItemType;
1155
1155
  messageId?: string;
1156
1156
  snapToTop?: boolean;
1157
+ autoCollapse?: boolean;
1157
1158
  canBeVoted?: boolean;
1158
1159
  icon?: MynahIcons;
1159
1160
  hoverEffect?: boolean;
@@ -1969,6 +1970,29 @@ mkdir -p src/ lalalaaaa
1969
1970
  **Note:** Keep in mind that, if the `padding` is set to `false`, code blocks inside body will not show language if there are also no actions specified for them. So, if you turn of `copy` and `insert-to-cursor` by setting them to `null` in `codeBlockActions`, it will also hide the language bar if the card padding is false.
1970
1971
 
1971
1972
 
1973
+ ---
1974
+
1975
+ ## `autoCollapse`
1976
+ It will allow you to limit the card height up to 25% of the screen height and give an option to expand/collapse it back.
1977
+
1978
+ ```typescript
1979
+ mynahUI.addChatItem(tabId, {
1980
+ autoCollapse: true,
1981
+ fullWidth: true,
1982
+ type: ChatItemType.ANSWER,
1983
+ body: `Hello from MynahUI:
1984
+ .....
1985
+ `,
1986
+ });
1987
+ ```
1988
+
1989
+ <p align="center">
1990
+ <img src="./img/data-model/chatItems/autoCollapse.png" alt="autoCollapse" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
1991
+ </p>
1992
+
1993
+ **Note:** Keep in mind that, when you enable `autoCollapse`, code blocks will not be collapsed by default. To avoid multiple inner collapsed items inside a collapsed item.
1994
+
1995
+
1972
1996
  ---
1973
1997
 
1974
1998
  ## `codeBlockActions`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws/mynah-ui",
3
3
  "displayName": "AWS Mynah UI",
4
- "version": "4.27.0",
4
+ "version": "4.28.0",
5
5
  "description": "AWS Toolkit VSCode and Intellij IDE Extension Mynah UI",
6
6
  "publisher": "Amazon Web Services",
7
7
  "license": "Apache License 2.0",