@epam/ai-dial-conversation-messages 1.3.0-dev.29 → 1.3.0-dev.290
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/components/ConversationStartTimestamp/ConversationStartTimestamp.d.ts +5 -0
- package/components/ConversationStartTimestamp/ConversationStartTimestamp.d.ts.map +1 -0
- package/components/MessageActions/MessageActions.d.ts.map +1 -1
- package/components/MessageBubble/AssistantMessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/MessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/StatusMessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/UserMessageBubble.d.ts.map +1 -1
- package/components/MessageSelectionReply/MessageSelectionReply.d.ts.map +1 -1
- package/components/MessageTimestamp/MessageTimestamp.d.ts +5 -0
- package/components/MessageTimestamp/MessageTimestamp.d.ts.map +1 -0
- package/hooks/useNow/useNow.d.ts +3 -0
- package/hooks/useNow/useNow.d.ts.map +1 -0
- package/index.css +3 -2
- package/index.d.ts +3 -1
- package/index.d.ts.map +1 -1
- package/index.js +444 -316
- package/models/conversation-start.d.ts +43 -0
- package/models/conversation-start.d.ts.map +1 -0
- package/models/message-actions.d.ts +5 -0
- package/models/message-actions.d.ts.map +1 -1
- package/models/message-bubble.d.ts +44 -27
- package/models/message-bubble.d.ts.map +1 -1
- package/package.json +5 -5
- package/types/conversation-start-kind.d.ts +10 -0
- package/types/conversation-start-kind.d.ts.map +1 -0
- package/utils/date-time.d.ts +10 -0
- package/utils/date-time.d.ts.map +1 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ConversationStartKind } from '../types/conversation-start-kind';
|
|
2
|
+
/** Calendar-day classification of a conversation start plus its localized time or date text. */
|
|
3
|
+
export interface ConversationStartParts {
|
|
4
|
+
/** Which label form applies. */
|
|
5
|
+
kind: ConversationStartKind;
|
|
6
|
+
/** Localized time for `Today`/`Yesterday`; full localized date and time for `Absolute`. */
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
/** Localised templates for `ConversationStartTimestamp`. */
|
|
10
|
+
export interface ConversationStartTimestampLabels {
|
|
11
|
+
/** Builds the label for a start earlier today from the localized time. Defaults to `` (time) => `Today ${time}` ``. */
|
|
12
|
+
today?: (time: string) => string;
|
|
13
|
+
/** Builds the label for a start on the previous day from the localized time. Defaults to `` (time) => `Yesterday ${time}` ``. */
|
|
14
|
+
yesterday?: (time: string) => string;
|
|
15
|
+
}
|
|
16
|
+
/** CSS custom property overrides for `ConversationStartTimestamp`. */
|
|
17
|
+
export interface ConversationStartTimestampColors {
|
|
18
|
+
/** Text color of the label. Defaults to `--text-secondary`. */
|
|
19
|
+
text?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Props for `ConversationStartTimestamp`. */
|
|
22
|
+
export interface ConversationStartTimestampProps {
|
|
23
|
+
/** ISO-8601 start time, usually the first message's `timestamp`. Nothing renders when it is missing or unparsable. */
|
|
24
|
+
timestamp: string;
|
|
25
|
+
/** BCP 47 locale for the time and date. Defaults to the runtime's default locale. */
|
|
26
|
+
locale?: string;
|
|
27
|
+
/** Localised "Today"/"Yesterday" templates. */
|
|
28
|
+
labels?: ConversationStartTimestampLabels;
|
|
29
|
+
/** Typography class on the label. Defaults to `'dial-small-text'`. */
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Color overrides, applied as CSS custom properties. */
|
|
32
|
+
colors?: ConversationStartTimestampColors;
|
|
33
|
+
}
|
|
34
|
+
/** Props for the relative send time rendered in a message's action row. */
|
|
35
|
+
export interface MessageTimestampProps {
|
|
36
|
+
/** ISO-8601 send time of the message. Nothing renders when it is missing or unparsable. */
|
|
37
|
+
timestamp: string;
|
|
38
|
+
/** BCP 47 locale for the relative text and the absolute tooltip. Defaults to the runtime's default locale. */
|
|
39
|
+
locale?: string;
|
|
40
|
+
/** Typography class on the time. Defaults to `'dial-small-text'`. */
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=conversation-start.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-start.d.ts","sourceRoot":"","sources":["../../src/models/conversation-start.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE9E,gGAAgG;AAChG,MAAM,WAAW,sBAAsB;IACrC,gCAAgC;IAChC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,2FAA2F;IAC3F,IAAI,EAAE,MAAM,CAAC;CACd;AAED,4DAA4D;AAC5D,MAAM,WAAW,gCAAgC;IAC/C,uHAAuH;IACvH,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,iIAAiI;IACjI,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACtC;AAED,sEAAsE;AACtE,MAAM,WAAW,gCAAgC;IAC/C,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,8CAA8C;AAC9C,MAAM,WAAW,+BAA+B;IAC9C,sHAAsH;IACtH,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,gCAAgC,CAAC;IAC1C,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,MAAM,CAAC,EAAE,gCAAgC,CAAC;CAC3C;AAED,2EAA2E;AAC3E,MAAM,WAAW,qBAAqB;IACpC,2FAA2F;IAC3F,SAAS,EAAE,MAAM,CAAC;IAClB,8GAA8G;IAC9G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MessageRating, MessageRole } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
/** Tooltip overrides for each action button. Omitted fields fall back to built-in defaults. */
|
|
3
4
|
export interface MessageActionTooltips {
|
|
4
5
|
/** Tooltip for the Edit button. */
|
|
@@ -91,6 +92,10 @@ export interface MessageActionsProps {
|
|
|
91
92
|
onDislike?: () => void;
|
|
92
93
|
/** Active rating; highlights the matching Like/Dislike button when set. */
|
|
93
94
|
activeRating?: MessageRating;
|
|
95
|
+
/** Host content rendered at the start of the toolbar row, before the action buttons (e.g. a send time). */
|
|
96
|
+
leadingContent?: ReactNode;
|
|
97
|
+
/** Host content rendered at the end of the toolbar row, after the action buttons (e.g. a send time). */
|
|
98
|
+
trailingContent?: ReactNode;
|
|
94
99
|
/** Color overrides. */
|
|
95
100
|
colors?: MessageActionColors;
|
|
96
101
|
}
|
|
@@ -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;
|
|
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;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,+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,E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M,CAAC;IACnB,gEAAgE;IAChE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wEAAwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wCAAwC;IACxC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,wEAAwE;IACxE,MAAM,CAAC,EAAE,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,2GAA2G;IAC3G,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,wGAAwG;IACxG,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,uBAAuB;IACvB,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodeBlockTheme, DisplayAttachment, MarkdownRendererClassNames, MessageRole, ResponseFormat, StarterOption } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { CodeBlockTheme, DisplayAttachment, MarkdownRendererClassNames, MessageRole, ResponseFormat, StarterOption, TextSegment } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { ReactNode, Ref } from 'react';
|
|
3
3
|
import { Components } from 'react-markdown';
|
|
4
4
|
import { BubblePosition } from '../types/bubble-position';
|
|
@@ -15,6 +15,8 @@ export interface MessageBubbleColors {
|
|
|
15
15
|
text?: string;
|
|
16
16
|
/** Divider color above quick-reply buttons. Falls back to `--color-secondary`. */
|
|
17
17
|
startersDivider?: string;
|
|
18
|
+
/** Text color of the send time shown when `timestamp` is set. Defaults to `--text-secondary`. */
|
|
19
|
+
timestampText?: string;
|
|
18
20
|
}
|
|
19
21
|
/** Typography overrides for message bubble components. */
|
|
20
22
|
export interface MessageBubbleTypography {
|
|
@@ -31,6 +33,8 @@ export interface MessageBubbleStyles {
|
|
|
31
33
|
className?: string;
|
|
32
34
|
/** Extra class(es) on the bubble element. */
|
|
33
35
|
bubbleClassName?: string;
|
|
36
|
+
/** Typography class on the send time shown when `timestamp` is set. Defaults to `'dial-small-text'`. */
|
|
37
|
+
timestampClassName?: string;
|
|
34
38
|
}
|
|
35
39
|
/** Localised labels for message bubble components. */
|
|
36
40
|
export interface MessageBubbleLabels {
|
|
@@ -59,12 +63,8 @@ export interface MessageBubbleLabels {
|
|
|
59
63
|
/** Body text for the status banner. Required when `role === MessageRole.Status`. */
|
|
60
64
|
statusBodyText?: string;
|
|
61
65
|
}
|
|
62
|
-
/** Localised labels for
|
|
63
|
-
export interface
|
|
64
|
-
/** aria-label for the quick-reply list. Defaults to `"Quick reply buttons"`. */
|
|
65
|
-
startersAriaLabel?: string;
|
|
66
|
-
/** Shimmer placeholder shown while streaming and message text is empty. Defaults to `'Thinking'`. */
|
|
67
|
-
thinkingLabel?: string;
|
|
66
|
+
/** Localised labels for markdown content (code blocks, tables, formulas) inside a message bubble. */
|
|
67
|
+
export interface MarkdownContentLabels {
|
|
68
68
|
/** aria-label for the code block copy button. */
|
|
69
69
|
codeBlockCopyLabel?: string;
|
|
70
70
|
/** aria-label for the code block copy button after copying. */
|
|
@@ -85,6 +85,16 @@ export interface AssistantMessageBubbleLabels extends MessageBubbleLabels {
|
|
|
85
85
|
tableScrollRegionAriaLabel?: string;
|
|
86
86
|
/** Accessible label for a block formula's scrollable region. */
|
|
87
87
|
mathScrollRegionAriaLabel?: string;
|
|
88
|
+
}
|
|
89
|
+
/** Localised labels for the `UserMessageBubble` component. */
|
|
90
|
+
export interface UserMessageBubbleLabels extends MessageBubbleLabels, MarkdownContentLabels {
|
|
91
|
+
}
|
|
92
|
+
/** Localised labels for the `AssistantMessageBubble` component. */
|
|
93
|
+
export interface AssistantMessageBubbleLabels extends MessageBubbleLabels, MarkdownContentLabels {
|
|
94
|
+
/** aria-label for the quick-reply list. Defaults to `"Quick reply buttons"`. */
|
|
95
|
+
startersAriaLabel?: string;
|
|
96
|
+
/** Shimmer placeholder shown while streaming and message text is empty. Defaults to `'Thinking'`. */
|
|
97
|
+
thinkingLabel?: string;
|
|
88
98
|
/** Fallback aria-label for the deployment icon. Defaults to `'AI'`. */
|
|
89
99
|
deploymentIconFallbackLabel?: string;
|
|
90
100
|
}
|
|
@@ -100,6 +110,10 @@ interface BaseMessageBubbleProps {
|
|
|
100
110
|
actions?: MessageActionsProps;
|
|
101
111
|
/** Shows the actions bar permanently instead of on group hover only. */
|
|
102
112
|
hasAlwaysVisibleActions?: boolean;
|
|
113
|
+
/** ISO-8601 send time. When set, a relative time ("3 hours ago") with a full-date tooltip is shown on the outer edge of the actions row, revealed on hover or focus (always on devices without hover). */
|
|
114
|
+
timestamp?: string;
|
|
115
|
+
/** BCP 47 locale for the send time. Defaults to the runtime's default locale. */
|
|
116
|
+
locale?: string;
|
|
103
117
|
/** When `true`, assistant markdown text reveals newly appended content smoothly. */
|
|
104
118
|
isStreaming?: boolean;
|
|
105
119
|
/** Attachments shown above (user) or below (assistant) the message text. */
|
|
@@ -110,10 +124,24 @@ interface BaseMessageBubbleProps {
|
|
|
110
124
|
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
111
125
|
/** Fires with all downloadable attachments when "download all" is triggered. */
|
|
112
126
|
onDownloadAll?: (attachments: DisplayAttachment[]) => void;
|
|
127
|
+
/** Whether an attachment can be downloaded; `false` hides its tile's download button and leaves it out of "download all". Defaults to every attachment being downloadable. */
|
|
128
|
+
isAttachmentDownloadable?: (attachment: DisplayAttachment) => boolean;
|
|
113
129
|
/** Fires when a failed attachment upload is retried. */
|
|
114
130
|
onAttachmentRetry?: (id: string) => void;
|
|
115
131
|
/** ID of the attachment currently open in the canvas panel, if any. Renders that tile's selected visual state. */
|
|
116
132
|
selectedAttachmentId?: string;
|
|
133
|
+
/** Per-element markdown typography classes. Defaults to the renderer's full-size scale; pass `COMPACT_MARKDOWN_CLASS_NAMES` for the smaller body scale. */
|
|
134
|
+
markdownClassNames?: MarkdownRendererClassNames;
|
|
135
|
+
/**
|
|
136
|
+
* Rewrites markdown `href`/`src` values before they are rendered. Forwarded
|
|
137
|
+
* to `MDMessageViewer`. Hosts use this to map DIAL file ids to download URLs.
|
|
138
|
+
* Defaults to no extra rewrite.
|
|
139
|
+
*/
|
|
140
|
+
markdownUrlTransform?: (url: string) => string;
|
|
141
|
+
/** Syntax highlight theme for code blocks. Defaults to `'dark'`. */
|
|
142
|
+
codeBlockTheme?: CodeBlockTheme;
|
|
143
|
+
/** Opens serialized Markdown table content in the host canvas. */
|
|
144
|
+
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
117
145
|
}
|
|
118
146
|
/** Props for `UserMessageBubble`. */
|
|
119
147
|
export interface UserMessageBubbleProps extends BaseMessageBubbleProps {
|
|
@@ -122,15 +150,16 @@ export interface UserMessageBubbleProps extends BaseMessageBubbleProps {
|
|
|
122
150
|
/** Maximum number of text lines shown while a long user message is collapsed. Defaults to `10`. */
|
|
123
151
|
collapsedLineCount?: number;
|
|
124
152
|
/**
|
|
125
|
-
* Ordered content
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* identity
|
|
130
|
-
* (`useCollapsedText`)
|
|
131
|
-
* rendered. Absent renders `text` directly, byte-identical to today.
|
|
153
|
+
* Ordered content rendered in place of `text` when present: markdown
|
|
154
|
+
* string runs interleaved with inline segments (e.g. skill-mention chips),
|
|
155
|
+
* each rendered at its position within the markdown output, or as its
|
|
156
|
+
* literal `text` inside code and link text. `text` is still required
|
|
157
|
+
* alongside this: it remains the identity input for the collapse state
|
|
158
|
+
* (`useCollapsedText`). Absent renders `text` as markdown directly.
|
|
132
159
|
*/
|
|
133
|
-
textSegments?:
|
|
160
|
+
textSegments?: TextSegment[];
|
|
161
|
+
/** Localised labels for the toggle button, attachment rows, and markdown code/table actions. */
|
|
162
|
+
labels?: UserMessageBubbleLabels;
|
|
134
163
|
}
|
|
135
164
|
/** Props for `AssistantMessageBubble`. */
|
|
136
165
|
export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
|
|
@@ -155,14 +184,6 @@ export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
|
|
|
155
184
|
beforeContent?: ReactNode;
|
|
156
185
|
/** react-markdown component overrides. Use to inject custom renderers (e.g. citation markers) into markdown elements. */
|
|
157
186
|
markdownComponents?: Components;
|
|
158
|
-
/** Per-element markdown typography classes. Defaults to the renderer's full-size scale; pass `COMPACT_MARKDOWN_CLASS_NAMES` for the smaller body scale. */
|
|
159
|
-
markdownClassNames?: MarkdownRendererClassNames;
|
|
160
|
-
/**
|
|
161
|
-
* Rewrites markdown `href`/`src` values before they are rendered. Forwarded
|
|
162
|
-
* to `MDMessageViewer`. Hosts use this to map DIAL file ids to download URLs.
|
|
163
|
-
* Defaults to no extra rewrite.
|
|
164
|
-
*/
|
|
165
|
-
markdownUrlTransform?: (url: string) => string;
|
|
166
187
|
/** Quick-reply buttons rendered below the message text when non-empty. */
|
|
167
188
|
starters?: StarterOption[];
|
|
168
189
|
/** Fires with the clicked `StarterOption`. */
|
|
@@ -175,10 +196,6 @@ export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
|
|
|
175
196
|
deploymentIconUrl?: string;
|
|
176
197
|
/** Deployment name used as the icon's accessible label. */
|
|
177
198
|
deploymentDisplayName?: string;
|
|
178
|
-
/** Syntax highlight theme for code blocks. Defaults to `'dark'`. */
|
|
179
|
-
codeBlockTheme?: CodeBlockTheme;
|
|
180
|
-
/** Opens serialized Markdown table content in the host canvas. */
|
|
181
|
-
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
182
199
|
/** Localised labels for quick replies, the thinking indicator, and code block copy actions. */
|
|
183
200
|
labels?: AssistantMessageBubbleLabels;
|
|
184
201
|
}
|
|
@@ -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,cAAc,EACd,aAAa,
|
|
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,cAAc,EACd,aAAa,EACb,WAAW,EACZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,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;IACzB,iGAAiG;IACjG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0DAA0D;AAC1D,MAAM,WAAW,uBAAuB;IACtC,0DAA0D;IAC1D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AA0E;IAC1E,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,8CAA8C;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,+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.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.290",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@tabler/icons-react": "^3.
|
|
20
|
+
"@tabler/icons-react": "^3.50.0",
|
|
21
21
|
"react-markdown": "^10.1.0",
|
|
22
|
-
"@epam/ai-dial-attachment-input": "1.3.0-dev.
|
|
22
|
+
"@epam/ai-dial-attachment-input": "1.3.0-dev.290"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.8",
|
|
26
26
|
"react-dom": "^19.2.8",
|
|
27
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
28
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
27
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.290",
|
|
28
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.67"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Which form a conversation start label takes, by local calendar day relative to now. */
|
|
2
|
+
export declare enum ConversationStartKind {
|
|
3
|
+
/** The start is on the current local calendar day. */
|
|
4
|
+
Today = "today",
|
|
5
|
+
/** The start is on the previous local calendar day. */
|
|
6
|
+
Yesterday = "yesterday",
|
|
7
|
+
/** The start is older; shown as a full date and time. */
|
|
8
|
+
Absolute = "absolute"
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=conversation-start-kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-start-kind.d.ts","sourceRoot":"","sources":["../../src/types/conversation-start-kind.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,oBAAY,qBAAqB;IAC/B,sDAAsD;IACtD,KAAK,UAAU;IACf,uDAAuD;IACvD,SAAS,cAAc;IACvB,yDAAyD;IACzD,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConversationStartParts } from '../models/conversation-start';
|
|
2
|
+
/** Parses an ISO timestamp, returning `null` when it is missing or invalid. */
|
|
3
|
+
export declare const parseTimestamp: (timestamp: string | undefined) => Date | null;
|
|
4
|
+
/** Formats `date` as a localized absolute date and time, e.g. `Oct 19, 2026, 5:25 PM`. */
|
|
5
|
+
export declare const formatAbsoluteDateTime: (date: Date, locale: string | undefined) => string;
|
|
6
|
+
/** Returns whether `start` falls on today, yesterday or earlier (local calendar days) with its localized text. */
|
|
7
|
+
export declare const formatConversationStart: (start: Date, now: Date, locale: string | undefined) => ConversationStartParts;
|
|
8
|
+
/** Returns how long ago `date` was relative to `now`, e.g. `3 hours ago`, `yesterday`, `now`. */
|
|
9
|
+
export declare const formatRelativeTime: (date: Date, now: Date, locale: string | undefined) => string;
|
|
10
|
+
//# sourceMappingURL=date-time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time.d.ts","sourceRoot":"","sources":["../../src/utils/date-time.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAqC3E,+EAA+E;AAC/E,eAAO,MAAM,cAAc,GAAI,WAAW,MAAM,GAAG,SAAS,KAAG,IAAI,GAAG,IAIrE,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,sBAAsB,GACjC,MAAM,IAAI,EACV,QAAQ,MAAM,GAAG,SAAS,KACzB,MACsE,CAAC;AAE1E,kHAAkH;AAClH,eAAO,MAAM,uBAAuB,GAClC,OAAO,IAAI,EACX,KAAK,IAAI,EACT,QAAQ,MAAM,GAAG,SAAS,KACzB,sBAwBF,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,kBAAkB,GAC7B,MAAM,IAAI,EACV,KAAK,IAAI,EACT,QAAQ,MAAM,GAAG,SAAS,KACzB,MAUF,CAAC"}
|