@aws/mynah-ui 4.14.1 → 4.15.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/docs/DATAMODEL.md CHANGED
@@ -269,7 +269,7 @@ const mynahUI = new MynahUI({
269
269
  mynahUI.updateStore('tab-1', {
270
270
  contextCommands: [
271
271
  {
272
- groupName: 'Metion code',
272
+ groupName: 'Mention code',
273
273
  commands:[
274
274
  {
275
275
  command: '@ws',
@@ -2134,7 +2134,7 @@ mynahUI.notify({
2134
2134
  ---
2135
2135
 
2136
2136
  ## ChatPrompt
2137
- This is the object model which will be send along with the `onChatPrompt` event.
2137
+ This is the object model which will be sent along with the `onChatPrompt` event.
2138
2138
 
2139
2139
  ```typescript
2140
2140
  export interface ChatPrompt {
@@ -11,6 +11,7 @@ export interface MynahUIProps {
11
11
  messageId: string,
12
12
  eventId?: string) => void;
13
13
  onReady?: () => void;
14
+ onFocusStateChanged?: (focusState: boolean) => void;
14
15
  onVote?: (
15
16
  tabId: string,
16
17
  messageId: string,
@@ -299,6 +300,20 @@ onReady: () => {
299
300
 
300
301
  ---
301
302
 
303
+ ### `onFocusStateChanged`
304
+
305
+ This event will be fired whenever user targets to MynahUI or wents away.
306
+
307
+ ```typescript
308
+ ...
309
+ onFocusStateChanged: (focusState: boolean) => {
310
+ console.log(`MynahUI is ${focusState ? 'focused' : 'not focused'}.`);
311
+ };
312
+ ...
313
+ ```
314
+
315
+ ---
316
+
302
317
  ### `onVote`
303
318
 
304
319
  This event will be fired when end user clicks one of the thumbs up or down buttons to vote the answer. It will pass the arguments `tabId`, `messageId` and the `vote`.
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.14.1",
4
+ "version": "4.15.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",