@aws/mynah-ui 2.0.0-beta.2 → 2.0.0-beta.3

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.
@@ -4,7 +4,6 @@
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../../helper/dom';
6
6
  export interface CharPromptInputProps {
7
- onStopChatResponse?: () => void;
8
7
  showFeedbackButton?: boolean;
9
8
  }
10
9
  export declare class ChatPromptInput {
@@ -13,15 +12,13 @@ export declare class ChatPromptInput {
13
12
  private readonly promptTextInputWrapper;
14
13
  private readonly promptTextInput;
15
14
  private readonly promptTextInputSizer;
16
- private sendButton;
15
+ private readonly sendButton;
17
16
  private readonly clearButton;
18
- private readonly loading;
19
- private readonly onStopChatResponse;
17
+ private loading;
20
18
  private attachment?;
21
19
  constructor(props?: CharPromptInputProps);
22
- private readonly getButton;
23
20
  private readonly handleInputKeydown;
24
21
  private readonly calculateTextAreaHeight;
25
22
  private readonly resetTextAreaHeight;
26
- private readonly triggerSearch;
23
+ private readonly sendPrompt;
27
24
  }
@@ -11,7 +11,7 @@ export interface ChatWrapperProps {
11
11
  export declare class ChatWrapper {
12
12
  private readonly props?;
13
13
  private readonly chatItemsContainer;
14
- private readonly spinner;
14
+ private readonly intermediateBlockContainer;
15
15
  private readonly promptInput;
16
16
  private lastChatItemCard;
17
17
  private containerScollState;
@@ -9,7 +9,7 @@ import 'prismjs/components/prism-java';
9
9
  import 'prismjs/components/prism-javascript';
10
10
  import 'prismjs/components/prism-json';
11
11
  import 'prismjs/plugins/line-numbers/prism-line-numbers.js';
12
- import { OnCopiedToClipboardFunction, SupportedCodingLanguagesType } from '../static';
12
+ import { OnCopiedToClipboardFunction, OnInsertToCursorPositionFunction, SupportedCodingLanguagesType } from '../static';
13
13
  export declare const highlighters: {
14
14
  start: {
15
15
  markup: string;
@@ -39,11 +39,14 @@ export interface SyntaxHighlighterProps {
39
39
  startingLineNumber?: number;
40
40
  showCopyOptions?: boolean;
41
41
  onCopiedToClipboard?: OnCopiedToClipboardFunction;
42
+ onInsertToCursorPosition?: OnInsertToCursorPositionFunction;
42
43
  }
43
44
  export declare class SyntaxHighlighter {
44
45
  private readonly code;
45
46
  private readonly onCopiedToClipboard?;
47
+ private readonly onInsertToCursorPosition?;
46
48
  render: ExtendedHTMLElement;
47
49
  constructor(props: SyntaxHighlighterProps);
50
+ private readonly getSelectedCode;
48
51
  private readonly copyToClipboard;
49
52
  }
package/dist/main.d.ts CHANGED
@@ -24,7 +24,8 @@ export interface MynahUIProps {
24
24
  onNavigationTabChange?: (selectedTab: string) => void;
25
25
  onSideNavigationTabChange?: (selectedTab: string) => void;
26
26
  onSuggestionEngagement?: (engagement: SuggestionEngagement) => void;
27
- onSuggestionClipboardInteraction?: (suggestionId: string, type?: string, text?: string) => void;
27
+ onCopyCodeToClipboard?: (code?: string, type?: 'selection' | 'block') => void;
28
+ onCodeInsertToCursorPosition?: (code?: string, type?: 'selection' | 'block') => void;
28
29
  onSuggestionInteraction?: (eventName: SuggestionEventName, suggestion: Suggestion, mouseEvent?: MouseEvent) => void;
29
30
  onSendFeedback?: (feedbackPayload: FeedbackPayload) => void;
30
31
  }