@aws/mynah-ui 2.0.0-beta.4 → 2.0.0-beta.6

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
@@ -2,23 +2,34 @@
2
2
  * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- import { ToggleOption } from './components/toggle';
5
+ export interface QuickActionCommandGroup {
6
+ groupName?: string;
7
+ commands: Array<{
8
+ command: string;
9
+ description?: string;
10
+ promptText?: string;
11
+ }>;
12
+ }
6
13
  export interface MynahUIDataModel {
7
- loading?: boolean;
8
14
  loadingChat?: boolean;
9
15
  showChatAvatars?: boolean;
10
- chatMessageOnTopOfSearchResults?: string;
11
- navigationTabs?: ToggleOption[];
12
- sideNavigationTabs?: ToggleOption[];
13
- mode?: MynahMode;
14
- suggestions?: Suggestion[];
16
+ quickActionCommands?: QuickActionCommandGroup[];
17
+ promptInputPlaceholder?: string;
18
+ promptInputDisabledState?: boolean;
15
19
  chatItems?: ChatItem[];
16
20
  }
21
+ export interface MynahUITabStoreTab {
22
+ tabTitle?: string;
23
+ isSelected?: boolean;
24
+ store?: MynahUIDataModel;
25
+ }
26
+ export interface MynahUITabStoreModel {
27
+ [tabId: string]: MynahUITabStoreTab;
28
+ }
17
29
  export declare enum MynahEventNames {
18
30
  RESET_STORE = "resetStore",
19
- SEARCH = "search",
20
31
  FEEDBACK_SET = "feedbackSet",
21
- SUGGESTION_VOTE = "suggestionVote",
32
+ CARD_VOTE = "cardVote",
22
33
  SUGGESTION_OPEN = "suggestionOpen",
23
34
  SUGGESTION_LINK_COPY = "suggestionLinkCopy",
24
35
  SUGGESTION_ENGAGEMENT = "suggestionEngagement",
@@ -28,7 +39,6 @@ export declare enum MynahEventNames {
28
39
  FOLLOW_UP_CLICKED = "followUpClicked",
29
40
  SUGGESTION_ATTACHED_TO_CHAT = "suggestionAttachedToChat",
30
41
  UPDATE_LAST_CHAT_ANSWER_STREAM = "updateLastChatAnswerStream",
31
- CLEAR_CHAT = "clearChat",
32
42
  SHOW_MORE_WEB_RESULTS_CLICK = "showMoreWebResultsClick",
33
43
  SHOW_FEEDBACK_FORM_CLICK = "showFeedbackFormClick",
34
44
  OPEN_DIFF = "openDiff"
@@ -39,30 +49,6 @@ export declare const MynahPortalNames: {
39
49
  OVERLAY: string;
40
50
  FEEDBACK_FORM: string;
41
51
  };
42
- export interface SearchPayloadMatchPolicy {
43
- must: string[];
44
- should: string[];
45
- mustNot: string[];
46
- }
47
- export interface SearchPayloadCodeSelection {
48
- selectedCode: string;
49
- file?: {
50
- range: {
51
- start: {
52
- row: string;
53
- column: string;
54
- };
55
- end: {
56
- row: string;
57
- column: string;
58
- };
59
- };
60
- name: string;
61
- };
62
- }
63
- export interface SearchPayload {
64
- selectedTab?: string;
65
- }
66
52
  export interface SuggestionMetaData {
67
53
  stars?: number;
68
54
  forks?: number;
@@ -73,18 +59,13 @@ export interface SuggestionMetaData {
73
59
  lastActivityDate?: number;
74
60
  }
75
61
  export declare type SuggestionMetaDataUnion = Record<string, SuggestionMetaData>;
76
- export interface CanonicalExample {
77
- canonicalExample: {
78
- body: string;
79
- url: string;
80
- };
81
- }
82
62
  export interface Suggestion {
83
63
  title: string;
84
- url: string;
64
+ id?: string;
65
+ url?: string;
85
66
  body?: string;
86
67
  type?: string;
87
- metadata?: SuggestionMetaDataUnion | CanonicalExample;
68
+ metadata?: SuggestionMetaDataUnion;
88
69
  }
89
70
  export declare enum ChatItemType {
90
71
  PROMPT = "prompt",
@@ -96,7 +77,7 @@ export declare enum ChatItemType {
96
77
  CODE_RESULT = "code-result"
97
78
  }
98
79
  export interface ChatItem {
99
- body?: string;
80
+ body?: string | string[];
100
81
  type: ChatItemType;
101
82
  id?: string;
102
83
  canBeVoted?: boolean;
@@ -121,10 +102,6 @@ export interface ChatItemFollowUp extends ChatPrompt {
121
102
  type?: string;
122
103
  pillText: string;
123
104
  }
124
- export declare enum MynahMode {
125
- CHAT = "chat",
126
- SEARCH = "search"
127
- }
128
105
  export declare enum KeyMap {
129
106
  ESCAPE = "Escape",
130
107
  ENTER = "Enter",
@@ -143,7 +120,8 @@ export declare enum KeyMap {
143
120
  TAB = "Tab",
144
121
  SHIFT = "Shift",
145
122
  CONTROL = "Control",
146
- ALT = "Alt"
123
+ ALT = "Alt",
124
+ SLASH = "/"
147
125
  }
148
126
  export declare const SupportedCodingLanguages: string[];
149
127
  declare type ElementType<T extends readonly unknown[]> = T extends ReadonlyArray<infer ElementType> ? ElementType : never;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws/mynah-ui",
3
3
  "displayName": "AWS Mynah UI",
4
- "version": "2.0.0-beta.4",
4
+ "version": "2.0.0-beta.6",
5
5
  "description": "AWS Tookit VSCode and Intellij IDE Extension Mynah UI",
6
6
  "publisher": "Amazon Web Services",
7
7
  "license": "Apache License 2.0",
@@ -1,20 +0,0 @@
1
- /*!
2
- * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- import { ExtendedHTMLElement } from '../helper/dom';
6
- import { Suggestion } from '../static';
7
- export interface MainContainerProps {
8
- onNavigationTabChange?: (selectedTab: string) => void;
9
- onCloseButtonClick?: () => void;
10
- }
11
- export declare class MainContainer {
12
- private readonly navTabs;
13
- private readonly cardsWrapper;
14
- private readonly skeletonWrapper;
15
- private readonly mainContainer;
16
- render: ExtendedHTMLElement;
17
- constructor(props: MainContainerProps);
18
- clearCards: () => void;
19
- updateCards: (suggestions: Suggestion[]) => void;
20
- }
@@ -1,13 +0,0 @@
1
- /*!
2
- * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- import { ExtendedHTMLElement } from '../helper/dom';
6
- import { NavivationTabsProps } from './navigation-tabs';
7
- export declare class NavivationTabsVertical {
8
- render: ExtendedHTMLElement;
9
- private readonly props;
10
- constructor(props: NavivationTabsProps);
11
- private readonly setLoading;
12
- private readonly getTabsRender;
13
- }
@@ -1,10 +0,0 @@
1
- /*!
2
- * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- import { ExtendedHTMLElement } from '../helper/dom';
6
- export declare class QueryTextShortView {
7
- render: ExtendedHTMLElement;
8
- private readonly textBlock;
9
- constructor();
10
- }
@@ -1,13 +0,0 @@
1
- /*!
2
- * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- import { SearchPayload } from '../static';
6
- export interface PayloadTransformRule {
7
- targetRoute: string[];
8
- method: 'add' | 'remove' | 'set';
9
- value?: any;
10
- values?: any[];
11
- }
12
- export declare const transformPayloadData: (rules: PayloadTransformRule[], payloadData: SearchPayload) => SearchPayload;
13
- export declare const validateRulesOnPayloadData: (rules: PayloadTransformRule[], payloadData: SearchPayload) => boolean;