@robono/messaging-react-native 0.23.0 → 0.24.0
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/CHANGELOG.md +20 -0
- package/README.md +83 -4
- package/RobonoMessagingRuntime.podspec +14 -0
- package/SBOM.spdx.json +893 -269
- package/android/build.gradle +7 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/robono/messaging/RobonoBackupCrypto.java +27 -0
- package/android/src/main/java/com/robono/messaging/RobonoMessagingPackage.java +11 -0
- package/app.plugin.cjs +8 -2
- package/dist/account.d.ts +4 -1
- package/dist/account.js +33 -11
- package/dist/attachment-preview.d.ts +11 -10
- package/dist/attachment-preview.js +15 -12
- package/dist/backup.d.ts +24 -0
- package/dist/backup.js +157 -0
- package/dist/brand.js +4 -4
- package/dist/bubble-design.js +5 -3
- package/dist/contact-directory.d.ts +3 -1
- package/dist/contact-directory.js +3 -3
- package/dist/conversation-details.js +1 -1
- package/dist/delivery-bar.d.ts +2 -1
- package/dist/delivery-bar.js +2 -2
- package/dist/directory-navigation.d.ts +25 -0
- package/dist/directory-navigation.js +69 -0
- package/dist/expo-backup-crypto.d.ts +3 -0
- package/dist/expo-backup-crypto.js +17 -0
- package/dist/expo-backup-passkeys.d.ts +7 -0
- package/dist/expo-backup-passkeys.js +22 -0
- package/dist/expo-backup-settings.d.ts +4 -0
- package/dist/expo-backup-settings.js +41 -0
- package/dist/expo-inbox-preferences.d.ts +3 -0
- package/dist/expo-inbox-preferences.js +9 -0
- package/dist/expo-media.js +3 -3
- package/dist/expo-messenger.js +10 -5
- package/dist/expo-reviews.d.ts +3 -0
- package/dist/expo-reviews.js +40 -0
- package/dist/expo-screen.js +58 -25
- package/dist/expo-thumbnails.d.ts +4 -0
- package/dist/expo-thumbnails.js +25 -3
- package/dist/expo.d.ts +4 -0
- package/dist/expo.js +4 -0
- package/dist/forward.js +2 -2
- package/dist/header-colors.d.ts +5 -0
- package/dist/header-colors.js +7 -0
- package/dist/inbox.d.ts +5 -2
- package/dist/inbox.js +25 -53
- package/dist/index.d.ts +8 -5
- package/dist/index.js +78 -36
- package/dist/loading-messages.d.ts +5 -0
- package/dist/loading-messages.js +10 -0
- package/dist/media-access.d.ts +8 -0
- package/dist/media-access.js +6 -1
- package/dist/popup.d.ts +6 -3
- package/dist/popup.js +6 -6
- package/dist/reviews.d.ts +15 -0
- package/dist/reviews.js +204 -0
- package/dist/scheduled.js +5 -5
- package/ios/RobonoBackupCrypto.m +30 -0
- package/package.json +15 -6
package/dist/inbox.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useDirectoryNavigation, MessagingDirectoryConversation } from './directory-navigation.js';
|
|
2
3
|
import { MessagingBrand } from './brand.js';
|
|
3
4
|
import { messagingScreenAppearance, messagingContrastInk, messagingAvatarStyle, messagingFriendsColors, messagingMenuColors, messagingMenuLayout } from '@robono/messaging';
|
|
4
5
|
import { directoryWithoutChats, MessagingDirectoryRow } from './contact-directory.js';
|
|
@@ -10,11 +11,11 @@ import { MessageMenuRow } from './message-menu.js';
|
|
|
10
11
|
import { InboxMessageSearch } from './inbox-search.js';
|
|
11
12
|
import { MessageIcon } from './icons.js';
|
|
12
13
|
import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
13
|
-
import { AppState, FlatList, Image, Platform, Pressable, ScrollView, View } from 'react-native';
|
|
14
|
+
import { AppState, FlatList, Image, Platform, Pressable, ScrollView, StyleSheet, View } from 'react-native';
|
|
14
15
|
import { defaultMessagingSettings } from '@robono/messaging';
|
|
15
16
|
import { MessagingPopup, MessagingMenuSurface, MessagingPopupHeaderBoundary, useMessagingPopupColors, messagingPopupBackdrop } from './popup.js';
|
|
16
17
|
/** Compact Messenger chat rows: avatar, name, last message, time and unread badge. */
|
|
17
|
-
export function MessagingInbox({ client, userId, contacts = {}, appearance, active = true, manageUpdates = true, onSelect, onDeleted, companyName, headerActions, searchText, selectedId, query: controlledQuery, onSearchChange, viewMemory, directory = [], onOpenDirectoryContact }) {
|
|
18
|
+
export function MessagingInbox({ client, userId, selfAvatarUrl, contacts = {}, appearance, active = true, manageUpdates = true, onSelect, onDeleted, companyName, headerActions, searchText, selectedId, query: controlledQuery, onSearchChange, viewMemory, directory = [], onOpenDirectoryContact, onDirectorySelect, onNewConversation }) {
|
|
18
19
|
const { text: uiText, locale: uiLocale, number: uiNumber, count: uiCount } = useRobonoLocale();
|
|
19
20
|
const state = useSyncExternalStore(client.subscribe, client.getSnapshot, client.getSnapshot), design = messagingScreenAppearance(appearance ?? state.appearance ?? defaultMessagingSettings().appearance), c = messagingFriendsColors(design), friends = design.screens?.friends;
|
|
20
21
|
const messagingPopupColors = useMessagingPopupColors(design, 'alerts');
|
|
@@ -27,55 +28,24 @@ export function MessagingInbox({ client, userId, contacts = {}, appearance, acti
|
|
|
27
28
|
const [localQuery, setLocalQuery] = useState(memory.query);
|
|
28
29
|
const query = friends?.showSearch === false ? '' : controlledQuery ?? localQuery;
|
|
29
30
|
const setQuery = (value) => { memory.query = value; (onSearchChange ?? setLocalQuery)(value); };
|
|
31
|
+
const [searchOpen, setSearchOpen] = useState(!!query), searchInput = useRef(null);
|
|
32
|
+
const closeSearch = () => { setQuery(''); setSearchOpen(false); };
|
|
33
|
+
useEffect(() => { if (query)
|
|
34
|
+
setSearchOpen(true); }, [query]);
|
|
35
|
+
useEffect(() => { if (searchOpen) {
|
|
36
|
+
const frame = requestAnimationFrame(() => searchInput.current?.focus());
|
|
37
|
+
return () => cancelAnimationFrame(frame);
|
|
38
|
+
} }, [searchOpen]);
|
|
30
39
|
const scroll = useInboxScroll(memory, 'chats:' + query.trim(), state.conversations.length > 0 && !state.loading, !state.hasMore);
|
|
31
40
|
const [selected, setSelected] = useState(null), [confirm, setConfirm] = useState(false), [busy, setBusy] = useState(false), [error, setError] = useState('');
|
|
32
|
-
const avatar = messagingAvatarStyle(friends?.avatarSize ??
|
|
33
|
-
const title = (row) => row.contactId === userId ? uiText('
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
cancelDirectory(); }); return () => sub.remove(); }, []);
|
|
41
|
-
useEffect(() => { if (!active)
|
|
42
|
-
cancelDirectory(); }, [active]);
|
|
43
|
-
useEffect(() => { if (directorySelection) {
|
|
44
|
-
const current = directory.find(c => c.id === directorySelection.id);
|
|
45
|
-
if (!current || current.available !== directorySelection.available || current.contactId !== directorySelection.contactId)
|
|
46
|
-
cancelDirectory();
|
|
47
|
-
} }, [directory, directorySelection]);
|
|
48
|
-
async function openDirectory(entry) {
|
|
49
|
-
directoryRequest.current?.abort();
|
|
50
|
-
setDirectorySelection(entry);
|
|
51
|
-
setDirectoryError('');
|
|
52
|
-
setDirectoryBusy(false);
|
|
53
|
-
if (!entry.available || !onOpenDirectoryContact)
|
|
54
|
-
return;
|
|
55
|
-
const control = new AbortController();
|
|
56
|
-
directoryRequest.current = control;
|
|
57
|
-
setDirectoryBusy(true);
|
|
58
|
-
try {
|
|
59
|
-
const row = await onOpenDirectoryContact(entry, control.signal);
|
|
60
|
-
const current = directoryRef.current.find(c => c.id === entry.id);
|
|
61
|
-
if (control.signal.aborted || !current?.available || current.contactId !== entry.contactId)
|
|
62
|
-
return;
|
|
63
|
-
setDirectorySelection(null);
|
|
64
|
-
onSelect(row);
|
|
65
|
-
}
|
|
66
|
-
catch (e) {
|
|
67
|
-
if (!control.signal.aborted)
|
|
68
|
-
setDirectoryError(e instanceof Error ? e.message : uiText('This conversation is unavailable.'));
|
|
69
|
-
}
|
|
70
|
-
finally {
|
|
71
|
-
if (directoryRequest.current === control) {
|
|
72
|
-
directoryRequest.current = null;
|
|
73
|
-
setDirectoryBusy(false);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
const directoryRows = directoryWithoutChats(directory, state.conversations, query);
|
|
78
|
-
const inboxRows = [...state.conversations.filter(row => !query.trim() || [title(row), row.lastMessage?.text ?? '', searchText?.(row) ?? ''].join(' ').toLocaleLowerCase().includes(query.trim().toLocaleLowerCase())).map(chat => ({ kind: 'chat', chat })), ...directoryRows.map(entry => ({ kind: 'directory', entry }))];
|
|
41
|
+
const avatar = messagingAvatarStyle(friends?.avatarSize ?? 48, friends?.avatarShape), rowPadding = friends?.rowSpacing === 'compact' ? 6 : friends?.rowSpacing === 'relaxed' ? 16 : 12;
|
|
42
|
+
const title = (row) => row.contactId === userId ? uiText('Me') : row.kind === 'group' ? row.name ?? 'Group' : contacts[row.contactId ?? '']?.name ?? row.contactId ?? 'Chat';
|
|
43
|
+
const directoryNavigation = useDirectoryNavigation({ directory, onOpenDirectoryContact, scope: client, userId, active, onOpen: onSelect });
|
|
44
|
+
const openDirectory = (entry) => onDirectorySelect ? onDirectorySelect(entry) : directoryNavigation.open(entry);
|
|
45
|
+
const isSelf = (row) => row.kind === 'direct' && row.contactId === userId;
|
|
46
|
+
const visibleChats = state.conversations.filter(row => state.showSelf !== false || !isSelf(row)).sort((a, b) => Number(isSelf(b)) - Number(isSelf(a)));
|
|
47
|
+
const directoryRows = directoryWithoutChats(directory.filter(entry => entry.contactId !== userId), state.conversations, query);
|
|
48
|
+
const inboxRows = [...visibleChats.filter(row => !query.trim() || [title(row), row.lastMessage?.text ?? '', searchText?.(row) ?? ''].join(' ').toLocaleLowerCase().includes(query.trim().toLocaleLowerCase())).map(chat => ({ kind: 'chat', chat })), ...directoryRows.map(entry => ({ kind: 'directory', entry }))];
|
|
79
49
|
const rows = useRef(new Map()), pending = useRef(null);
|
|
80
50
|
const [menuVisible, setMenuVisible] = useState(false), [confirmVisible, setConfirmVisible] = useState(false), [anchor, setAnchor] = useState({ x: 12, y: 88 });
|
|
81
51
|
const openOptions = (row) => { if (!state.inboxActionsAvailable)
|
|
@@ -112,18 +82,20 @@ export function MessagingInbox({ client, userId, contacts = {}, appearance, acti
|
|
|
112
82
|
} }
|
|
113
83
|
const preview = (row) => { const m = row.lastMessage; if (!m)
|
|
114
84
|
return 'No messages yet'; const text = m.kind === 'text' ? m.text ?? '' : ({ voice: 'Voice message', image: 'Photo', video: 'Video', document: 'Document', poll: 'Poll' }[m.kind] ?? 'Message'); return (m.senderId === userId ? 'You: ' : '') + text; };
|
|
115
|
-
|
|
85
|
+
if (directoryNavigation.selection)
|
|
86
|
+
return _jsx(MessagingDirectoryConversation, { entry: directoryNavigation.selection, busy: directoryNavigation.busy, error: directoryNavigation.error, appearance: design, onBack: directoryNavigation.cancel, onRetry: () => void directoryNavigation.open(directoryNavigation.selection) });
|
|
87
|
+
return _jsx(MessagingTypography, { appearance: design, children: _jsxs(View, { style: { flex: 1, minHeight: 0, backgroundColor: c.background }, children: [_jsx(MessagingPopupHeaderBoundary, { children: _jsxs(View, { testID: "messaging-inbox-header", style: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', backgroundColor: friends?.headerBackground ?? c.background, minHeight: friends?.headerSize === 'compact' ? 48 : friends?.headerSize === 'roomy' ? 80 : 64, paddingHorizontal: 16, paddingVertical: 8, gap: 8 }, children: [_jsx(MessagingBrand, { appearance: design, companyName: companyName }), _jsxs(View, { style: { flexDirection: 'row', alignItems: 'center', gap: 8 }, children: [friends?.showSearch !== false && _jsx(Pressable, { testID: "messaging-inbox-search-toggle", accessibilityRole: "button", accessibilityLabel: uiText('Search chats'), accessibilityState: { expanded: searchOpen }, onPress: () => searchOpen ? closeSearch() : setSearchOpen(true), style: { width: 44, height: 44, alignItems: 'center', justifyContent: 'center' }, children: _jsx(MessageIcon, { name: "search", size: 23, color: friends?.headerText ?? c.foreground }) }), headerActions] })] }) }), friends?.showSearch !== false && searchOpen && _jsxs(View, { testID: "messaging-inbox-search", style: { minHeight: 46, marginHorizontal: 12, marginTop: 2, marginBottom: 4, flexDirection: 'row', alignItems: 'center', gap: 8, borderRadius: 23, borderWidth: 1, borderColor: c.background, paddingHorizontal: 12, backgroundColor: c.foreground + '26' }, children: [_jsx(MessageIcon, { name: "search", size: 18, color: c.secondary }), _jsx(TextInput, { ref: searchInput, accessibilityLabel: uiText("Search chats"), placeholder: uiText("Search chats"), placeholderTextColor: c.secondary, value: query, onChangeText: setQuery, maxLength: 200, autoCapitalize: "none", autoCorrect: false, style: { flex: 1, minWidth: 0, minHeight: 44, paddingVertical: 8, color: c.foreground, fontSize: 15 } }), _jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: uiText("Close chat search"), onPress: closeSearch, style: { width: 44, height: 44, alignItems: 'center', justifyContent: 'center' }, children: _jsx(MessageIcon, { name: "close", size: 14, color: c.secondary }) })] }), state.error && _jsxs(View, { style: { padding: 12 }, children: [_jsx(Text, { accessibilityRole: "alert", style: { color: c.foreground }, children: state.error }), _jsx(Pressable, { accessibilityRole: "button", onPress: () => void client.refresh().catch(() => { }), children: _jsx(Text, { style: { color: c.accent, paddingVertical: 8 }, children: uiText("Try again") }) })] }), query.trim() && state.globalSearchAvailable ? _jsx(InboxMessageSearch, { viewMemory: memory, client: client, query: query.trim(), appearance: { ...design, colors: c }, name: title, chats: visibleChats.filter(row => title(row).toLocaleLowerCase().includes(query.trim().toLocaleLowerCase())), onSelect: onSelect, directoryHeader: directoryRows.map(entry => _jsx(MessagingDirectoryRow, { contact: entry, appearance: design, onPress: () => void openDirectory(entry) }, entry.id)) }, userId) : _jsx(FlatList, { ...scroll, testID: "messaging-inbox-list", data: inboxRows, keyExtractor: row => row.kind === 'chat' ? 'chat:' + row.chat.id : 'directory:' + row.entry.id, contentContainerStyle: { flexGrow: 1, paddingBottom: onNewConversation ? 100 : 0 }, ItemSeparatorComponent: () => friends?.showDividers === false ? null : _jsx(View, { style: { height: StyleSheet.hairlineWidth, backgroundColor: c.foreground + '26', width: '88%', alignSelf: 'center' } }), ListEmptyComponent: _jsx(Text, { style: { padding: 20, textAlign: 'center', color: c.secondary }, children: state.loading ? uiText("Loading chats…") : state.error ? '' : query ? uiText("No matching chats.") : uiText("No chats yet") }), ListFooterComponent: state.hasMore ? _jsx(Pressable, { accessibilityRole: "button", disabled: state.loading, onPress: () => void client.loadMore().catch(() => { }), children: _jsx(Text, { style: { padding: 12, textAlign: 'center', color: c.accent }, children: state.loading ? uiText("Loading…") : uiText("More chats") }) }) : null, renderItem: ({ item: row }) => {
|
|
116
88
|
if (row.kind === 'directory')
|
|
117
89
|
return _jsx(MessagingDirectoryRow, { contact: row.entry, appearance: design, onPress: () => void openDirectory(row.entry) });
|
|
118
90
|
const item = row.chat;
|
|
119
|
-
const person = item.contactId ? contacts[item.contactId] : undefined, title = item.contactId === userId ? uiText('
|
|
91
|
+
const person = isSelf(item) ? { name: 'Me', avatarUrl: selfAvatarUrl ?? contacts[userId]?.avatarUrl } : item.contactId ? contacts[item.contactId] : undefined, title = item.contactId === userId ? uiText('Me') : item.kind === 'group' ? item.name ?? 'Group' : person?.name ?? item.contactId ?? 'Chat';
|
|
120
92
|
const date = item.lastMessage ? new Date(item.lastMessage.createdAt) : null;
|
|
121
93
|
return _jsxs(Pressable, { ref: node => { if (node)
|
|
122
94
|
rows.current.set(item.id, node);
|
|
123
95
|
else
|
|
124
96
|
rows.current.delete(item.id); }, accessibilityRole: "button", accessibilityState: { selected: item.id === selectedId }, accessibilityLabel: item.unreadCount ? uiText('{name}, {count} unread', { name: title, count: uiNumber(item.unreadCount) }) : title, onPress: () => onSelect(item), onLongPress: () => openOptions(item), accessibilityActions: state.inboxActionsAvailable ? [{ name: 'showOptions', label: uiText("Chat options") }] : [], onAccessibilityAction: e => { if (e.nativeEvent.actionName === 'showOptions')
|
|
125
|
-
openOptions(item); }, ...(Platform.OS === 'web' ? { onContextMenu: (e) => { e.preventDefault(); openOptions(item); } } : {}), style: { flexDirection: 'row', alignItems: 'center', gap: 12, paddingHorizontal:
|
|
126
|
-
} }),
|
|
97
|
+
openOptions(item); }, ...(Platform.OS === 'web' ? { onContextMenu: (e) => { e.preventDefault(); openOptions(item); } } : {}), style: { flexDirection: 'row', alignItems: 'center', gap: 12, paddingHorizontal: 16, paddingVertical: rowPadding, minHeight: Math.max(44, avatar.height + rowPadding * 2), backgroundColor: item.id === selectedId ? c.accent + '15' : undefined }, children: [friends?.showAvatars !== false && (person?.avatarUrl ? _jsx(Image, { source: { uri: person.avatarUrl }, style: { ...avatar } }) : _jsx(View, { style: { ...avatar, backgroundColor: c.accent + '20', alignItems: 'center', justifyContent: 'center' }, children: _jsx(Text, { style: { color: c.accent, fontSize: 18, fontWeight: '700' }, children: title.slice(0, 1).toUpperCase() }) })), _jsxs(View, { style: { flex: 1, minWidth: 0, flexDirection: 'row', alignItems: 'flex-start', gap: 8 }, children: [_jsxs(View, { style: { flex: 1, minWidth: 0 }, children: [_jsx(Text, { numberOfLines: 1, style: { color: c.foreground, fontSize: friends?.nameSize ?? 16, fontWeight: '700' }, children: title }), friends?.showPreview !== false && _jsx(Text, { numberOfLines: friends?.previewLines ?? 1, style: { color: c.secondary, marginTop: 3, fontSize: friends?.previewSize ?? 14 }, children: preview(item) })] }), _jsxs(View, { testID: "messaging-inbox-row-meta", style: { flexShrink: 0, minWidth: 48, alignItems: 'flex-end', gap: 4, paddingTop: 1 }, children: [_jsxs(View, { style: { flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-end', gap: 4 }, children: [item.muted && _jsx(MessageIcon, { name: "notifications-off-outline", size: 13, color: c.secondary }), friends?.showTime !== false && _jsx(Text, { style: { color: item.unreadCount ? c.accent : c.secondary, fontSize: 12 }, children: date ? date.toLocaleTimeString(uiLocale, { hour: 'numeric', minute: '2-digit' }) : '' })] }), friends?.showUnread !== false && item.unreadCount > 0 && _jsx(View, { style: { minWidth: friends?.unreadStyle === 'dot' ? 10 : 20, height: friends?.unreadStyle === 'dot' ? 10 : 20, borderRadius: 10, borderWidth: 1.5, borderColor: c.accent, backgroundColor: friends?.unreadStyle === 'filled' || friends?.unreadStyle === 'dot' ? c.accent : undefined, alignItems: 'center', justifyContent: 'center', paddingHorizontal: friends?.unreadStyle === 'dot' ? 0 : 5 }, children: friends?.unreadStyle !== 'dot' && _jsx(Text, { style: { color: friends?.unreadStyle === 'filled' ? messagingContrastInk(c.accent) : c.accent, fontSize: 10, fontWeight: '900' }, children: item.unreadCount > 99 ? '99+' : item.unreadCount }) })] })] })] });
|
|
98
|
+
} }), onNewConversation && design.menus?.friends?.items?.newChat !== false && _jsxs(Pressable, { testID: "messaging-new-message", accessibilityRole: "button", accessibilityLabel: uiText('New message'), onPress: onNewConversation, style: { position: 'absolute', end: 16, bottom: 32, minWidth: 124, height: 52, paddingHorizontal: 18, flexDirection: 'row', gap: 9, borderRadius: 26, backgroundColor: c.accent, alignItems: 'center', justifyContent: 'center', boxShadow: '0 8px 12px #0005', elevation: 8 }, children: [_jsx(MessageIcon, { name: "chat", size: 24, color: messagingContrastInk(c.accent) }), _jsx(Text, { style: { color: messagingContrastInk(c.accent), fontSize: 16, fontWeight: '600' }, children: uiText('Message') })] }), selected && _jsxs(_Fragment, { children: [_jsx(MessagingMenuSurface, { visible: menuVisible, onDismiss: dismissed, onClose: () => { if (!busy)
|
|
127
99
|
setSelected(null); }, children: rect => {
|
|
128
100
|
const palette = messagingMenuColors(design, 'friends'), menuLayout = messagingMenuLayout(design.menus?.friends);
|
|
129
101
|
const width = Math.min(218, rect.width - 24), top = Math.max(12, Math.min(anchor.y - rect.top, rect.height - 124));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { messagingHeaderColors } from './header-colors.js';
|
|
2
|
+
export { MessagingReviewInbox } from './reviews.js';
|
|
3
|
+
export type { MessagingReviewInboxProps } from './reviews.js';
|
|
1
4
|
import { type ConversationActions } from './chat-options.js';
|
|
2
5
|
export type { ConversationActions } from './chat-options.js';
|
|
3
6
|
import { type MessagingHeaderOptions } from './conversation-selector.js';
|
|
@@ -126,6 +129,8 @@ export interface MessagingScreenProps {
|
|
|
126
129
|
language?: string;
|
|
127
130
|
}>;
|
|
128
131
|
appearance?: MessagingAppearance;
|
|
132
|
+
/** Appearance already loaded by the inbox, used until conversation settings arrive. */
|
|
133
|
+
initialAppearance?: MessagingAppearance;
|
|
129
134
|
components?: MessagingComponents;
|
|
130
135
|
style?: StyleProp<ViewStyle>;
|
|
131
136
|
/** Set false when this conversation is covered by another route. */
|
|
@@ -195,10 +200,6 @@ export declare function GroupDiscussion({ threadRoot, onClose }: {
|
|
|
195
200
|
threadRoot?: string;
|
|
196
201
|
onClose: () => void;
|
|
197
202
|
}): React.JSX.Element;
|
|
198
|
-
export declare function messagingHeaderColors(design: MessagingAppearance, group: boolean): {
|
|
199
|
-
background: string;
|
|
200
|
-
foreground: string;
|
|
201
|
-
};
|
|
202
203
|
export declare function MessagingHeader({ children }?: {
|
|
203
204
|
children?: ReactNode;
|
|
204
205
|
}): React.JSX.Element;
|
|
@@ -216,7 +217,8 @@ export declare function MessageDeletion({ messages, onClose }: {
|
|
|
216
217
|
export declare function MessagingList(): React.JSX.Element;
|
|
217
218
|
export declare function MessagingComposer(): React.JSX.Element;
|
|
218
219
|
/** Account navigation. Mount in the inbox/app toolbar, never in a contact menu. */
|
|
219
|
-
export declare function MessagingAccountMenu({ onNewConversation, onNewGroup, onMaps, onPublicRooms }?: {
|
|
220
|
+
export declare function MessagingAccountMenu({ inbox, onNewConversation, onNewGroup, onMaps, onPublicRooms }?: {
|
|
221
|
+
inbox?: import('@robono/messaging').MessagingInboxClient;
|
|
220
222
|
onNewConversation?: () => void;
|
|
221
223
|
onNewGroup?: () => void;
|
|
222
224
|
onMaps?: () => void;
|
|
@@ -229,3 +231,4 @@ export { MessagingInbox, type MessagingInboxProps } from './inbox.js';
|
|
|
229
231
|
export type { PlaybackProps } from './media-ui.js';
|
|
230
232
|
export type { InboxViewMemory } from './inbox-view.js';
|
|
231
233
|
export type { MessagingDirectoryContact, MessagingDirectoryOptions } from './contact-directory.js';
|
|
234
|
+
export { MessagingBackupScreen } from './backup.js';
|