@aws/mynah-ui 2.0.0-beta.13.2 → 2.0.0-beta.13.4

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.
@@ -15,6 +15,7 @@ export declare class ChatPromptInput {
15
15
  private readonly promptTextInputSizer;
16
16
  private readonly promptTextInputCommand;
17
17
  private readonly sendButton;
18
+ private readonly codeSnippet;
18
19
  private quickActionCommands;
19
20
  private commandSelector;
20
21
  private commandSelectorOpen;
@@ -29,5 +30,6 @@ export declare class ChatPromptInput {
29
30
  private readonly calculateTextAreaHeight;
30
31
  private readonly resetTextAreaHeight;
31
32
  readonly clearTextArea: () => void;
33
+ readonly addText: (textToAdd: string) => void;
32
34
  private readonly sendPrompt;
33
35
  }
@@ -12,6 +12,7 @@ export declare class ChatWrapper {
12
12
  private readonly props;
13
13
  private readonly chatItemsContainer;
14
14
  private readonly intermediateBlockContainer;
15
+ private readonly promptInputElement;
15
16
  private readonly promptInput;
16
17
  private readonly promptInfo;
17
18
  private lastChatItemCard;
@@ -19,4 +20,5 @@ export declare class ChatWrapper {
19
20
  constructor(props: ChatWrapperProps);
20
21
  private readonly insertChatItem;
21
22
  updateLastChatAnswer: (chatItem: Partial<ChatItem>) => void;
23
+ addToPrompt: (textToAdd: string) => void;
22
24
  }
@@ -0,0 +1,14 @@
1
+ import { ExtendedHTMLElement } from '../../../helper/dom';
2
+ export interface ICodeSnippetWidgetProps {
3
+ tabId: string;
4
+ markdownText: string;
5
+ }
6
+ export declare class CodeSnippetWidget {
7
+ private readonly props;
8
+ private previewOverlay;
9
+ render: ExtendedHTMLElement;
10
+ constructor(props: ICodeSnippetWidgetProps);
11
+ private readonly showPreviewOverLay;
12
+ private readonly closePreviewOverLay;
13
+ private readonly renderCodeSnippetWidget;
14
+ }
@@ -0,0 +1,14 @@
1
+ import { ExtendedHTMLElement } from '../../../helper/dom';
2
+ export interface ICodeSnippetProps {
3
+ tabId: string;
4
+ }
5
+ export interface ISelectCodeSnippetEvent {
6
+ tabId: string;
7
+ selectedCodeSnippet?: string;
8
+ }
9
+ export declare class CodeSnippet {
10
+ private readonly props;
11
+ render: ExtendedHTMLElement;
12
+ constructor(props: ICodeSnippetProps);
13
+ readonly clear: () => void;
14
+ }
@@ -7,7 +7,7 @@ import { ReferenceTrackerInformation, Suggestion } from '../../static';
7
7
  export declare const highlightersWithTooltip: {
8
8
  start: {
9
9
  markupStart: string;
10
- markupAttirubtes: (markerIndex: string) => string;
10
+ markupAttributes: (markerIndex: string) => string;
11
11
  markupEnd: string;
12
12
  };
13
13
  end: {
package/dist/main.d.ts CHANGED
@@ -18,13 +18,13 @@ export interface MynahUIProps {
18
18
  onStopChatResponse?: (tabId: string) => void;
19
19
  onResetStore?: (tabId: string) => void;
20
20
  onChatPrompt?: (tabId: string, prompt: ChatPrompt) => void;
21
- onFollowUpClicked?: (tabId: string, followUp: ChatItemFollowUp) => void;
21
+ onFollowUpClicked?: (tabId: string, messageId: string, followUp: ChatItemFollowUp) => void;
22
22
  onTabChange?: (tabId: string) => void;
23
23
  onTabAdd?: (tabId: string) => void;
24
24
  onTabRemove?: (tabId: string) => void;
25
25
  onSuggestionEngagement?: (tabId: string, engagement: SuggestionEngagement) => void;
26
- onCopyCodeToClipboard?: (tabId: string, code?: string, type?: 'selection' | 'block', referenceTrackerInformation?: ReferenceTrackerInformation[]) => void;
27
- onCodeInsertToCursorPosition?: (tabId: string, code?: string, type?: 'selection' | 'block', referenceTrackerInformation?: ReferenceTrackerInformation[]) => void;
26
+ onCopyCodeToClipboard?: (tabId: string, messageId: string, code?: string, type?: 'selection' | 'block', referenceTrackerInformation?: ReferenceTrackerInformation[]) => void;
27
+ onCodeInsertToCursorPosition?: (tabId: string, messageId: string, code?: string, type?: 'selection' | 'block', referenceTrackerInformation?: ReferenceTrackerInformation[]) => void;
28
28
  onSuggestionInteraction?: (tabId: string, eventName: SuggestionEventName, suggestion: Suggestion, mouseEvent?: MouseEvent) => void;
29
29
  onSendFeedback?: (tabId: string, feedbackPayload: FeedbackPayload) => void;
30
30
  onOpenDiff?: (tabId: string, leftPath: string, rightPath: string, messageId?: string) => void;
@@ -41,6 +41,7 @@ export declare class MynahUI {
41
41
  createNewTab: (initialTabData: MynahUIDataModel) => string;
42
42
  updateTab: (tabId: string, tabData: MynahUIDataModel) => void;
43
43
  setChatLoadingState: (tabId: string, isLoading: boolean) => void;
44
+ addToUserPrompt: (tabId: string, prompt: string) => void;
44
45
  addChatItem: (tabId: string, chatItem: ChatItem) => void;
45
46
  updateLastChatAnswer: (tabId: string, updateWith: Partial<ChatItem>) => void;
46
47
  updateStore: (tabId: string | '', data: MynahUIDataModel) => string;