@epam/ai-dial-conversation-messages 1.2.0-dev.99 → 1.3.0-dev.5

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.
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
2
  import { MessageActionsProps } from '../../models/message-actions';
3
- /** Context-sensitive action bar — shows edit/delete for user messages and regenerate/copy/like/dislike for assistant messages. */
3
+ /** Context-sensitive action bar — shows copy/edit/delete for user messages and regenerate/copy/like/dislike for assistant messages. */
4
4
  export declare const MessageActions: FC<MessageActionsProps>;
5
5
  //# sourceMappingURL=MessageActions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageActions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageActions/MessageActions.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAAE,EAAE,EAAyB,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAKxE,kIAAkI;AAClI,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAuNlD,CAAC"}
1
+ {"version":3,"file":"MessageActions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageActions/MessageActions.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAAE,EAAE,EAAyB,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAKxE,uIAAuI;AACvI,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAuOlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/AssistantMessageBubble.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAGpC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAY/E,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAgNlE,CAAC"}
1
+ {"version":3,"file":"AssistantMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/AssistantMessageBubble.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAGpC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAa/E,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAiOlE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/MessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAKtE,wGAAwG;AACxG,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAsChD,CAAC"}
1
+ {"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/MessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAKtE,wGAAwG;AACxG,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAyChD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/UserMessageBubble.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,EAAE,EAAS,MAAM,OAAO,CAAC;AAElC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAO1E,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAmKxD,CAAC"}
1
+ {"version":3,"file":"UserMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/UserMessageBubble.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,EAAE,EAAS,MAAM,OAAO,CAAC;AAElC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAQ1E,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAqKxD,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { FC, RefObject } from 'react';
2
+ /** Color overrides for the Reply action. */
3
+ export interface MessageSelectionReplyColors {
4
+ /** Button background. Falls back to `--bg-layer-raised`. */
5
+ background?: string;
6
+ /** Hover background. Falls back to `--bg-layer-base`. */
7
+ hoverBackground?: string;
8
+ /** Label and icon color. Falls back to `--text-primary`. */
9
+ text?: string;
10
+ }
11
+ /** Typography overrides for the Reply action. */
12
+ export interface MessageSelectionReplyTypography {
13
+ /** Button label class. Defaults to `'dial-small-text'`. */
14
+ fontClassName?: string;
15
+ }
16
+ /** Appearance overrides for the Reply action. */
17
+ export interface MessageSelectionReplyStyles {
18
+ /** Button colors, applied as CSS custom properties. */
19
+ colors?: MessageSelectionReplyColors;
20
+ /** Button label typography. */
21
+ typography?: MessageSelectionReplyTypography;
22
+ /** Extra classes on the floating root, for example a host stacking level. */
23
+ className?: string;
24
+ /** Extra classes on the button. */
25
+ buttonClassName?: string;
26
+ }
27
+ /** Localized strings rendered by {@link MessageSelectionReply}. */
28
+ export interface MessageSelectionReplyLabels {
29
+ /** Visible and accessible Reply action label. */
30
+ reply: string;
31
+ /** Polite announcement when a selection becomes actionable. */
32
+ selectionAvailable: string;
33
+ /** Polite announcement after the composer accepts a Reply attachment. */
34
+ attachmentAdded: string;
35
+ }
36
+ /** Props accepted by {@link MessageSelectionReply}. */
37
+ export interface MessageSelectionReplyProps {
38
+ /** Visible selection rectangle. Omit to unmount the action. */
39
+ rect: DOMRect | undefined;
40
+ /** Receives the floating action root. */
41
+ actionRef: RefObject<HTMLDivElement | null>;
42
+ /** Creates an attachment from the captured selection. */
43
+ onReply: () => void;
44
+ /** Increments after the composer accepts a Reply attachment. */
45
+ addedRevision: number;
46
+ /** Localized button and announcement strings. */
47
+ labels: MessageSelectionReplyLabels;
48
+ /** Appearance overrides for the floating action. */
49
+ styles?: MessageSelectionReplyStyles;
50
+ /** Same-document portal destination. Defaults to `document.body`; null defers rendering. */
51
+ portalContainer?: HTMLElement | null;
52
+ }
53
+ /** Offers Reply beside a native selection while leaving browser selection controls intact. */
54
+ export declare const MessageSelectionReply: FC<MessageSelectionReplyProps>;
55
+ //# sourceMappingURL=MessageSelectionReply.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageSelectionReply.d.ts","sourceRoot":"","sources":["../../../src/components/MessageSelectionReply/MessageSelectionReply.tsx"],"names":[],"mappings":"AAQA,OAAO,EAA6B,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3E,4CAA4C;AAC5C,MAAM,WAAW,2BAA2B;IAC1C,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,iDAAiD;AACjD,MAAM,WAAW,+BAA+B;IAC9C,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,iDAAiD;AACjD,MAAM,WAAW,2BAA2B;IAC1C,uDAAuD;IACvD,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,+BAA+B;IAC/B,UAAU,CAAC,EAAE,+BAA+B,CAAC;IAC7C,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,mEAAmE;AACnE,MAAM,WAAW,2BAA2B;IAC1C,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,yEAAyE;IACzE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,uDAAuD;AACvD,MAAM,WAAW,0BAA0B;IACzC,+DAA+D;IAC/D,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,yCAAyC;IACzC,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC5C,yDAAyD;IACzD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gEAAgE;IAChE,aAAa,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,MAAM,EAAE,2BAA2B,CAAC;IACpC,oDAAoD;IACpD,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,4FAA4F;IAC5F,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACtC;AAED,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAmGhE,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
- ._activeRating_ygoee_1{color:var(--ma-active-rating-text,var(--text-accent,#1d4ed8))}._userBubble_cq829_1{border-color:var(--cm-bubble-user-border,var(--stroke-secondary,#d1dbea));background:var(--cm-bubble-user-bg,var(--bg-layer-sunken,#eef1f7))}._collapsibleText_cq829_6{max-height:var(--cm-bubble-collapsed-height);transition:max-height .2s ease-out}._expandedText_cq829_11{max-height:var(--cm-bubble-expanded-height)}._collapsedText_cq829_15:after{content:"";pointer-events:none;background:linear-gradient(to bottom, var(--cm-bubble-fade-start,var(--shadow-xs-2,#161b2d08)), var(--cm-bubble-user-bg,var(--bg-layer-sunken,#eef1f7)));height:3rem;position:absolute;bottom:0;left:0;right:0}@media (prefers-reduced-motion:reduce){._collapsibleText_cq829_6{transition:none}}._startersDivider_cq829_26{border-color:var(--cm-starters-divider,var(--stroke-secondary,#d1dbea))}._text_cq829_30{color:var(--cm-bubble-text,var(--text-primary,#161b2d))}
2
- /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.collapse{visibility:collapse}.static{position:static}.absolute{position:absolute}.relative{position:relative}.start-0{inset-inline-start:0}.top-0{top:0}.me-1{margin-inline-end:.25rem}.ms-auto{margin-inline-start:auto}.mt-3{margin-top:.75rem}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[40px\]{min-width:40px}.max-w-\[640px\]{max-width:640px}.max-w-full{max-width:100%}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.overflow-hidden{overflow:hidden}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-ee-2xl{border-end-end-radius:1rem}.rounded-ee-md{border-end-end-radius:.375rem}.rounded-es-2xl{border-end-start-radius:1rem}.rounded-se-2xl{border-start-end-radius:1rem}.rounded-se-md{border-start-end-radius:.375rem}.rounded-ss-2xl{border-start-start-radius:1rem}.border{border-width:1px}.border-t{border-top-width:1px}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-bottom:1rem;padding-top:1rem}.pt-5{padding-top:1.25rem}.text-start{text-align:start}.opacity-0{opacity:0}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.group:hover .group-hover\:opacity-100{opacity:1}.\[\&\>\.cm-bubble-markdown\>div\>\*\:first-child\]\:indent-\[var\(--cm-bubble-first-line-indent\2c 0px\)\]>.cm-bubble-markdown>div>:first-child{text-indent:var(--cm-bubble-first-line-indent,0)}
1
+ ._activeRating_ygoee_1{color:var(--ma-active-rating-text,var(--text-accent,#1d4ed8))}._userBubble_cq829_1{border-color:var(--cm-bubble-user-border,var(--stroke-secondary,#d1dbea));background:var(--cm-bubble-user-bg,var(--bg-layer-sunken,#eef1f7))}._collapsibleText_cq829_6{max-height:var(--cm-bubble-collapsed-height);transition:max-height .2s ease-out}._expandedText_cq829_11{max-height:var(--cm-bubble-expanded-height)}._collapsedText_cq829_15:after{content:"";pointer-events:none;background:linear-gradient(to bottom, var(--cm-bubble-fade-start,var(--shadow-xs-2,#161b2d08)), var(--cm-bubble-user-bg,var(--bg-layer-sunken,#eef1f7)));height:3rem;position:absolute;bottom:0;left:0;right:0}@media (prefers-reduced-motion:reduce){._collapsibleText_cq829_6{transition:none}}._startersDivider_cq829_26{border-color:var(--cm-starters-divider,var(--stroke-secondary,#d1dbea))}._text_cq829_30{color:var(--cm-bubble-text,var(--text-primary,#161b2d))}._button_tqo4d_3._button_tqo4d_3{color:var(--cm-reply-text,var(--text-primary,#161b2d));background:var(--cm-reply-background,var(--bg-layer-raised,#fcfcfc))!important}._button_tqo4d_3._button_tqo4d_3:hover{color:var(--cm-reply-text,var(--text-primary,#161b2d));background:var(--cm-reply-hover-background,var(--bg-layer-base,#f5f7fa))!important}
2
+ /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.start-0{inset-inline-start:0}.top-0{top:0}.z-50{z-index:50}.-me-1{margin-inline-end:-.25rem}.-ms-1{margin-inline-start:-.25rem}.ms-auto{margin-inline-start:auto}.mt-3{margin-top:.75rem}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.h-8{height:2rem}.min-h-8{min-height:2rem}.w-\[calc\(100\%\+8px\)\]{width:calc(100% + 8px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-11{min-width:2.75rem}.min-w-\[40px\]{min-width:40px}.max-w-\[640px\]{max-width:640px}.max-w-\[calc\(100vw-16px\)\]{max-width:calc(100vw - 16px)}.max-w-full{max-width:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.overflow-hidden{overflow:hidden}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-ee-2xl{border-end-end-radius:1rem}.rounded-ee-md{border-end-end-radius:.375rem}.rounded-es-2xl{border-end-start-radius:1rem}.rounded-se-2xl{border-start-end-radius:1rem}.rounded-se-md{border-start-end-radius:.375rem}.rounded-ss-2xl{border-start-start-radius:1rem}.border{border-width:1px}.border-t{border-top-width:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-bottom:1rem;padding-top:1rem}.pe-1{padding-inline-end:.25rem}.ps-1{padding-inline-start:.25rem}.pt-5{padding-top:1.25rem}.text-start{text-align:start}.opacity-0{opacity:0}.shadow-lg{--tw-shadow:0 8px 44px 0 var(--shadow-lg,#2764d914);--tw-shadow-colored:0 8px 44px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.group:hover .group-hover\:opacity-100{opacity:1}@media (max-width:1279px){.mobile\:h-11{height:2.75rem}.mobile\:min-h-11{min-height:2.75rem}}.rtl\:scale-x-\[-1\]:where([dir=rtl],[dir=rtl] *){--tw-scale-x:-1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>\.cm-bubble-markdown\>div\>\*\:first-child\]\:indent-\[var\(--cm-bubble-first-line-indent\2c 0px\)\]>.cm-bubble-markdown>div>:first-child{text-indent:var(--cm-bubble-first-line-indent,0)}
package/index.d.ts CHANGED
@@ -4,8 +4,10 @@ export { UserMessageBubble } from './components/MessageBubble/UserMessageBubble'
4
4
  export { AssistantMessageBubble } from './components/MessageBubble/AssistantMessageBubble';
5
5
  export { StatusMessageBubble } from './components/MessageBubble/StatusMessageBubble';
6
6
  export { MessageActions } from './components/MessageActions/MessageActions';
7
+ export { MessageSelectionReply } from './components/MessageSelectionReply/MessageSelectionReply';
7
8
  export { BubblePosition } from './types/bubble-position';
8
9
  export type { MessageBubbleProps, UserMessageBubbleProps, AssistantMessageBubbleProps, MessageBubbleStyles, MessageBubbleColors, MessageBubbleTypography, MessageBubbleLabels, AssistantMessageBubbleLabels, } from './models/message-bubble';
10
+ export type { MessageSelectionReplyColors, MessageSelectionReplyLabels, MessageSelectionReplyProps, MessageSelectionReplyStyles, MessageSelectionReplyTypography, } from './components/MessageSelectionReply/MessageSelectionReply';
9
11
  export type { StatusMessageBubbleLabels, StatusMessageBubbleProps, } from './components/MessageBubble/StatusMessageBubble';
10
12
  export type { MessageActionsProps, MessageActionColors, MessageActionLabels, MessageActionTooltips, MessageActionAriaLabels, } from './models/message-actions';
11
13
  export type { MessageSourceProps, MessageSourceLabels, MessageSourceStyles, MessageSourceColors, MessageSourceTypography, } from './models/message-source';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,gDAAgD,CAAC;AACxD,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,0DAA0D,CAAC;AAClE,YAAY,EACV,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,gDAAgD,CAAC;AACxD,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC"}
package/index.js CHANGED
@@ -1,16 +1,17 @@
1
- import { AttachmentType as e, CopyIconButton as t, DeploymentIcon as n, MDMessageViewer as r, MessageRating as i, MessageRole as a, buildCssVars as o, mergeClasses as s, useCollapsedText as c } from "@epam/ai-dial-chat-shared";
2
- import { AttachmentGroup as l } from "@epam/ai-dial-attachment-input";
3
- import { DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, ElementSize as f, InfoMessageNotification as p, LinkButton as m, NeutralButton as h, ToggleIconButton as g } from "@epam/ai-dial-ui-kit";
4
- import { useCallback as _, useEffect as v, useId as y, useMemo as b, useRef as x, useState as S } from "react";
5
- import { IconChevronDown as C, IconChevronUp as w, IconMarkdown as T, IconPencilMinus as E, IconRefresh as D, IconThumbDown as O, IconThumbDownFilled as k, IconThumbUp as A, IconThumbUpFilled as j, IconTrashX as M } from "@tabler/icons-react";
6
- import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
1
+ import { AttachmentType as e, CopyIconButton as t, DeploymentIcon as n, MDMessageViewer as r, MessageRating as i, MessageRole as a, ResponseFormat as o, buildCssVars as s, mergeClasses as c, useCollapsedText as l } from "@epam/ai-dial-chat-shared";
2
+ import { AttachmentGroup as u } from "@epam/ai-dial-attachment-input";
3
+ import { Button as d, ButtonVariant as f, DIAL_ICON_SIZE as p, DIAL_KIT_ICON_STROKE as m, ElementSize as h, GhostIconButton as g, InfoMessageNotification as _, LinkButton as v, NeutralButton as y } from "@epam/ai-dial-ui-kit";
4
+ import { useCallback as b, useEffect as x, useId as S, useLayoutEffect as C, useMemo as ee, useRef as w, useState as T } from "react";
5
+ import { IconArrowBackUp as E, IconChevronDown as D, IconChevronUp as O, IconMarkdown as k, IconPencilMinus as A, IconRefresh as j, IconThumbDown as M, IconThumbDownFilled as N, IconThumbUp as P, IconThumbUpFilled as te, IconTrashX as ne } from "@tabler/icons-react";
6
+ import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
7
+ import { createPortal as R } from "react-dom";
7
8
  //#region src/constants/public-class-names.ts
8
- var I = {
9
+ var z = {
9
10
  userBubble: "dial-cm-user-bubble",
10
11
  assistantContent: "dial-cm-assistant-content"
11
- }, L = 4, R = (e) => {
12
- let t = x(null), [n, r] = S(0);
13
- return v(() => {
12
+ }, B = 4, V = (e) => {
13
+ let t = w(null), [n, r] = T(0);
14
+ return x(() => {
14
15
  if (!e) return;
15
16
  let n = t.current;
16
17
  if (n == null) return;
@@ -21,324 +22,457 @@ var I = {
21
22
  return i.observe(n), () => i.disconnect();
22
23
  }, [e]), {
23
24
  slotRef: t,
24
- firstLineIndent: e ? `calc(${n}px + ${L}px)` : void 0
25
+ firstLineIndent: e ? `calc(${n}px + ${B}px)` : void 0
25
26
  };
26
- }, z = { activeRating: "_activeRating_ygoee_1" }, B = 2e3, V = ({ role: e = a.User, onEdit: n, onEditHover: r, onDelete: c, onRegenerate: l, onCopy: p, onCopyMarkdown: m, onLike: h, onDislike: v, activeRating: y, isAlwaysVisible: b, isDisabled: x = !1, className: C, labels: w, colors: I }) => {
27
- let { tooltips: L, ariaLabels: R } = w ?? {}, [V, H] = S(null), [U, W] = S(""), G = n != null || c != null || l != null || p != null || m != null || h != null || v != null, K = o({ "--ma-active-rating-text": I?.activeRatingText }), q = _(() => {
28
- p?.(), H("copy"), W(R?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => H(null), B);
29
- }, [p, R?.copiedStatus]), J = _(() => {
30
- m?.(), H("markdown"), W(R?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => H(null), B);
31
- }, [m, R?.copiedMarkdownStatus]);
32
- return G ? /* @__PURE__ */ F("div", {
27
+ }, H = [
28
+ "href",
29
+ "src",
30
+ "alt",
31
+ "colspan",
32
+ "rowspan",
33
+ "start"
34
+ ], U = new Set([
35
+ "pre",
36
+ "pre-wrap",
37
+ "pre-line",
38
+ "break-spaces"
39
+ ]), W = (e) => {
40
+ let t = document.createElement(e.tagName.toLowerCase());
41
+ H.forEach((n) => {
42
+ let r = e.getAttribute(n);
43
+ r !== null && t.setAttribute(n, r);
44
+ });
45
+ let { whiteSpace: n } = window.getComputedStyle(e);
46
+ return U.has(n) && (t.style.whiteSpace = "pre-wrap"), t;
47
+ }, G = (e) => e instanceof SVGElement || window.getComputedStyle(e).display === "none", K = (e, t) => {
48
+ if (!t.intersectsNode(e)) return null;
49
+ if (e.nodeType === Node.TEXT_NODE) {
50
+ let n = e.data, r = e === t.startContainer ? t.startOffset : 0, i = e === t.endContainer ? t.endOffset : n.length;
51
+ return document.createTextNode(n.slice(r, i));
52
+ }
53
+ if (!(e instanceof Element) || G(e)) return null;
54
+ let n = W(e);
55
+ return e.childNodes.forEach((e) => {
56
+ let r = K(e, t);
57
+ r && n.appendChild(r);
58
+ }), n;
59
+ }, re = (e, t, n) => {
60
+ let r = e, i = t;
61
+ for (; i && i !== n && n.contains(i);) {
62
+ let e = W(i);
63
+ e.appendChild(r), r = e, i = i.parentElement;
64
+ }
65
+ return r;
66
+ }, ie = (e, t) => {
67
+ let n = e.commonAncestorContainer, r = n instanceof Element ? n : n.parentElement;
68
+ if (!r) return null;
69
+ let i = K(r, e);
70
+ return i ? re(i, r.parentElement, t) : null;
71
+ }, ae = (e) => {
72
+ let t = window.getSelection();
73
+ if (!t || t.isCollapsed || t.rangeCount === 0 || !e.clipboardData) return;
74
+ let n = t.toString();
75
+ if (!n) return;
76
+ let r = document.createElement("div");
77
+ for (let n = 0; n < t.rangeCount; n++) {
78
+ let i = ie(t.getRangeAt(n), e.currentTarget);
79
+ i && r.appendChild(i);
80
+ }
81
+ e.clipboardData.setData("text/html", r.innerHTML), e.clipboardData.setData("text/plain", n), e.preventDefault();
82
+ }, q = { activeRating: "_activeRating_ygoee_1" }, J = 2e3, oe = ({ role: e = a.User, onEdit: n, onEditHover: r, onDelete: o, onRegenerate: l, onCopy: u, onCopyMarkdown: d, onLike: f, onDislike: _, activeRating: v, isAlwaysVisible: y, isDisabled: x = !1, className: S, labels: C, colors: ee }) => {
83
+ let { tooltips: w, ariaLabels: E } = C ?? {}, [D, O] = T(null), [R, z] = T(""), B = n != null || o != null || l != null || u != null || d != null || f != null || _ != null, V = s({ "--ma-active-rating-text": ee?.activeRatingText }), H = b(() => {
84
+ u?.(), O("copy"), z(e === a.User ? E?.copiedMessageStatus ?? "Message copied to clipboard" : E?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => O(null), J);
85
+ }, [
86
+ u,
87
+ e,
88
+ E?.copiedStatus,
89
+ E?.copiedMessageStatus
90
+ ]), U = b(() => {
91
+ d?.(), O("markdown"), z(E?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => O(null), J);
92
+ }, [d, E?.copiedMarkdownStatus]);
93
+ return B ? /* @__PURE__ */ L("div", {
33
94
  role: "toolbar",
34
- "aria-label": R?.actionsGroup ?? "Message actions",
35
- style: K,
36
- className: s("flex gap-1", !b && "opacity-0 group-hover:opacity-100", C),
37
- children: [/* @__PURE__ */ P("span", {
95
+ "aria-label": E?.actionsGroup ?? "Message actions",
96
+ style: V,
97
+ className: c("flex gap-1", !y && "opacity-0 group-hover:opacity-100", S),
98
+ children: [/* @__PURE__ */ I("span", {
38
99
  role: "status",
39
100
  "aria-live": "polite",
40
101
  className: "sr-only",
41
- children: U
42
- }), e === a.User ? /* @__PURE__ */ F(N, { children: [n && /* @__PURE__ */ P(g, {
43
- icon: /* @__PURE__ */ P(E, {
44
- size: u.SM,
45
- "aria-hidden": !0,
46
- stroke: d
102
+ children: R
103
+ }), e === a.User ? /* @__PURE__ */ L(F, { children: [
104
+ u && /* @__PURE__ */ I(t, {
105
+ iconSize: p.SM,
106
+ onClick: H,
107
+ size: h.Small,
108
+ isCopied: D === "copy",
109
+ copyLabel: w?.copyMessage ?? "Copy message",
110
+ copiedLabel: w?.copied ?? "Copied!",
111
+ ariaLabel: E?.copyMessage ?? "Copy message",
112
+ isDisabled: x
47
113
  }),
48
- size: f.Small,
49
- "aria-label": R?.editMessage ?? "Edit message",
50
- tooltipProps: { tooltip: L?.edit ?? "Edit" },
51
- onClick: n,
52
- onMouseEnter: r,
53
- onFocus: r,
54
- disabled: x
55
- }), c && /* @__PURE__ */ P(g, {
56
- icon: /* @__PURE__ */ P(M, {
57
- size: u.SM,
58
- "aria-hidden": !0,
59
- stroke: d
114
+ n && /* @__PURE__ */ I(g, {
115
+ icon: /* @__PURE__ */ I(A, {
116
+ size: p.SM,
117
+ "aria-hidden": !0,
118
+ stroke: m
119
+ }),
120
+ size: h.Small,
121
+ "aria-label": E?.editMessage ?? "Edit message",
122
+ tooltipProps: { tooltip: w?.edit ?? "Edit" },
123
+ onClick: n,
124
+ onMouseEnter: r,
125
+ onFocus: r,
126
+ disabled: x
60
127
  }),
61
- size: f.Small,
62
- "aria-label": R?.deleteMessage ?? "Delete message",
63
- tooltipProps: { tooltip: L?.delete ?? "Delete" },
64
- onClick: c,
65
- disabled: x
66
- })] }) : /* @__PURE__ */ F(N, { children: [
67
- l && /* @__PURE__ */ P(g, {
68
- icon: /* @__PURE__ */ P(D, {
69
- size: u.SM,
128
+ o && /* @__PURE__ */ I(g, {
129
+ icon: /* @__PURE__ */ I(ne, {
130
+ size: p.SM,
131
+ "aria-hidden": !0,
132
+ stroke: m
133
+ }),
134
+ size: h.Small,
135
+ "aria-label": E?.deleteMessage ?? "Delete message",
136
+ tooltipProps: { tooltip: w?.delete ?? "Delete" },
137
+ onClick: o,
138
+ disabled: x
139
+ })
140
+ ] }) : /* @__PURE__ */ L(F, { children: [
141
+ l && /* @__PURE__ */ I(g, {
142
+ icon: /* @__PURE__ */ I(j, {
143
+ size: p.SM,
70
144
  "aria-hidden": !0,
71
- stroke: d
145
+ stroke: m
72
146
  }),
73
- size: f.Small,
74
- "aria-label": R?.regenerateResponse ?? "Regenerate response",
75
- tooltipProps: { tooltip: L?.regenerate ?? "Regenerate" },
147
+ size: h.Small,
148
+ "aria-label": E?.regenerateResponse ?? "Regenerate response",
149
+ tooltipProps: { tooltip: w?.regenerate ?? "Regenerate" },
76
150
  onClick: l,
77
151
  disabled: x
78
152
  }),
79
- p && /* @__PURE__ */ P(t, {
80
- iconSize: u.SM,
81
- onClick: q,
82
- size: f.Small,
83
- isCopied: V === "copy",
84
- copyLabel: L?.copy ?? "Copy",
85
- copiedLabel: L?.copied ?? "Copied!",
86
- ariaLabel: R?.copyResponse ?? "Copy response",
153
+ u && /* @__PURE__ */ I(t, {
154
+ iconSize: p.SM,
155
+ onClick: H,
156
+ size: h.Small,
157
+ isCopied: D === "copy",
158
+ copyLabel: w?.copy ?? "Copy",
159
+ copiedLabel: w?.copied ?? "Copied!",
160
+ ariaLabel: E?.copyResponse ?? "Copy response",
87
161
  isDisabled: x
88
162
  }),
89
- m && /* @__PURE__ */ P(t, {
90
- iconSize: u.SM,
91
- onClick: J,
92
- size: f.Small,
93
- isCopied: V === "markdown",
94
- iconCopy: /* @__PURE__ */ P(T, {
95
- size: u.SM,
163
+ d && /* @__PURE__ */ I(t, {
164
+ iconSize: p.SM,
165
+ onClick: U,
166
+ size: h.Small,
167
+ isCopied: D === "markdown",
168
+ iconCopy: /* @__PURE__ */ I(k, {
169
+ size: p.SM,
96
170
  "aria-hidden": !0,
97
- stroke: d
171
+ stroke: m
98
172
  }),
99
- copyLabel: L?.copyMarkdown ?? "Copy as Markdown",
100
- copiedLabel: L?.copiedMarkdown ?? "Copied!",
101
- ariaLabel: R?.copyAsMarkdown ?? "Copy as markdown",
173
+ copyLabel: w?.copyMarkdown ?? "Copy as Markdown",
174
+ copiedLabel: w?.copiedMarkdown ?? "Copied!",
175
+ ariaLabel: E?.copyAsMarkdown ?? "Copy as markdown",
102
176
  isDisabled: x
103
177
  }),
104
- h && /* @__PURE__ */ P(g, {
105
- icon: y === i.Like ? /* @__PURE__ */ P(j, {
106
- className: z.activeRating,
107
- size: u.SM,
178
+ f && /* @__PURE__ */ I(g, {
179
+ icon: v === i.Like ? /* @__PURE__ */ I(te, {
180
+ className: q.activeRating,
181
+ size: p.SM,
108
182
  "aria-hidden": !0
109
- }) : /* @__PURE__ */ P(A, {
110
- size: u.SM,
183
+ }) : /* @__PURE__ */ I(P, {
184
+ size: p.SM,
111
185
  "aria-hidden": !0,
112
- stroke: d
186
+ stroke: m
113
187
  }),
114
- size: f.Small,
115
- "aria-label": R?.likeResponse ?? "Like response",
116
- "aria-pressed": y === i.Like,
117
- tooltipProps: { tooltip: L?.like ?? "Like" },
118
- onClick: h,
188
+ size: h.Small,
189
+ "aria-label": E?.likeResponse ?? "Like response",
190
+ "aria-pressed": v === i.Like,
191
+ tooltipProps: { tooltip: w?.like ?? "Like" },
192
+ onClick: f,
119
193
  disabled: x
120
194
  }),
121
- v && /* @__PURE__ */ P(g, {
122
- icon: y === i.Dislike ? /* @__PURE__ */ P(k, {
123
- className: z.activeRating,
124
- size: u.SM,
195
+ _ && /* @__PURE__ */ I(g, {
196
+ icon: v === i.Dislike ? /* @__PURE__ */ I(N, {
197
+ className: q.activeRating,
198
+ size: p.SM,
125
199
  "aria-hidden": !0
126
- }) : /* @__PURE__ */ P(O, {
127
- size: u.SM,
200
+ }) : /* @__PURE__ */ I(M, {
201
+ size: p.SM,
128
202
  "aria-hidden": !0,
129
- stroke: d
203
+ stroke: m
130
204
  }),
131
- size: f.Small,
132
- "aria-label": R?.dislikeResponse ?? "Dislike response",
133
- "aria-pressed": y === i.Dislike,
134
- tooltipProps: { tooltip: L?.dislike ?? "Dislike" },
135
- onClick: v,
205
+ size: h.Small,
206
+ "aria-label": E?.dislikeResponse ?? "Dislike response",
207
+ "aria-pressed": v === i.Dislike,
208
+ tooltipProps: { tooltip: w?.dislike ?? "Dislike" },
209
+ onClick: _,
136
210
  disabled: x
137
211
  })
138
212
  ] })]
139
213
  }) : null;
140
- }, H = {
214
+ }, Y = {
141
215
  userBubble: "_userBubble_cq829_1",
142
216
  collapsibleText: "_collapsibleText_cq829_6",
143
217
  expandedText: "_expandedText_cq829_11",
144
218
  collapsedText: "_collapsedText_cq829_15",
145
219
  startersDivider: "_startersDivider_cq829_26",
146
220
  text: "_text_cq829_30"
147
- }, U = "[&>.cm-bubble-markdown>div>*:first-child]:indent-[var(--cm-bubble-first-line-indent,0px)]", W = ({ text: t, styles: i, actions: c, hasAlwaysVisibleActions: u, isStreaming: d, attachments: f, beforeContent: p, afterContent: m, starters: g, onSelectStarter: _, deploymentIconUrl: v, deploymentDisplayName: y, markdownComponents: x, markdownClassNames: S, markdownUrlTransform: C, onAttachmentClick: w, onDownloadAll: T, onAttachmentRetry: E, codeBlockTheme: D, tableOnOpenInCanvas: O, labels: k, selectedAttachmentId: A }) => {
148
- let { colors: j, typography: M, className: N, bubbleClassName: L } = i ?? {}, { attachmentClickLabel: z, attachmentRetryLabel: B, attachmentOpenInNewTabLabel: W, startersAriaLabel: G = "Quick reply buttons", thinkingLabel: K, codeBlockCopyLabel: q, codeBlockCopiedLabel: J, tableCopyLabel: Y, tableCopiedLabel: X, tableDownloadCsvLabel: Z, tableOpenInCanvasLabel: Q, tableDownloadFilename: ee, tableScrollRegionAriaLabel: te, assistantMessageAriaLabel: ne = "Assistant message", deploymentIconFallbackLabel: $ = "AI" } = k ?? {}, re = b(() => ({
149
- copyLabel: Y,
150
- copiedLabel: X,
151
- downloadCsvLabel: Z,
152
- openInCanvasLabel: Q
221
+ }, se = "[&>.cm-bubble-markdown>div>*:first-child]:indent-[var(--cm-bubble-first-line-indent,0px)]", X = ({ text: t, contentRef: i, styles: l, actions: d, hasAlwaysVisibleActions: f, isStreaming: p, attachments: m, beforeContent: h, responseFormat: g, afterContent: _, hasThinkingPlaceholder: v = !0, starters: b, onSelectStarter: x, deploymentIconUrl: S, deploymentDisplayName: C, markdownComponents: w, markdownClassNames: T, markdownUrlTransform: E, onAttachmentClick: D, onDownloadAll: O, onAttachmentRetry: k, codeBlockTheme: A, tableOnOpenInCanvas: j, labels: M, selectedAttachmentId: N }) => {
222
+ let { colors: P, typography: te, className: ne, bubbleClassName: F } = l ?? {}, { attachmentClickLabel: R, attachmentDownloadLabel: B, attachmentRetryLabel: H, attachmentOpenInNewTabLabel: U, startersAriaLabel: W = "Quick reply buttons", thinkingLabel: G, codeBlockCopyLabel: K, codeBlockCopiedLabel: re, codeBlockDownloadLabel: ie, tableCopyLabel: q, tableCopiedLabel: J, tableDownloadCsvLabel: X, tableOpenInCanvasLabel: Z, tableDownloadFilename: Q, tableScrollRegionAriaLabel: ce, mathScrollRegionAriaLabel: $, assistantMessageAriaLabel: le = "Assistant message", deploymentIconFallbackLabel: ue = "AI" } = M ?? {}, de = ee(() => ({
223
+ copyLabel: q,
224
+ copiedLabel: J,
225
+ downloadCsvLabel: X,
226
+ openInCanvasLabel: Z
153
227
  }), [
154
- Y,
228
+ q,
229
+ J,
155
230
  X,
156
- Z,
157
- Q
158
- ]), ie = d ? (f ?? []).filter((t) => t.type !== e.Audio) : f ?? [], { slotRef: ae, firstLineIndent: oe } = R(p != null && !!t), se = o({
159
- "--cm-bubble-text": j?.text,
160
- "--cm-starters-divider": j?.startersDivider,
161
- "--cm-bubble-first-line-indent": oe
162
- }), ce = s(H.text, M?.fontClassName), le = !!(v || y);
163
- return /* @__PURE__ */ F("div", {
231
+ Z
232
+ ]), fe = p ? (m ?? []).filter((t) => t.type !== e.Audio) : m ?? [], { slotRef: pe, firstLineIndent: me } = V(h != null && !!t), he = s({
233
+ "--cm-bubble-text": P?.text,
234
+ "--cm-starters-divider": P?.startersDivider,
235
+ "--cm-bubble-first-line-indent": me
236
+ }), ge = c(Y.text, te?.fontClassName), _e = !!(S || C);
237
+ return /* @__PURE__ */ L("div", {
164
238
  role: "group",
165
- "aria-label": ne,
166
- style: se,
167
- className: s("flex w-full items-start gap-3", N),
168
- children: [le && /* @__PURE__ */ P(n, {
169
- src: v,
239
+ "aria-label": le,
240
+ style: he,
241
+ onCopy: ae,
242
+ className: c("flex w-full items-start gap-3", ne),
243
+ children: [_e && /* @__PURE__ */ I(n, {
244
+ src: S,
170
245
  size: 28,
171
- initialsName: y || $,
172
- labels: { tooltip: y ?? $ }
173
- }), /* @__PURE__ */ F("div", {
246
+ initialsName: C || ue,
247
+ labels: { tooltip: C ?? ue }
248
+ }), /* @__PURE__ */ L("div", {
174
249
  className: "flex w-full min-w-0 max-w-full flex-col items-start gap-5",
175
- children: [/* @__PURE__ */ F("div", {
176
- className: s("flex w-full min-w-0 max-w-full flex-col items-start gap-4", L),
250
+ children: [/* @__PURE__ */ L("div", {
251
+ className: c("flex w-full min-w-0 max-w-full flex-col items-start gap-4", F),
177
252
  children: [
178
- p != null && !t && /* @__PURE__ */ P("div", {
253
+ h != null && !t && /* @__PURE__ */ I("div", {
179
254
  className: "min-w-0",
180
- children: p
255
+ children: h
181
256
  }),
182
- (t || d) && /* @__PURE__ */ F("div", {
257
+ (t || p && v) && /* @__PURE__ */ L("div", {
183
258
  "aria-live": "polite",
184
259
  "aria-atomic": "false",
185
- className: s(ce, "relative min-w-0 max-w-full text-start", p != null && t && U, I.assistantContent),
186
- children: [p != null && t && /* @__PURE__ */ P("div", {
187
- ref: ae,
260
+ className: c(ge, "relative min-w-0 max-w-full text-start", h != null && t && se, z.assistantContent),
261
+ children: [h != null && t && /* @__PURE__ */ I("div", {
262
+ ref: pe,
188
263
  className: "absolute start-0 top-0",
189
- children: p
190
- }), /* @__PURE__ */ P("div", {
264
+ children: h
265
+ }), /* @__PURE__ */ I("div", {
266
+ ref: i,
191
267
  className: "cm-bubble-markdown min-w-0 max-w-full",
192
- children: /* @__PURE__ */ P(r, {
268
+ children: /* @__PURE__ */ I(r, {
193
269
  content: t ?? "",
194
- isStreaming: d,
195
- thinkingLabel: K,
196
- components: x,
197
- classNames: S,
198
- urlTransform: C,
199
- codeBlockCopyLabel: q,
200
- codeBlockCopiedLabel: J,
201
- codeBlockTheme: D,
202
- tableActionLabels: re,
203
- tableDownloadFilename: ee,
204
- tableOnOpenInCanvas: O,
205
- tableScrollRegionAriaLabel: te
270
+ isPlainText: g === o.PlainText,
271
+ isStreaming: p,
272
+ thinkingLabel: G,
273
+ components: w,
274
+ classNames: T,
275
+ urlTransform: E,
276
+ codeBlockCopyLabel: K,
277
+ codeBlockCopiedLabel: re,
278
+ codeBlockDownloadLabel: ie,
279
+ codeBlockTheme: A,
280
+ tableActionLabels: de,
281
+ tableDownloadFilename: Q,
282
+ tableOnOpenInCanvas: j,
283
+ tableScrollRegionAriaLabel: ce,
284
+ mathScrollRegionAriaLabel: $
206
285
  })
207
286
  })]
208
287
  }),
209
- /* @__PURE__ */ P(l, {
210
- attachments: ie,
211
- onAttachmentClick: (e) => w?.(f?.find((t) => t.id === e)),
212
- onDownloadAll: T,
213
- onRetry: E,
288
+ /* @__PURE__ */ I(u, {
289
+ attachments: fe,
290
+ onAttachmentClick: D ? (e) => {
291
+ let t = m?.find((t) => t.id === e);
292
+ t && D(t);
293
+ } : void 0,
294
+ onDownloadAll: O,
295
+ onRetry: k,
214
296
  labels: {
215
- clickLabel: z,
216
- retryLabel: B,
217
- openInNewTabLabel: W
297
+ clickLabel: R,
298
+ downloadLabel: B,
299
+ retryLabel: H,
300
+ openInNewTabLabel: U
218
301
  },
219
- selectedAttachmentId: A
302
+ selectedAttachmentId: N
220
303
  }),
221
- m,
222
- /* @__PURE__ */ P(V, {
223
- ...c,
224
- isAlwaysVisible: u,
304
+ _,
305
+ /* @__PURE__ */ I(oe, {
306
+ ...d,
307
+ isAlwaysVisible: f,
225
308
  role: a.Assistant
226
309
  })
227
310
  ]
228
- }), g && g.length > 0 && _ && /* @__PURE__ */ P("div", {
311
+ }), b && b.length > 0 && x && /* @__PURE__ */ I("div", {
229
312
  role: "list",
230
- "aria-label": G,
231
- className: s("flex w-full flex-wrap gap-2 border-t pt-5", H.startersDivider),
232
- children: g.map((e, t) => /* @__PURE__ */ P("div", {
313
+ "aria-label": W,
314
+ className: c("flex w-full flex-wrap gap-2 border-t pt-5", Y.startersDivider),
315
+ children: b.map((e, t) => /* @__PURE__ */ I("div", {
233
316
  role: "listitem",
234
317
  className: "min-w-[40px]",
235
- children: /* @__PURE__ */ P(h, {
318
+ children: /* @__PURE__ */ I(y, {
236
319
  label: e.title,
237
320
  className: "min-w-[40px]",
238
- onClick: () => _(e)
321
+ onClick: () => x(e)
239
322
  })
240
323
  }, t))
241
324
  })]
242
325
  })]
243
326
  });
244
- }, G = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ P("div", {
327
+ }, Z = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ I("div", {
245
328
  role: "status",
246
329
  "aria-live": "polite",
247
- children: /* @__PURE__ */ P(p, {
330
+ children: /* @__PURE__ */ I(_, {
248
331
  title: e,
249
332
  message: t,
250
333
  textClassName: "flex-row flex-wrap gap-1"
251
334
  })
252
- }), K = /* @__PURE__ */ function(e) {
335
+ }), Q = /* @__PURE__ */ function(e) {
253
336
  return e.Bottom = "Bottom", e.Top = "Top", e;
254
- }({}), q = 10, J = ({ text: e, position: t = K.Bottom, styles: n, actions: r, hasAlwaysVisibleActions: i, attachments: d, collapsedLineCount: p = q, labels: h, beforeContent: g, onAttachmentClick: _, onDownloadAll: v, onAttachmentRetry: b, selectedAttachmentId: x }) => {
255
- let { colors: S, typography: T, className: E, bubbleClassName: D } = n ?? {}, { showMoreLabel: O = "Show more", showLessLabel: k = "Show less", showMoreAriaLabel: A, showLessAriaLabel: j, attachmentClickLabel: M, attachmentRetryLabel: L, attachmentOpenInNewTabLabel: R, userMessageAriaLabel: z = "User message" } = h ?? {}, { textRef: B, isTextCollapsed: U, isOverflowing: W, collapsedMaxHeight: G, expandedMaxHeight: J, isCollapsed: Y, toggleCollapsed: X } = c({
337
+ }({}), ce = 10, $ = ({ text: e, contentRef: t, position: n = Q.Bottom, styles: r, actions: i, hasAlwaysVisibleActions: o, attachments: d, collapsedLineCount: f = ce, labels: m, textSegments: g, onAttachmentClick: _, onDownloadAll: y, onAttachmentRetry: b, selectedAttachmentId: x }) => {
338
+ let { colors: C, typography: ee, className: w, bubbleClassName: T } = r ?? {}, { showMoreLabel: E = "Show more", showLessLabel: k = "Show less", showMoreAriaLabel: A, showLessAriaLabel: j, attachmentClickLabel: M, attachmentDownloadLabel: N, attachmentRetryLabel: P, attachmentOpenInNewTabLabel: te, userMessageAriaLabel: ne = "User message" } = m ?? {}, { textRef: R, isTextCollapsed: B, isOverflowing: V, collapsedMaxHeight: H, expandedMaxHeight: U, isCollapsed: W, toggleCollapsed: G } = l({
256
339
  text: e ?? "",
257
- collapsedLineCount: p
258
- }), Z = o({
259
- "--cm-bubble-user-bg": S?.userBackground,
260
- "--cm-bubble-user-border": S?.userBorder,
261
- "--cm-bubble-fade-start": S?.fadeStart,
262
- "--cm-bubble-text": S?.text,
263
- "--cm-bubble-collapsed-height": W ? `${G}px` : void 0,
264
- "--cm-bubble-expanded-height": W ? `${J}px` : void 0
265
- }), Q = t === K.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", ee = s(H.text, T?.fontClassName), te = A ?? O, ne = j ?? k, $ = Y ? O : k, re = Y ? te : ne, ie = Y ? C : w, ae = y();
266
- return /* @__PURE__ */ P("div", {
340
+ collapsedLineCount: f
341
+ }), K = s({
342
+ "--cm-bubble-user-bg": C?.userBackground,
343
+ "--cm-bubble-user-border": C?.userBorder,
344
+ "--cm-bubble-fade-start": C?.fadeStart,
345
+ "--cm-bubble-text": C?.text,
346
+ "--cm-bubble-collapsed-height": V ? `${H}px` : void 0,
347
+ "--cm-bubble-expanded-height": V ? `${U}px` : void 0
348
+ }), re = n === Q.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", ie = c(Y.text, ee?.fontClassName), q = A ?? E, J = j ?? k, se = W ? E : k, X = W ? q : J, Z = W ? D : O, $ = S();
349
+ return /* @__PURE__ */ I("div", {
267
350
  role: "group",
268
- "aria-label": z,
269
- style: Z,
270
- className: s("flex w-full", E),
271
- children: /* @__PURE__ */ F("div", {
351
+ "aria-label": ne,
352
+ style: K,
353
+ onCopy: ae,
354
+ className: c("flex w-full", w),
355
+ children: /* @__PURE__ */ L("div", {
272
356
  className: "ms-auto flex w-fit min-w-0 max-w-full flex-col items-end gap-4",
273
357
  children: [
274
- /* @__PURE__ */ P(l, {
358
+ /* @__PURE__ */ I(u, {
275
359
  attachments: d ?? [],
276
- onAttachmentClick: (e) => _?.(d?.find((t) => t.id === e)),
277
- onDownloadAll: v,
360
+ onAttachmentClick: _ ? (e) => {
361
+ let t = d?.find((t) => t.id === e);
362
+ t && _(t);
363
+ } : void 0,
364
+ onDownloadAll: y,
278
365
  onRetry: b,
279
366
  labels: {
280
367
  clickLabel: M,
281
- retryLabel: L,
282
- openInNewTabLabel: R
368
+ downloadLabel: N,
369
+ retryLabel: P,
370
+ openInNewTabLabel: te
283
371
  },
284
372
  styles: { className: "max-w-[640px]" },
285
373
  selectedAttachmentId: x
286
374
  }),
287
- (e || g != null) && /* @__PURE__ */ P("div", {
288
- className: s(H.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4", Q, D, I.userBubble),
289
- children: /* @__PURE__ */ F("div", {
375
+ e && /* @__PURE__ */ I("div", {
376
+ className: c(Y.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4", re, T, z.userBubble),
377
+ children: /* @__PURE__ */ L("div", {
290
378
  className: "flex min-w-0 flex-col items-start",
291
- children: [
292
- e && /* @__PURE__ */ P("div", {
293
- id: ae,
294
- className: s("relative overflow-hidden", W && H.collapsibleText, W && !Y && H.expandedText, U && H.collapsedText),
295
- children: /* @__PURE__ */ F("p", {
296
- ref: B,
297
- className: s(ee, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
298
- children: [g != null && /* @__PURE__ */ P("span", {
299
- className: "me-1",
300
- children: g
301
- }), e]
302
- })
303
- }),
304
- g != null && !e && /* @__PURE__ */ P("div", { children: g }),
305
- W && /* @__PURE__ */ P(m, {
306
- label: /* @__PURE__ */ P(N, { children: $ }),
307
- iconBefore: /* @__PURE__ */ P(ie, {
308
- size: u.SM,
309
- "aria-hidden": "true"
310
- }),
311
- "aria-label": re,
312
- "aria-expanded": !Y,
313
- "aria-controls": ae,
314
- className: "mt-3",
315
- onClick: X,
316
- size: f.Small
379
+ children: [/* @__PURE__ */ I("div", {
380
+ id: $,
381
+ ref: t,
382
+ className: c("relative -me-1 -ms-1 w-[calc(100%+8px)] overflow-hidden pe-1 ps-1", V && Y.collapsibleText, V && !W && Y.expandedText, B && Y.collapsedText),
383
+ children: /* @__PURE__ */ I("p", {
384
+ ref: R,
385
+ className: c(ie, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
386
+ children: g ?? e
317
387
  })
318
- ]
388
+ }), V && /* @__PURE__ */ I(v, {
389
+ label: /* @__PURE__ */ I(F, { children: se }),
390
+ iconBefore: /* @__PURE__ */ I(Z, {
391
+ size: p.SM,
392
+ "aria-hidden": "true"
393
+ }),
394
+ "aria-label": X,
395
+ "aria-expanded": !W,
396
+ "aria-controls": $,
397
+ className: "mt-3",
398
+ onClick: G,
399
+ size: h.Small
400
+ })]
319
401
  })
320
402
  }),
321
- /* @__PURE__ */ P(V, {
322
- ...r,
323
- isAlwaysVisible: i,
403
+ /* @__PURE__ */ I(oe, {
404
+ ...i,
405
+ isAlwaysVisible: o,
324
406
  role: a.User
325
407
  })
326
408
  ]
327
409
  })
328
410
  });
329
- }, Y = ({ role: e, beforeContent: t, onAttachmentClick: n, markdownComponents: r, markdownUrlTransform: i, ...o }) => e === a.Status ? /* @__PURE__ */ P(G, { labels: {
330
- titleText: o.labels?.statusTitleText,
331
- bodyText: o.labels?.statusBodyText ?? ""
332
- } }) : e === a.User ? /* @__PURE__ */ P(J, {
333
- ...o,
334
- beforeContent: t,
335
- onAttachmentClick: n
336
- }) : /* @__PURE__ */ P(W, {
337
- ...o,
411
+ }, le = ({ role: e, beforeContent: t, textSegments: n, onAttachmentClick: r, responseFormat: i, markdownComponents: o, markdownUrlTransform: s, ...c }) => e === a.Status ? /* @__PURE__ */ I(Z, { labels: {
412
+ titleText: c.labels?.statusTitleText,
413
+ bodyText: c.labels?.statusBodyText ?? ""
414
+ } }) : e === a.User ? /* @__PURE__ */ I($, {
415
+ ...c,
416
+ textSegments: n,
417
+ onAttachmentClick: r
418
+ }) : /* @__PURE__ */ I(X, {
419
+ ...c,
338
420
  beforeContent: t,
339
- markdownComponents: r,
340
- markdownUrlTransform: i,
341
- onAttachmentClick: n
342
- });
421
+ responseFormat: i,
422
+ markdownComponents: o,
423
+ markdownUrlTransform: s,
424
+ onAttachmentClick: r
425
+ }), ue = { button: "_button_tqo4d_3" }, de = ({ rect: e, actionRef: t, onReply: n, addedRevision: r, labels: i, styles: a, portalContainer: o }) => {
426
+ let { colors: l, typography: u, className: p, buttonClassName: g } = a ?? {}, _ = u?.fontClassName ?? "dial-small-text", v = o === void 0 ? typeof document > "u" ? null : document.body : o, y = s({
427
+ "--cm-reply-background": l?.background,
428
+ "--cm-reply-hover-background": l?.hoverBackground,
429
+ "--cm-reply-text": l?.text
430
+ }), [b, x] = T({
431
+ x: 0,
432
+ y: 0
433
+ });
434
+ return C(() => {
435
+ if (!e || !t.current) return;
436
+ let n = t.current.getBoundingClientRect(), r = window.visualViewport, i = r?.offsetLeft ?? 0, a = r?.offsetTop ?? 0, o = r?.width ?? document.documentElement.clientWidth, s = r?.height ?? document.documentElement.clientHeight, c = e.top - n.height - 8 >= a + 8 ? e.top - n.height - 8 : e.bottom + 8;
437
+ x({
438
+ x: Math.max(i + 8, Math.min(e.left, i + o - n.width - 8)),
439
+ y: Math.max(a + 8, Math.min(c, a + s - n.height - 8))
440
+ });
441
+ }, [
442
+ e,
443
+ t,
444
+ v,
445
+ p,
446
+ g,
447
+ _,
448
+ i.reply
449
+ ]), v ? R(/* @__PURE__ */ L(F, { children: [e && /* @__PURE__ */ I("div", {
450
+ ref: t,
451
+ className: c("fixed left-0 top-0 z-50 max-w-[calc(100vw-16px)]", p),
452
+ style: {
453
+ ...y,
454
+ transform: `translate(${b.x}px, ${b.y}px)`
455
+ },
456
+ children: /* @__PURE__ */ I(d, {
457
+ variant: f.Neutral,
458
+ size: h.Small,
459
+ label: i.reply,
460
+ onClick: n,
461
+ textClassName: _,
462
+ className: c(ue.button, "h-8 min-h-8 min-w-11 px-2 shadow-lg mobile:h-11 mobile:min-h-11", g),
463
+ iconAfter: /* @__PURE__ */ I(E, {
464
+ size: 16,
465
+ stroke: m,
466
+ "aria-hidden": "true",
467
+ className: "rtl:scale-x-[-1]"
468
+ })
469
+ })
470
+ }), /* @__PURE__ */ I("div", {
471
+ role: "status",
472
+ "aria-live": "polite",
473
+ className: "sr-only",
474
+ children: e ? i.selectionAvailable : r > 0 ? /* @__PURE__ */ I("span", { children: i.attachmentAdded }, r) : null
475
+ })] }), v) : null;
476
+ };
343
477
  //#endregion
344
- export { W as AssistantMessageBubble, K as BubblePosition, I as CONVERSATION_MESSAGES_CLASS, V as MessageActions, Y as MessageBubble, G as StatusMessageBubble, J as UserMessageBubble };
478
+ export { X as AssistantMessageBubble, Q as BubblePosition, z as CONVERSATION_MESSAGES_CLASS, oe as MessageActions, le as MessageBubble, de as MessageSelectionReply, Z as StatusMessageBubble, $ as UserMessageBubble };
@@ -7,8 +7,10 @@ export interface MessageActionTooltips {
7
7
  delete?: string;
8
8
  /** Tooltip for the Regenerate button. */
9
9
  regenerate?: string;
10
- /** Tooltip for the Copy button in its default state. */
10
+ /** Tooltip for the assistant Copy button in its default state. */
11
11
  copy?: string;
12
+ /** Tooltip for the user-message Copy button in its default state. */
13
+ copyMessage?: string;
12
14
  /** Tooltip shown on the Copy button immediately after copying. */
13
15
  copied?: string;
14
16
  /** Tooltip for the Copy as Markdown button in its default state. */
@@ -28,8 +30,10 @@ export interface MessageActionAriaLabels {
28
30
  deleteMessage?: string;
29
31
  /** aria-label for the Regenerate button. */
30
32
  regenerateResponse?: string;
31
- /** aria-label for the Copy button. */
33
+ /** aria-label for the assistant Copy button. */
32
34
  copyResponse?: string;
35
+ /** aria-label for the user-message Copy button. */
36
+ copyMessage?: string;
33
37
  /** aria-label for the Copy as Markdown button. */
34
38
  copyAsMarkdown?: string;
35
39
  /** aria-label for the Like button. */
@@ -40,6 +44,8 @@ export interface MessageActionAriaLabels {
40
44
  actionsGroup?: string;
41
45
  /** Announced after copying the response text. */
42
46
  copiedStatus?: string;
47
+ /** Announced after copying a user message. */
48
+ copiedMessageStatus?: string;
43
49
  /** Announced after copying the response as Markdown. */
44
50
  copiedMarkdownStatus?: string;
45
51
  }
@@ -57,7 +63,7 @@ export interface MessageActionColors {
57
63
  }
58
64
  /** Props for the `MessageActions` component. */
59
65
  export interface MessageActionsProps {
60
- /** Which actions are shown. `'User'` = Edit/Delete; `'Agent'` = Regenerate/Copy/Like/Dislike. Defaults to `'User'`. */
66
+ /** Which actions are shown. `'User'` = Copy/Edit/Delete; `'Agent'` = Regenerate/Copy/Like/Dislike. Defaults to `'User'`. */
61
67
  role?: MessageRole;
62
68
  /** Extra class(es) on the root element. */
63
69
  className?: string;
@@ -75,7 +81,7 @@ export interface MessageActionsProps {
75
81
  onDelete?: () => void;
76
82
  /** Fires on Regenerate click. Agent role only. */
77
83
  onRegenerate?: () => void;
78
- /** Fires on Copy click. Agent role only. */
84
+ /** Fires on Copy click. Both roles; the label set depends on `role`. */
79
85
  onCopy?: () => void;
80
86
  /** Fires on Copy Markdown click. Agent role only. */
81
87
  onCopyMarkdown?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"message-actions.d.ts","sourceRoot":"","sources":["../../src/models/message-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEvE,+FAA+F;AAC/F,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,0GAA0G;AAC1G,MAAM,WAAW,uBAAuB;IACtC,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,kBAAkB,CAAC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B,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,uBAAuB;IACvB,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
1
+ {"version":3,"file":"message-actions.d.ts","sourceRoot":"","sources":["../../src/models/message-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEvE,+FAA+F;AAC/F,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,0GAA0G;AAC1G,MAAM,WAAW,uBAAuB;IACtC,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mD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AAE,MAAM,IAAI,CAAC;IACpB,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,uBAAuB;IACvB,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
@@ -1,5 +1,5 @@
1
- import { CodeBlockTheme, DisplayAttachment, MarkdownRendererClassNames, MessageRole, StarterOption } from '@epam/ai-dial-chat-shared';
2
- import { ReactNode } from 'react';
1
+ import { CodeBlockTheme, DisplayAttachment, MarkdownRendererClassNames, MessageRole, ResponseFormat, StarterOption } from '@epam/ai-dial-chat-shared';
2
+ import { ReactNode, Ref } from 'react';
3
3
  import { Components } from 'react-markdown';
4
4
  import { BubblePosition } from '../types/bubble-position';
5
5
  import { MessageActionsProps } from './message-actions';
@@ -48,6 +48,8 @@ export interface MessageBubbleLabels {
48
48
  assistantMessageAriaLabel?: string;
49
49
  /** aria-label for interactive attachment tiles. */
50
50
  attachmentClickLabel?: string;
51
+ /** aria-label for each file tile's own download button (rendered when `onDownloadAll` is given). Defaults to `'Download attachment'`. */
52
+ attachmentDownloadLabel?: string;
51
53
  /** aria-label for the attachment retry button. */
52
54
  attachmentRetryLabel?: string;
53
55
  /** aria-label for the attachment open-in-new-tab button. */
@@ -67,6 +69,8 @@ export interface AssistantMessageBubbleLabels extends MessageBubbleLabels {
67
69
  codeBlockCopyLabel?: string;
68
70
  /** aria-label for the code block copy button after copying. */
69
71
  codeBlockCopiedLabel?: string;
72
+ /** aria-label for the code block download button. */
73
+ codeBlockDownloadLabel?: string;
70
74
  /** Label for the copy action on a Markdown table (copies as Markdown format). */
71
75
  tableCopyLabel?: string;
72
76
  /** Status announced after a Markdown table has been copied. */
@@ -79,11 +83,15 @@ export interface AssistantMessageBubbleLabels extends MessageBubbleLabels {
79
83
  tableDownloadFilename?: string;
80
84
  /** Accessible label for a Markdown table's scrollable region. */
81
85
  tableScrollRegionAriaLabel?: string;
86
+ /** Accessible label for a block formula's scrollable region. */
87
+ mathScrollRegionAriaLabel?: string;
82
88
  /** Fallback aria-label for the deployment icon. Defaults to `'AI'`. */
83
89
  deploymentIconFallbackLabel?: string;
84
90
  }
85
91
  /** Shared props for user and assistant message bubble components. */
86
92
  interface BaseMessageBubbleProps {
93
+ /** Ref to the text body, excluding attachment trays, actions and host slots. */
94
+ contentRef?: Ref<HTMLDivElement>;
87
95
  /** Plain-text (or Markdown) content of the message. When absent, the bubble renders for `beforeContent` alone. */
88
96
  text?: string;
89
97
  /** Color and typography overrides applied as CSS custom properties. */
@@ -106,17 +114,6 @@ interface BaseMessageBubbleProps {
106
114
  onAttachmentRetry?: (id: string) => void;
107
115
  /** ID of the attachment currently open in the canvas panel, if any. Renders that tile's selected visual state. */
108
116
  selectedAttachmentId?: string;
109
- /**
110
- * Content rendered at the inline-start of the message's first text line,
111
- * which word-flows after it (e.g. a used-skill chip — inline-level content
112
- * no taller than a text line). The user bubble renders it inline within
113
- * the text; the assistant bubble overlays it on the first markdown block's
114
- * first line, which indents past it. The user bubble renders for the slot
115
- * alone even when `text` is empty; an assistant message with no text
116
- * renders the slot on its own line — above the streaming placeholder while
117
- * the first token has not arrived yet.
118
- */
119
- beforeContent?: ReactNode;
120
117
  }
121
118
  /** Props for `UserMessageBubble`. */
122
119
  export interface UserMessageBubbleProps extends BaseMessageBubbleProps {
@@ -124,9 +121,38 @@ export interface UserMessageBubbleProps extends BaseMessageBubbleProps {
124
121
  position?: BubblePosition;
125
122
  /** Maximum number of text lines shown while a long user message is collapsed. Defaults to `10`. */
126
123
  collapsedLineCount?: number;
124
+ /**
125
+ * Ordered content replacing the plain-text render when present —
126
+ * interleaved plain-text runs and inline elements (e.g. skill-mention
127
+ * chips at their text position), rendered in place of `text` inside the
128
+ * same paragraph. `text` is still required alongside this: it remains the
129
+ * identity/measurement input for the collapse-height calculation
130
+ * (`useCollapsedText`), even though `textSegments` is what's visually
131
+ * rendered. Absent renders `text` directly, byte-identical to today.
132
+ */
133
+ textSegments?: ReactNode[];
127
134
  }
128
135
  /** Props for `AssistantMessageBubble`. */
129
136
  export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
137
+ /**
138
+ * Conversation response format. `ResponseFormat.PlainText` renders the
139
+ * message body verbatim — no Markdown pipeline, so a table, a heading, or
140
+ * `**bold**` reaches the reader exactly as the model wrote it — and the
141
+ * markdown-only props below stop applying. Defaults to
142
+ * `ResponseFormat.Markdown`.
143
+ */
144
+ responseFormat?: ResponseFormat;
145
+ /**
146
+ * Content rendered at the inline-start of the message's first markdown
147
+ * block's first line, which word-flows after it (e.g. used-skill chips —
148
+ * inline-level content no taller than a text line). Overlaid on the first
149
+ * line, which indents past it; an assistant message with no text renders
150
+ * the slot on its own line — above the streaming placeholder while the
151
+ * first token has not arrived yet. May itself be an array of elements
152
+ * (e.g. one `ChatSkill` per mention) — React renders `ReactNode[]` as a
153
+ * sibling sequence with no extra wrapper needed.
154
+ */
155
+ beforeContent?: ReactNode;
130
156
  /** react-markdown component overrides. Use to inject custom renderers (e.g. citation markers) into markdown elements. */
131
157
  markdownComponents?: Components;
132
158
  /** Per-element markdown typography classes. Defaults to the renderer's full-size scale; pass `COMPACT_MARKDOWN_CLASS_NAMES` for the smaller body scale. */
@@ -143,6 +169,8 @@ export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
143
169
  onSelectStarter?: (starter: StarterOption) => void;
144
170
  /** Content rendered between the message body and the actions bar (e.g. a stages panel). */
145
171
  afterContent?: ReactNode;
172
+ /** When `false`, no thinking placeholder renders while streaming before the first token, so `afterContent` starts level with the avatar. Defaults to `true`. */
173
+ hasThinkingPlaceholder?: boolean;
146
174
  /** Deployment icon URL. When absent, no icon is rendered. */
147
175
  deploymentIconUrl?: string;
148
176
  /** Deployment name used as the icon's accessible label. */
@@ -155,7 +183,7 @@ export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
155
183
  labels?: AssistantMessageBubbleLabels;
156
184
  }
157
185
  /** Props for `MessageBubble` — `AssistantMessageBubbleProps` plus user-only fields and `role`. */
158
- export type MessageBubbleProps = AssistantMessageBubbleProps & Pick<UserMessageBubbleProps, 'position' | 'collapsedLineCount'> & {
186
+ export type MessageBubbleProps = AssistantMessageBubbleProps & Pick<UserMessageBubbleProps, 'position' | 'collapsedLineCount' | 'textSegments'> & {
159
187
  /** Message author/type: user, assistant, or status banner. */
160
188
  role: MessageRole;
161
189
  };
@@ -1 +1 @@
1
- {"version":3,"file":"message-bubble.d.ts","sourceRoot":"","sources":["../../src/models/message-bubble.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,0BAA0B,EAC1B,WAAW,EACX,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,mEAAmE;AACnE,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,0DAA0D;AAC1D,MAAM,WAAW,uBAAuB;IACtC,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oEAAoE;AACpE,MAAM,W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A8C;IAC9C,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IACnD,2FAA2F;IAC3F,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,gKAAgK;IAChK,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oEAAoE;IACpE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,kEAAkE;IAClE,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,+FAA+F;IAC/F,MAAM,CAAC,EAAE,4BAA4B,CAAC;CACvC;AAED,kGAAkG;AAClG,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,GAC1D,IAAI,CACF,sBAAsB,EACtB,UAAU,GAAG,oBAAoB,GAAG,cAAc,CACnD,GAAG;IACF,8DAA8D;IAC9D,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-conversation-messages",
3
3
  "description": "Message bubble components for rendering conversation history with actions and source citations",
4
- "version": "1.2.0-dev.99",
4
+ "version": "1.3.0-dev.5",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -19,12 +19,13 @@
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
21
  "react-markdown": "^10.1.0",
22
- "@epam/ai-dial-attachment-input": "1.2.0-dev.99"
22
+ "@epam/ai-dial-attachment-input": "1.3.0-dev.5"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": "^19.2.8",
26
- "@epam/ai-dial-chat-shared": "1.2.0-dev.99",
27
- "@epam/ai-dial-ui-kit": "^0.15.0-dev.12"
26
+ "react-dom": "^19.2.8",
27
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.5",
28
+ "@epam/ai-dial-ui-kit": "^0.15.0"
28
29
  },
29
30
  "repository": {
30
31
  "type": "git",
@@ -0,0 +1,11 @@
1
+ import { ClipboardEvent } from 'react';
2
+ /**
3
+ * `onCopy` handler that writes the current selection to the clipboard without
4
+ * the app's colors and fonts. Left to itself, the browser inlines every
5
+ * computed style of the selected markup into `text/html`, so pasting into a
6
+ * rich-text target (Teams, Outlook, Word) brings along the message's
7
+ * background band. This keeps the structure (paragraphs, lists, tables, code,
8
+ * links, line breaks) and lets the target document style it.
9
+ */
10
+ export declare const copySelectionWithoutStyles: (event: ClipboardEvent<HTMLElement>) => void;
11
+ //# sourceMappingURL=clipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAwG5C;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,GACrC,OAAO,cAAc,CAAC,WAAW,CAAC,KACjC,IA0BF,CAAC"}