tekivex-ui 3.18.1 → 3.18.2
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/README.md +7 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +285 -268
- package/dist/src/components/TkxMessageThread.d.ts +57 -0
- package/dist/src/components/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
export type PeerPresence = 'online' | 'offline' | 'away' | 'unknown';
|
|
3
|
+
export type MessageDeliveryState = 'sending' | 'sent' | 'delivered' | 'read' | 'failed';
|
|
4
|
+
export interface PeerSender {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
avatar?: string;
|
|
8
|
+
presence?: PeerPresence;
|
|
9
|
+
role?: string;
|
|
10
|
+
}
|
|
11
|
+
export type AttachmentKind = 'image' | 'file' | 'audio' | 'video';
|
|
12
|
+
export interface PeerAttachment {
|
|
13
|
+
id: string;
|
|
14
|
+
kind: AttachmentKind;
|
|
15
|
+
name: string;
|
|
16
|
+
url: string;
|
|
17
|
+
mimeType: string;
|
|
18
|
+
size?: number;
|
|
19
|
+
width?: number;
|
|
20
|
+
height?: number;
|
|
21
|
+
duration?: number;
|
|
22
|
+
thumbnail?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface PeerReaction {
|
|
25
|
+
emoji: string;
|
|
26
|
+
by: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface PeerMessage {
|
|
29
|
+
id: string;
|
|
30
|
+
senderId: string;
|
|
31
|
+
text?: string;
|
|
32
|
+
attachments?: PeerAttachment[];
|
|
33
|
+
reactions?: PeerReaction[];
|
|
34
|
+
replyTo?: string;
|
|
35
|
+
timestamp: Date | string;
|
|
36
|
+
editedAt?: Date | string;
|
|
37
|
+
deletedAt?: Date | string;
|
|
38
|
+
delivery?: MessageDeliveryState;
|
|
39
|
+
}
|
|
40
|
+
export interface TkxMessageThreadProps {
|
|
41
|
+
messages: PeerMessage[];
|
|
42
|
+
senders: Record<string, PeerSender>;
|
|
43
|
+
currentUserId: string;
|
|
44
|
+
onSend?: (text: string, replyTo?: string) => void | Promise<void>;
|
|
45
|
+
onReact?: (messageId: string, emoji: string) => void | Promise<void>;
|
|
46
|
+
onEdit?: (messageId: string, newText: string) => void | Promise<void>;
|
|
47
|
+
onDelete?: (messageId: string) => void | Promise<void>;
|
|
48
|
+
onAttach?: (files: File[]) => void | Promise<void>;
|
|
49
|
+
height?: string | number;
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
showTimeSeparators?: boolean;
|
|
52
|
+
groupConsecutive?: boolean;
|
|
53
|
+
emojiPickerOptions?: string[];
|
|
54
|
+
className?: string;
|
|
55
|
+
style?: CSSProperties;
|
|
56
|
+
}
|
|
57
|
+
export declare function TkxMessageThread({ messages, senders, currentUserId, onSend, onReact, onEdit, onDelete, onAttach, height, placeholder, showTimeSeparators, groupConsecutive, emojiPickerOptions, className, style, }: TkxMessageThreadProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,6 +21,7 @@ export * from './TkxToast';
|
|
|
21
21
|
export * from './TkxAccordion';
|
|
22
22
|
export * from './TkxDrawer';
|
|
23
23
|
export * from './TkxChat';
|
|
24
|
+
export * from './TkxMessageThread';
|
|
24
25
|
export * from './TkxTag';
|
|
25
26
|
export * from './TkxTimeline';
|
|
26
27
|
export * from './TkxDatePicker';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tekivex-ui",
|
|
3
|
-
"version": "3.18.
|
|
4
|
-
"description": "Production-grade React component library —
|
|
3
|
+
"version": "3.18.2",
|
|
4
|
+
"description": "Production-grade React component library — 116 components (plus 4 experimental, opt-in), WCAG 2.1 AAA, WAI-ARIA 1.2, built-in security kernel with published threat model, built-in charts, headless primitives, zero-runtime CSS engine, 44-locale i18n, Indian KYC pack, agent runtime (Anthropic/OpenAI/Gemini/Ollama/MCP/A2A), TypeScript-first.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|