3f1f89dfbe
Turns the SDK from hooks-only into a real UI SDK: <Messenger> (conversation list + open thread + composer), plus <ConversationList> and <Thread>, all driven by the existing useConversations/useMessages hooks over the injected adapter — zero transport imports (boundary intact). - themeable via --miu-* CSS variables; default theme ships as ./styles.css - optimistic send, typing indicator, seen ticks, reactions display, unread badges - render smoke tests (jsdom + MockAdapter): mounts, auto-selects first thread, sends a message, switches threads (3 tests) — 48 total green - tsup: css bundled to dist/styles.css; dts scoped to TS entries Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
// Public API. Components land in Plan 2; adapters/kernel in Plan 3.
|
|
//
|
|
// `runAdapterConformance` is deliberately NOT exported here — it imports vitest and
|
|
// ships from the './conformance' subpath so consumers never pull a test runner into
|
|
// their production bundle.
|
|
export { MessagingProvider, useAdapter } from './provider';
|
|
export { useConversations } from './hooks/use-conversations';
|
|
export { useMessages } from './hooks/use-messages';
|
|
export { isOwnMessage } from './types';
|
|
|
|
// Rendered UI. Pair with the './styles.css' export (or override the --miu-* tokens).
|
|
export { Messenger } from './components/messenger';
|
|
export { ConversationList } from './components/conversation-list';
|
|
export { Thread } from './components/thread';
|
|
|
|
export type { MessagingAdapter } from './adapter';
|
|
export type { ConversationsState } from './hooks/use-conversations';
|
|
export type { MessagesState, UiMessage } from './hooks/use-messages';
|
|
export type {
|
|
Attachment,
|
|
Conversation,
|
|
Membership,
|
|
Message,
|
|
MessageEvent,
|
|
Person,
|
|
Reaction,
|
|
SendOpts,
|
|
Unsubscribe,
|
|
} from './types';
|