@epam/ai-dial-conversation-messages 1.3.0-dev.13 → 1.3.0-dev.130
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/UserMessageBubble.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 +434 -313
- package/models/conversation-start.d.ts +36 -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 +40 -27
- package/models/message-bubble.d.ts.map +1 -1
- package/package.json +4 -4
- 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,36 @@
|
|
|
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
|
+
/** Props for `ConversationStartTimestamp`. */
|
|
17
|
+
export interface ConversationStartTimestampProps {
|
|
18
|
+
/** ISO-8601 start time, usually the first message's `timestamp`. Nothing renders when it is missing or unparsable. */
|
|
19
|
+
timestamp: string;
|
|
20
|
+
/** BCP 47 locale for the time and date. Defaults to the runtime's default locale. */
|
|
21
|
+
locale?: string;
|
|
22
|
+
/** Localised "Today"/"Yesterday" templates. */
|
|
23
|
+
labels?: ConversationStartTimestampLabels;
|
|
24
|
+
/** Typography and color classes on the label. Defaults to `'dial-small-text text-secondary'`. */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Props for the relative send time rendered in a message's action row. */
|
|
28
|
+
export interface MessageTimestampProps {
|
|
29
|
+
/** ISO-8601 send time of the message. Nothing renders when it is missing or unparsable. */
|
|
30
|
+
timestamp: string;
|
|
31
|
+
/** BCP 47 locale for the relative text and the absolute tooltip. Defaults to the runtime's default locale. */
|
|
32
|
+
locale?: string;
|
|
33
|
+
/** Typography and color classes on the time. Defaults to `'dial-small-text text-secondary'`. */
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
//# 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,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,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2EAA2E;AAC3E,MAAM,WAAW,qBAAqB;IACpC,2FAA2F;IAC3F,SAAS,EAAE,MAAM,CAAC;IAClB,8GAA8G;IAC9G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gGAAgG;IAChG,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,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,mDAAmD;IACnD,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AAI,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';
|
|
@@ -31,6 +31,8 @@ export interface MessageBubbleStyles {
|
|
|
31
31
|
className?: string;
|
|
32
32
|
/** Extra class(es) on the bubble element. */
|
|
33
33
|
bubbleClassName?: string;
|
|
34
|
+
/** Typography and color classes on the send time shown when `timestamp` is set. Defaults to `'dial-small-text text-secondary'`. */
|
|
35
|
+
timestampClassName?: string;
|
|
34
36
|
}
|
|
35
37
|
/** Localised labels for message bubble components. */
|
|
36
38
|
export interface MessageBubbleLabels {
|
|
@@ -59,12 +61,8 @@ export interface MessageBubbleLabels {
|
|
|
59
61
|
/** Body text for the status banner. Required when `role === MessageRole.Status`. */
|
|
60
62
|
statusBodyText?: string;
|
|
61
63
|
}
|
|
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;
|
|
64
|
+
/** Localised labels for markdown content (code blocks, tables, formulas) inside a message bubble. */
|
|
65
|
+
export interface MarkdownContentLabels {
|
|
68
66
|
/** aria-label for the code block copy button. */
|
|
69
67
|
codeBlockCopyLabel?: string;
|
|
70
68
|
/** aria-label for the code block copy button after copying. */
|
|
@@ -85,6 +83,16 @@ export interface AssistantMessageBubbleLabels extends MessageBubbleLabels {
|
|
|
85
83
|
tableScrollRegionAriaLabel?: string;
|
|
86
84
|
/** Accessible label for a block formula's scrollable region. */
|
|
87
85
|
mathScrollRegionAriaLabel?: string;
|
|
86
|
+
}
|
|
87
|
+
/** Localised labels for the `UserMessageBubble` component. */
|
|
88
|
+
export interface UserMessageBubbleLabels extends MessageBubbleLabels, MarkdownContentLabels {
|
|
89
|
+
}
|
|
90
|
+
/** Localised labels for the `AssistantMessageBubble` component. */
|
|
91
|
+
export interface AssistantMessageBubbleLabels extends MessageBubbleLabels, MarkdownContentLabels {
|
|
92
|
+
/** aria-label for the quick-reply list. Defaults to `"Quick reply buttons"`. */
|
|
93
|
+
startersAriaLabel?: string;
|
|
94
|
+
/** Shimmer placeholder shown while streaming and message text is empty. Defaults to `'Thinking'`. */
|
|
95
|
+
thinkingLabel?: string;
|
|
88
96
|
/** Fallback aria-label for the deployment icon. Defaults to `'AI'`. */
|
|
89
97
|
deploymentIconFallbackLabel?: string;
|
|
90
98
|
}
|
|
@@ -100,6 +108,10 @@ interface BaseMessageBubbleProps {
|
|
|
100
108
|
actions?: MessageActionsProps;
|
|
101
109
|
/** Shows the actions bar permanently instead of on group hover only. */
|
|
102
110
|
hasAlwaysVisibleActions?: boolean;
|
|
111
|
+
/** 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). */
|
|
112
|
+
timestamp?: string;
|
|
113
|
+
/** BCP 47 locale for the send time. Defaults to the runtime's default locale. */
|
|
114
|
+
locale?: string;
|
|
103
115
|
/** When `true`, assistant markdown text reveals newly appended content smoothly. */
|
|
104
116
|
isStreaming?: boolean;
|
|
105
117
|
/** Attachments shown above (user) or below (assistant) the message text. */
|
|
@@ -114,6 +126,18 @@ interface BaseMessageBubbleProps {
|
|
|
114
126
|
onAttachmentRetry?: (id: string) => void;
|
|
115
127
|
/** ID of the attachment currently open in the canvas panel, if any. Renders that tile's selected visual state. */
|
|
116
128
|
selectedAttachmentId?: string;
|
|
129
|
+
/** Per-element markdown typography classes. Defaults to the renderer's full-size scale; pass `COMPACT_MARKDOWN_CLASS_NAMES` for the smaller body scale. */
|
|
130
|
+
markdownClassNames?: MarkdownRendererClassNames;
|
|
131
|
+
/**
|
|
132
|
+
* Rewrites markdown `href`/`src` values before they are rendered. Forwarded
|
|
133
|
+
* to `MDMessageViewer`. Hosts use this to map DIAL file ids to download URLs.
|
|
134
|
+
* Defaults to no extra rewrite.
|
|
135
|
+
*/
|
|
136
|
+
markdownUrlTransform?: (url: string) => string;
|
|
137
|
+
/** Syntax highlight theme for code blocks. Defaults to `'dark'`. */
|
|
138
|
+
codeBlockTheme?: CodeBlockTheme;
|
|
139
|
+
/** Opens serialized Markdown table content in the host canvas. */
|
|
140
|
+
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
117
141
|
}
|
|
118
142
|
/** Props for `UserMessageBubble`. */
|
|
119
143
|
export interface UserMessageBubbleProps extends BaseMessageBubbleProps {
|
|
@@ -122,15 +146,16 @@ export interface UserMessageBubbleProps extends BaseMessageBubbleProps {
|
|
|
122
146
|
/** Maximum number of text lines shown while a long user message is collapsed. Defaults to `10`. */
|
|
123
147
|
collapsedLineCount?: number;
|
|
124
148
|
/**
|
|
125
|
-
* Ordered content
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* identity
|
|
130
|
-
* (`useCollapsedText`)
|
|
131
|
-
* rendered. Absent renders `text` directly, byte-identical to today.
|
|
149
|
+
* Ordered content rendered in place of `text` when present: markdown
|
|
150
|
+
* string runs interleaved with inline segments (e.g. skill-mention chips),
|
|
151
|
+
* each rendered at its position within the markdown output, or as its
|
|
152
|
+
* literal `text` inside code and link text. `text` is still required
|
|
153
|
+
* alongside this: it remains the identity input for the collapse state
|
|
154
|
+
* (`useCollapsedText`). Absent renders `text` as markdown directly.
|
|
132
155
|
*/
|
|
133
|
-
textSegments?:
|
|
156
|
+
textSegments?: TextSegment[];
|
|
157
|
+
/** Localised labels for the toggle button, attachment rows, and markdown code/table actions. */
|
|
158
|
+
labels?: UserMessageBubbleLabels;
|
|
134
159
|
}
|
|
135
160
|
/** Props for `AssistantMessageBubble`. */
|
|
136
161
|
export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
|
|
@@ -155,14 +180,6 @@ export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
|
|
|
155
180
|
beforeContent?: ReactNode;
|
|
156
181
|
/** react-markdown component overrides. Use to inject custom renderers (e.g. citation markers) into markdown elements. */
|
|
157
182
|
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
183
|
/** Quick-reply buttons rendered below the message text when non-empty. */
|
|
167
184
|
starters?: StarterOption[];
|
|
168
185
|
/** Fires with the clicked `StarterOption`. */
|
|
@@ -175,10 +192,6 @@ export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
|
|
|
175
192
|
deploymentIconUrl?: string;
|
|
176
193
|
/** Deployment name used as the icon's accessible label. */
|
|
177
194
|
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
195
|
/** Localised labels for quick replies, the thinking indicator, and code block copy actions. */
|
|
183
196
|
labels?: AssistantMessageBubbleLabels;
|
|
184
197
|
}
|
|
@@ -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;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AAC;IAC1B,yHAAyH;IACzH,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,0EAA0E;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.130",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,13 +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.3.0-dev.
|
|
22
|
+
"@epam/ai-dial-attachment-input": "1.3.0-dev.130"
|
|
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.130",
|
|
28
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.22"
|
|
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"}
|