/**
* Message — a chat turn: avatar, bubble, and the metadata around it.
*
* The pieces are separate because conversations differ in which ones they
* need. A support thread wants a sender name and a read receipt; an assistant
* transcript wants neither, but does want the bubble to carry tool output and
* actions. Composing them beats a component with a dozen optional props.
*
* `align` is the only thing the root decides, and everything downstream reads
* it from context: which side the row sits on, which way the avatar goes,
* which corner of the bubble is squared off, and which colour it takes.
*
* ```tsx
*
*
*
* How can I help?
*
*
*
* ```
*/
import { type ReactNode } from 'react';
import { View, type GestureResponderEvent, type ViewProps } from 'react-native';
import { type VariantProps } from 'tailwind-variants';
import { type TextProps } from '../../primitives/text.js';
declare const messageVariants: import("tailwind-variants").TVReturnType<{
align: {
start: {
root: string;
content: string;
bubble: string;
bubbleContent: string;
header: string;
footer: string;
};
end: {
root: string;
content: string;
bubble: string;
bubbleContent: string;
header: string;
footer: string;
};
};
}, {
root: string;
avatar: string;
content: string;
header: string;
bubble: string;
bubbleContent: string;
footer: string;
group: string;
}, undefined, {
align: {
start: {
root: string;
content: string;
bubble: string;
bubbleContent: string;
header: string;
footer: string;
};
end: {
root: string;
content: string;
bubble: string;
bubbleContent: string;
header: string;
footer: string;
};
};
}, {
root: string;
avatar: string;
content: string;
header: string;
bubble: string;
bubbleContent: string;
footer: string;
group: string;
}, import("tailwind-variants").TVReturnType<{
align: {
start: {
root: string;
content: string;
bubble: string;
bubbleContent: string;
header: string;
footer: string;
};
end: {
root: string;
content: string;
bubble: string;
bubbleContent: string;
header: string;
footer: string;
};
};
}, {
root: string;
avatar: string;
content: string;
header: string;
bubble: string;
bubbleContent: string;
footer: string;
group: string;
}, undefined, unknown, unknown, undefined>>;
type Align = 'start' | 'end';
export interface MessageProps extends ViewProps, VariantProps {
className?: string;
/**
* Which side of the conversation this turn belongs to. `end` is the
* outgoing side — the person holding the device.
*/
align?: Align;
/**
* Continuation of the message above it: tighter spacing, and the avatar slot
* is reserved but left empty so bubbles stay aligned. `Message.Group` sets
* this for you.
*/
stacked?: boolean;
/**
* Fires on a long press anywhere on the turn — the gesture a chat uses to
* surface per-message actions (copy, reply, react). Open a menu from it; the
* component only exposes the press. When set, the whole row gains press
* feedback. A plain tap should still do nothing, so there is no `onPress`.
*/
onLongPress?: (event: GestureResponderEvent) => void;
children?: ReactNode;
}
export interface MessageGroupProps extends ViewProps {
className?: string;
/** Alignment applied to every Message inside that does not set its own. */
align?: Align;
children?: ReactNode;
}
export interface MessageAvatarProps extends ViewProps {
className?: string;
children?: ReactNode;
}
export interface MessageContentProps extends ViewProps {
className?: string;
children?: ReactNode;
}
export interface MessageHeaderProps extends TextProps {
className?: string;
}
export interface MessageBubbleProps extends ViewProps {
className?: string;
children?: ReactNode;
}
export interface MessageBubbleContentProps extends TextProps {
className?: string;
}
export interface MessageFooterProps extends TextProps {
className?: string;
}
export interface MessageActionsProps extends ViewProps {
className?: string;
children?: ReactNode;
}
export declare const Message: import("react").ForwardRefExoticComponent> & {
Group: import("react").ForwardRefExoticComponent>;
Avatar: import("react").ForwardRefExoticComponent>;
Content: import("react").ForwardRefExoticComponent>;
Header: import("react").ForwardRefExoticComponent>;
Bubble: import("react").ForwardRefExoticComponent>;
BubbleContent: import("react").ForwardRefExoticComponent>;
Footer: import("react").ForwardRefExoticComponent>;
Actions: import("react").ForwardRefExoticComponent>;
};
export {};
//# sourceMappingURL=index.d.ts.map