@aws/mynah-ui 4.5.6 → 4.6.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/components/card/card-body.d.ts +3 -1
- package/dist/components/chat-item/chat-item-card.d.ts +3 -2
- package/dist/components/chat-item/chat-wrapper.d.ts +6 -1
- package/dist/main.d.ts +4 -2
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +7 -0
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ export interface CardBodyProps {
|
|
|
22
22
|
childLocation?: 'above-body' | 'below-body';
|
|
23
23
|
highlightRangeWithTooltip?: ReferenceTrackerInformation[];
|
|
24
24
|
useParts?: boolean;
|
|
25
|
+
codeBlockStartIndex?: number;
|
|
25
26
|
processChildren?: boolean;
|
|
26
27
|
onLinkClick?: (url: string, e: MouseEvent) => void;
|
|
27
28
|
onCopiedToClipboard?: OnCopiedToClipboardFunction;
|
|
@@ -30,9 +31,10 @@ export interface CardBodyProps {
|
|
|
30
31
|
export declare class CardBody {
|
|
31
32
|
render: ExtendedHTMLElement;
|
|
32
33
|
props: CardBodyProps;
|
|
34
|
+
nextCodeBlockIndex: number;
|
|
35
|
+
codeBlockStartIndex: number;
|
|
33
36
|
private highlightRangeTooltip;
|
|
34
37
|
private highlightRangeTooltipTimeout;
|
|
35
|
-
private nextCodeBlockIndex;
|
|
36
38
|
constructor(props: CardBodyProps);
|
|
37
39
|
private readonly processNode;
|
|
38
40
|
private readonly getReferenceTrackerInformationFromElement;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
-
import { ChatItem } from '../../static';
|
|
6
|
+
import { CardRenderDetails, ChatItem } from '../../static';
|
|
7
7
|
import { CardBody } from '../card/card-body';
|
|
8
8
|
import { ChatItemTreeViewWrapper } from './chat-item-tree-view-wrapper';
|
|
9
9
|
import { ChatItemFormItemsWrapper } from './chat-item-form-items';
|
|
@@ -15,7 +15,7 @@ export interface ChatItemCardProps {
|
|
|
15
15
|
export declare class ChatItemCard {
|
|
16
16
|
readonly props: ChatItemCardProps;
|
|
17
17
|
render: ExtendedHTMLElement;
|
|
18
|
-
contentBody: CardBody;
|
|
18
|
+
contentBody: CardBody | null;
|
|
19
19
|
chatAvatar: ExtendedHTMLElement;
|
|
20
20
|
updateStack: Array<Partial<ChatItem>>;
|
|
21
21
|
chatFormItems: ChatItemFormItemsWrapper | null;
|
|
@@ -36,4 +36,5 @@ export declare class ChatItemCard {
|
|
|
36
36
|
private readonly getInsertingTypewriterPartsCss;
|
|
37
37
|
readonly updateCard: () => void;
|
|
38
38
|
readonly updateCardStack: (updateWith: Partial<ChatItem>) => void;
|
|
39
|
+
readonly getRenderDetails: () => CardRenderDetails;
|
|
39
40
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
-
import { ChatItem } from '../../static';
|
|
6
|
+
import { CardRenderDetails, ChatItem } from '../../static';
|
|
7
7
|
export interface ChatWrapperProps {
|
|
8
8
|
onStopChatResponse?: (tabId: string) => void;
|
|
9
9
|
tabId: string;
|
|
@@ -22,6 +22,11 @@ export declare class ChatWrapper {
|
|
|
22
22
|
constructor(props: ChatWrapperProps);
|
|
23
23
|
private readonly insertChatItem;
|
|
24
24
|
updateLastChatAnswer: (updateWith: Partial<ChatItem>) => void;
|
|
25
|
+
getChatItem: (messageId: string) => {
|
|
26
|
+
chatItem: ChatItem;
|
|
27
|
+
render: ExtendedHTMLElement | HTMLElement;
|
|
28
|
+
renderDetails: CardRenderDetails;
|
|
29
|
+
} | undefined;
|
|
25
30
|
updateChatAnswerWithMessageId: (messageId: string, updateWith: Partial<ChatItem>) => void;
|
|
26
31
|
addToPrompt: (textToAdd: string) => void;
|
|
27
32
|
}
|
package/dist/main.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
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 {
|
|
5
|
+
import { ExtendedHTMLElement } from './helper/dom';
|
|
6
|
+
import { RelevancyVoteType, FeedbackPayload, MynahUIDataModel, NotificationType, ChatItem, ChatItemAction, ChatPrompt, MynahUITabStoreModel, MynahUITabStoreTab, ConfigModel, ReferenceTrackerInformation, CodeSelectionType, Engagement, ChatItemFormItem, ChatItemButton, CardRenderDetails } from './static';
|
|
6
7
|
import './styles/styles.scss';
|
|
7
8
|
export { ChatItemBodyRenderer, } from './helper/dom';
|
|
8
9
|
export { AllowedAttributesInCustomRenderer, AllowedTagsInCustomRenderer } from './helper/sanitize';
|
|
@@ -47,9 +48,9 @@ export interface MynahUIProps {
|
|
|
47
48
|
onTabBarButtonClick?: (tabId: string, buttonId: string, eventId?: string) => void;
|
|
48
49
|
}
|
|
49
50
|
export declare class MynahUI {
|
|
51
|
+
render: ExtendedHTMLElement;
|
|
50
52
|
private lastEventId;
|
|
51
53
|
private readonly props;
|
|
52
|
-
private readonly wrapper;
|
|
53
54
|
private readonly tabsWrapper;
|
|
54
55
|
private readonly tabContentsWrapper;
|
|
55
56
|
private readonly feedbackForm?;
|
|
@@ -61,6 +62,7 @@ export declare class MynahUI {
|
|
|
61
62
|
addChatItem: (tabId: string, chatItem: ChatItem) => void;
|
|
62
63
|
updateLastChatAnswer: (tabId: string, updateWith: Partial<ChatItem>) => void;
|
|
63
64
|
updateChatAnswerWithMessageId: (tabId: string, messageId: string, updateWith: Partial<ChatItem>) => void;
|
|
65
|
+
endMessageStream: (tabId: string, messageId: string, updateWith?: Partial<ChatItem>) => CardRenderDetails;
|
|
64
66
|
selectTab: (tabId: string, eventId: string) => void;
|
|
65
67
|
removeTab: (tabId: string, eventId: string) => void;
|
|
66
68
|
updateStore: (tabId: string | '', data: MynahUIDataModel) => string | undefined;
|