584 lines
28 KiB
TypeScript
584 lines
28 KiB
TypeScript
import { StyleSheet } from 'react-native'
|
|
import {
|
|
DEFAULT_CHAT_APPEARANCE,
|
|
floatingShadow,
|
|
radius,
|
|
resolveChatMetrics,
|
|
spacing,
|
|
typeForDensity,
|
|
type ChatAppearance,
|
|
type TypographyDensity,
|
|
} from '../../ui/theme'
|
|
import type { ThemeColors } from '../../ui/theme-context'
|
|
|
|
export function createStyles(
|
|
colors: ThemeColors,
|
|
density: TypographyDensity = 'compact',
|
|
appearance: ChatAppearance = DEFAULT_CHAT_APPEARANCE,
|
|
) {
|
|
const isCompact = density === 'compact'
|
|
const t = typeForDensity(density)
|
|
const m = resolveChatMetrics(density, appearance)
|
|
return StyleSheet.create({
|
|
flex: { flex: 1, backgroundColor: colors.background },
|
|
splitRoot: { flex: 1 },
|
|
splitRootWide: { flexDirection: 'row' },
|
|
splitSidebar: { width: 300, maxWidth: '38%', backgroundColor: colors.surface },
|
|
splitMain: { flex: 1, minWidth: 0 },
|
|
permissionChip: { minWidth: 0, flexShrink: 1, flexDirection: 'row', alignItems: 'center', gap: isCompact ? 4 : spacing.xs, paddingHorizontal: isCompact ? 8 : spacing.sm, height: isCompact ? 32 : 36, borderRadius: radius.pill, backgroundColor: colors.primarySoft, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.separator },
|
|
permissionChipDisabled: { opacity: 0.52 },
|
|
olderButton: { alignSelf: 'center', paddingVertical: isCompact ? 4 : spacing.xs, paddingHorizontal: spacing.md, marginBottom: isCompact ? 4 : spacing.sm },
|
|
olderText: { ...t.smallStrong, color: colors.primary },
|
|
// Floats over the newest row so jumping back never moves the composer.
|
|
// The layer is transparent to touches; only the button itself is a target.
|
|
latestTurnLayer: { position: 'absolute', left: 0, right: 0, bottom: spacing.sm, alignItems: 'center', paddingHorizontal: spacing.lg },
|
|
// Touch slop never exceeds the parent bounds, so the padding keeps the
|
|
// 44 dp circle reachable as the 48 dp target the design system asks for.
|
|
latestTurnColumn: { alignItems: 'flex-end', paddingVertical: 2 },
|
|
latestTurnButton: {
|
|
width: 40,
|
|
height: 40,
|
|
borderRadius: radius.pill,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
backgroundColor: colors.elevated,
|
|
borderWidth: StyleSheet.hairlineWidth,
|
|
borderColor: colors.separator,
|
|
...floatingShadow(colors, 'low'),
|
|
},
|
|
latestTurnButtonPressed: { opacity: 0.7 },
|
|
modalBackdrop: { flex: 1, backgroundColor: colors.modalBackdrop, justifyContent: 'flex-end' },
|
|
// Keep the sheet above the full-screen dismiss target on Android. Without an
|
|
// explicit stacking order, the transparent backdrop can win hit testing on
|
|
// some RN/Android combinations even though it is rendered first.
|
|
// maxHeight is applied by ModalSurface from the live window size (landscape phones get ~92%).
|
|
modalSheet: { zIndex: 1, elevation: 1, backgroundColor: colors.background, borderTopLeftRadius: radius.xxl, borderTopRightRadius: radius.xxl, padding: spacing.lg, paddingBottom: spacing.xxl },
|
|
modalHeader: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', gap: spacing.sm, marginBottom: spacing.md },
|
|
modalHeaderCopy: { minWidth: 0, flex: 1, flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
|
|
modalTitle: { ...t.heading, color: colors.ink, flexShrink: 1 },
|
|
modalListContent: { paddingBottom: spacing.xs },
|
|
pickerHint: { ...t.caption, color: colors.muted, marginBottom: spacing.sm },
|
|
pickerEmpty: { paddingVertical: spacing.md, gap: spacing.sm, alignItems: 'flex-start' },
|
|
modelGroupBlock: { marginBottom: spacing.md },
|
|
modelGroupTitle: { ...t.caption, color: colors.muted, textTransform: 'uppercase', marginBottom: spacing.xs },
|
|
modelOption: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 52, paddingHorizontal: spacing.md, paddingVertical: spacing.sm, borderRadius: radius.lg, borderWidth: 1, borderColor: 'transparent', backgroundColor: colors.grouped, marginBottom: spacing.xs },
|
|
modelOptionCurrent: { borderColor: colors.primary, backgroundColor: colors.primarySoft },
|
|
modelOptionCopy: { minWidth: 0, flex: 1 },
|
|
modelOptionName: { ...t.small, color: colors.ink },
|
|
permissionOption: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, minHeight: 52, paddingHorizontal: spacing.md, paddingVertical: spacing.sm, borderRadius: radius.lg, backgroundColor: colors.grouped, marginBottom: spacing.xs },
|
|
permissionOptionCopy: { flex: 1 },
|
|
permissionOptionName: { ...t.small, color: colors.ink },
|
|
permissionOptionDescription: { ...t.caption, color: colors.muted, marginTop: 2 },
|
|
modelFailures: { ...t.caption, color: colors.danger, marginTop: spacing.sm },
|
|
connectionBanner: {
|
|
alignSelf: 'center',
|
|
maxWidth: '92%',
|
|
minHeight: 30,
|
|
marginTop: spacing.xxs,
|
|
paddingHorizontal: 12,
|
|
paddingVertical: 5,
|
|
borderRadius: radius.pill,
|
|
backgroundColor: colors.warningSoft,
|
|
borderWidth: StyleSheet.hairlineWidth,
|
|
borderColor: colors.separator,
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
gap: 6,
|
|
...floatingShadow(colors, 'low'),
|
|
},
|
|
syncBanner: {
|
|
alignSelf: 'center',
|
|
maxWidth: '92%',
|
|
minHeight: 30,
|
|
marginTop: spacing.xxs,
|
|
paddingHorizontal: 12,
|
|
paddingVertical: 5,
|
|
borderRadius: radius.pill,
|
|
backgroundColor: colors.elevated,
|
|
borderWidth: StyleSheet.hairlineWidth,
|
|
borderColor: colors.separator,
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
gap: 6,
|
|
...floatingShadow(colors, 'low'),
|
|
},
|
|
connectionDot: { width: 7, height: 7, borderRadius: radius.pill, backgroundColor: colors.warning },
|
|
connectionBannerText: { ...t.caption, fontWeight: '500', color: colors.ink, flexShrink: 1 },
|
|
list: { flex: 1 },
|
|
listContent: { paddingHorizontal: isCompact ? 16 : spacing.lg, paddingTop: isCompact ? spacing.md : spacing.xl, paddingBottom: spacing.md, gap: isCompact ? 2 : spacing.xxs },
|
|
shortConversation: { flexGrow: 1, justifyContent: 'flex-end', paddingBottom: spacing.sm },
|
|
emptyList: { flexGrow: 1, justifyContent: 'center' },
|
|
messageRow: { flexDirection: 'row', alignItems: 'flex-start', gap: isCompact ? 6 : spacing.sm, marginVertical: isCompact ? 3 : spacing.xs },
|
|
messageRowUser: { flexDirection: 'row-reverse' },
|
|
assistantBlock: { alignSelf: 'stretch', gap: m.assistantGap, marginTop: Math.max(2, m.assistantGap - 2), marginBottom: m.turnBottomGap },
|
|
assistantText: { paddingHorizontal: 0 },
|
|
userBlock: { alignSelf: 'flex-end', maxWidth: '86%', marginTop: m.turnTopGap, marginBottom: m.turnBottomGap },
|
|
userContent: { paddingHorizontal: isCompact ? 14 : 16, paddingVertical: isCompact ? 10 : 12 },
|
|
userMediaOnly: { paddingHorizontal: 0, paddingVertical: 0 },
|
|
userSoftBubble: { backgroundColor: colors.userBubble ?? colors.surfaceStrong, borderRadius: 18, borderTopRightRadius: 6, maxWidth: '100%' },
|
|
userTintedBubble: { backgroundColor: colors.primarySoft, borderRadius: 18, borderTopRightRadius: 6, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, maxWidth: '100%' },
|
|
userSolidBubble: { backgroundColor: colors.primary, borderRadius: 18, borderTopRightRadius: 6, maxWidth: '100%' },
|
|
userMinimalBubble: { backgroundColor: 'transparent', borderRadius: 18, borderTopRightRadius: 6, borderWidth: 1, borderColor: colors.border, maxWidth: '100%' },
|
|
userBubble: { backgroundColor: colors.inverse, borderRadius: 18, borderTopRightRadius: 6, maxWidth: '100%' },
|
|
userMarkdownWrap: { marginBottom: -m.paragraphGap },
|
|
userMessageInlineWrap: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
flexWrap: 'wrap',
|
|
gap: 4,
|
|
},
|
|
userMessageInlineText: {
|
|
...t.body,
|
|
fontSize: m.bodyFontSize,
|
|
lineHeight: m.bodyLineHeight,
|
|
letterSpacing: m.letterSpacing,
|
|
color: colors.ink,
|
|
},
|
|
avatar: { width: isCompact ? 28 : 32, height: isCompact ? 28 : 32, borderRadius: radius.md, alignItems: 'center', justifyContent: 'center' },
|
|
avatarUser: { backgroundColor: colors.primary },
|
|
avatarAssistant: { backgroundColor: colors.primarySoft },
|
|
remoteAvatarLogo: { width: isCompact ? 28 : 32, height: isCompact ? 28 : 32 },
|
|
messageBody: { flex: 1, maxWidth: '88%' },
|
|
messageBodyUser: { alignItems: 'flex-end' },
|
|
messageLabel: { ...t.caption, color: colors.muted, marginBottom: isCompact ? 2 : 4 },
|
|
messageImages: { flexDirection: 'row', flexWrap: 'wrap', gap: spacing.xs, marginBottom: spacing.xs },
|
|
messageImagesUser: { justifyContent: 'flex-end' },
|
|
toolImages: { marginLeft: 32, marginRight: spacing.xs, marginBottom: spacing.sm },
|
|
messageImage: { width: 132, height: 104, borderRadius: radius.md, backgroundColor: colors.surfaceStrong },
|
|
messageImagePlaceholder: { width: 132, minHeight: 76, borderRadius: radius.md, backgroundColor: colors.primarySoft, alignItems: 'center', justifyContent: 'center', padding: spacing.sm, gap: spacing.xs },
|
|
messageImageName: { ...t.caption, color: colors.primary, maxWidth: '100%' },
|
|
reasoningCard: { alignSelf: 'stretch', borderRadius: radius.md, overflow: 'hidden' },
|
|
reasoningHeader: { minHeight: isCompact ? 34 : 40, paddingHorizontal: 0, flexDirection: 'row', alignItems: 'center', gap: spacing.xs, borderRadius: radius.sm },
|
|
reasoningHeaderPressed: { backgroundColor: colors.surfaceStrong },
|
|
reasoningLabel: { ...t.smallStrong, color: colors.muted },
|
|
reasoningLabelActive: { color: colors.accent },
|
|
reasoningPreview: { ...t.small, color: colors.muted, flex: 1 },
|
|
activitySeparator: { ...t.small, color: colors.subtle },
|
|
reasoningBody: {
|
|
backgroundColor: colors.toolSurface ?? colors.surface,
|
|
padding: isCompact ? 10 : 12,
|
|
marginTop: 2,
|
|
marginBottom: 4,
|
|
marginLeft: 9,
|
|
paddingLeft: 12,
|
|
borderLeftWidth: 2,
|
|
borderLeftColor: colors.separator,
|
|
borderTopRightRadius: radius.md,
|
|
borderBottomRightRadius: radius.md,
|
|
},
|
|
processGroup: { alignSelf: 'stretch', marginHorizontal: 0, gap: isCompact ? 4 : 6 },
|
|
activityGroup: { alignSelf: 'stretch' },
|
|
processHeader: { minHeight: isCompact ? 34 : 40, flexDirection: 'row', alignItems: 'center', gap: spacing.xs, paddingHorizontal: 0, borderRadius: radius.sm },
|
|
processIcon: { width: 20, height: 20, alignItems: 'center', justifyContent: 'center' },
|
|
processCurrent: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, paddingLeft: 28, paddingRight: 0, paddingBottom: 4 },
|
|
processCurrentText: { ...t.small, color: colors.muted, flex: 1 },
|
|
processLabel: { ...t.small, fontWeight: '500', color: colors.muted, flex: 1 },
|
|
turnProcessHeader: { minHeight: isCompact ? 30 : 36, flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
|
|
turnProcessLabel: { ...t.caption, color: colors.subtle },
|
|
activityReasoning: { paddingVertical: isCompact ? 4 : spacing.xs },
|
|
processScroll: {
|
|
marginLeft: 9,
|
|
paddingLeft: 12,
|
|
borderLeftWidth: 2,
|
|
borderLeftColor: colors.separator,
|
|
marginVertical: 2,
|
|
},
|
|
processScrollActive: { borderLeftColor: colors.primary },
|
|
processBody: { gap: 2, paddingVertical: 2 },
|
|
streamingCursor: { width: 7, height: isCompact ? 14 : 16, backgroundColor: colors.accent, borderRadius: 2, marginTop: 3 },
|
|
toolCard: { borderRadius: radius.md, overflow: 'hidden' },
|
|
toolCardExpanded: { backgroundColor: colors.toolSurface ?? colors.card, marginVertical: 2 },
|
|
toolRow: { minHeight: isCompact ? 32 : 38, paddingHorizontal: 6, paddingVertical: 4, flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
|
|
toolRowPressed: { backgroundColor: colors.surfaceStrong },
|
|
toolIcon: { width: 20, height: 20, alignItems: 'center', justifyContent: 'center' },
|
|
toolCopy: { flex: 1, minWidth: 0, flexDirection: 'row', alignItems: 'center', gap: 6 },
|
|
toolName: { ...(isCompact ? t.caption : t.small), fontWeight: '500', color: colors.ink, flexShrink: 1 },
|
|
toolSummary: { ...(isCompact ? t.caption : t.small), color: colors.muted, flex: 1 },
|
|
toolStateGroup: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
|
|
toolState: { ...t.caption, color: colors.success },
|
|
toolFailed: { ...t.caption, fontWeight: '500', color: colors.danger },
|
|
toolDetails: { borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: colors.separator, padding: isCompact ? 8 : 10, gap: isCompact ? 8 : 10 },
|
|
toolDetailBlock: { gap: isCompact ? 4 : spacing.xs },
|
|
toolDetailLabel: { ...t.caption, color: colors.muted },
|
|
toolDetailCode: { fontFamily: 'monospace', fontSize: m.codeFontSize, lineHeight: m.codeLineHeight, color: colors.ink, backgroundColor: colors.codeSurface ?? colors.surfaceStrong, borderRadius: radius.sm, padding: isCompact ? 9 : 11 },
|
|
toolDetailTruncated: { ...t.caption, color: colors.warning },
|
|
permissionCard: { borderRadius: radius.xl, backgroundColor: colors.warningSoft, padding: 14, gap: 12, marginVertical: 6 },
|
|
questionCard: { borderRadius: radius.xl, backgroundColor: colors.accentSoft, padding: 14, gap: 12, marginVertical: 6 },
|
|
permissionHeader: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm },
|
|
permissionIcon: { width: 40, height: 40, borderRadius: radius.md, backgroundColor: colors.background, alignItems: 'center', justifyContent: 'center' },
|
|
permissionHeaderCopy: { flex: 1 },
|
|
permissionTitle: { ...t.bodyStrong, color: colors.ink },
|
|
permissionKind: { ...t.small, color: colors.muted },
|
|
permissionDetail: { backgroundColor: colors.background, borderRadius: radius.md, padding: spacing.sm },
|
|
permissionCode: { fontFamily: 'monospace', fontSize: 14, lineHeight: 21, color: colors.ink },
|
|
permissionText: { ...t.body, color: colors.ink },
|
|
permissionScope: { ...t.caption, color: colors.muted },
|
|
permissionActions: { gap: spacing.xs },
|
|
permissionResolved: { borderRadius: radius.md, backgroundColor: colors.card, padding: spacing.sm, flexDirection: 'row', gap: spacing.xs, alignItems: 'center', marginVertical: spacing.xs },
|
|
permissionResolvedText: { ...t.smallStrong, color: colors.ink },
|
|
questionBlock: { gap: spacing.xs },
|
|
questionText: { ...t.bodyStrong, color: colors.ink },
|
|
queueDock: { borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, borderRadius: radius.md, backgroundColor: colors.card, padding: spacing.sm, marginBottom: spacing.sm, gap: spacing.xxs },
|
|
queueDockHeader: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
|
|
queueDockTitle: { ...t.smallStrong, color: colors.ink },
|
|
queueDockRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
|
|
queueDockText: { ...t.small, color: colors.muted, flex: 1 },
|
|
resendRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, minHeight: 44, paddingHorizontal: spacing.xs },
|
|
resendRowPressed: { opacity: 0.6 },
|
|
resendText: { ...t.small, color: colors.primary },
|
|
canceledText: { ...t.small, color: colors.muted, paddingHorizontal: spacing.xs, minHeight: 44, textAlignVertical: 'center' },
|
|
// maxHeight comes from usePickerListMaxHeight so landscape sheets fit.
|
|
subagentList: { flexShrink: 1 },
|
|
teamRowCopy: { flex: 1, gap: spacing.xxs },
|
|
teamRowTitleLine: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs },
|
|
teamRowRole: { ...t.smallStrong, color: colors.ink, flexShrink: 1 },
|
|
teamRowTask: { ...t.small, color: colors.muted },
|
|
subagentRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, minHeight: 52, paddingVertical: spacing.xs, paddingHorizontal: spacing.xs, borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: colors.border },
|
|
subagentRunning: { ...t.smallStrong, color: colors.success },
|
|
subagentRunningFailed: { ...t.smallStrong, color: colors.danger },
|
|
subagentProvisioning: { ...t.smallStrong, color: colors.warning },
|
|
subagentIdle: { ...t.small, color: colors.muted },
|
|
stopButtonSmall: { width: 36, height: 36, borderRadius: 18, backgroundColor: colors.inverse, alignItems: 'center', justifyContent: 'center' },
|
|
resendRowDisabled: { opacity: 0.5 },
|
|
resendTextMuted: { color: colors.muted },
|
|
resendTextFailed: { color: colors.danger },
|
|
questionCustom: { borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, borderRadius: radius.sm, paddingHorizontal: spacing.sm, paddingVertical: spacing.xs, color: colors.ink, marginBottom: spacing.xs, minHeight: 40 },
|
|
questionDetail: { ...t.small, color: colors.muted },
|
|
optionRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, padding: spacing.sm, borderRadius: radius.md, borderWidth: 1, borderColor: colors.border, backgroundColor: colors.background },
|
|
optionChosen: { borderColor: colors.accent, backgroundColor: colors.accentSoft },
|
|
optionDot: { width: 20, height: 20, borderRadius: radius.pill, borderWidth: 1.5, borderColor: colors.border, alignItems: 'center', justifyContent: 'center' },
|
|
optionDotChosen: { borderColor: colors.accent, backgroundColor: colors.accent },
|
|
optionLabel: { ...t.small, color: colors.ink, flex: 1 },
|
|
optionDescription: { ...t.caption, color: colors.muted, marginTop: 2 },
|
|
welcome: { alignItems: 'center', paddingHorizontal: spacing.lg },
|
|
welcomeRow: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, marginTop: spacing.lg },
|
|
welcomeSlogan: { ...t.title, fontSize: 24, lineHeight: 30, fontWeight: '600', letterSpacing: -0.4, color: colors.ink },
|
|
welcomeBadge: { borderRadius: radius.pill, backgroundColor: colors.primarySoft, paddingHorizontal: spacing.sm, paddingVertical: 3, marginTop: 2 },
|
|
welcomeBadgeText: { ...t.caption, fontWeight: '600', color: colors.primary },
|
|
welcomePolicyHint: {
|
|
...t.caption,
|
|
fontSize: 11,
|
|
lineHeight: 15,
|
|
color: colors.subtle,
|
|
textAlign: 'center',
|
|
marginTop: spacing.sm,
|
|
paddingHorizontal: spacing.lg,
|
|
},
|
|
mentionBackdrop: { ...StyleSheet.absoluteFill, backgroundColor: colors.menuDismiss },
|
|
composerWrap: { backgroundColor: 'transparent', paddingHorizontal: spacing.md, paddingTop: 4, paddingBottom: 6 },
|
|
composerInner: { width: '100%' },
|
|
|
|
runningFooterWrap: { paddingHorizontal: spacing.lg, paddingTop: spacing.xs, paddingBottom: spacing.md },
|
|
replyStatus: { minHeight: 24, flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', gap: 6, paddingHorizontal: 2, paddingTop: spacing.xs, paddingBottom: spacing.xs },
|
|
replyStatusText: { ...t.caption, fontWeight: '500', color: colors.accent },
|
|
replyDots: { flexDirection: 'row', alignItems: 'center', marginLeft: -4 },
|
|
replyDot: { ...t.caption, fontSize: 16, lineHeight: 16, fontWeight: '700' },
|
|
imageTray: { gap: spacing.xs, paddingBottom: spacing.xs },
|
|
imagePreviewWrap: { width: 72, height: 72 },
|
|
imagePreview: { width: 72, height: 72, borderRadius: radius.sm, backgroundColor: colors.surfaceStrong },
|
|
removeImageButton: { position: 'absolute', right: -3, top: -3, width: 24, height: 24, borderRadius: radius.pill, backgroundColor: colors.ink, alignItems: 'center', justifyContent: 'center' },
|
|
fileTray: { gap: spacing.xs, paddingBottom: spacing.xs },
|
|
fileCard: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
gap: spacing.xs,
|
|
paddingVertical: 6,
|
|
paddingHorizontal: spacing.sm,
|
|
borderRadius: radius.md,
|
|
backgroundColor: colors.surfaceStrong,
|
|
borderWidth: 1,
|
|
borderColor: colors.border,
|
|
maxWidth: 220,
|
|
},
|
|
fileCardMeta: { flexShrink: 1 },
|
|
fileCardName: { ...t.caption, fontWeight: '600', color: colors.ink },
|
|
fileCardSize: { ...t.caption, color: colors.muted },
|
|
removeFileButton: {
|
|
width: 20,
|
|
height: 20,
|
|
borderRadius: radius.pill,
|
|
backgroundColor: colors.surface,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
marginLeft: 2,
|
|
},
|
|
composerCard: {
|
|
position: 'relative',
|
|
borderWidth: StyleSheet.hairlineWidth,
|
|
borderColor: colors.separator,
|
|
borderRadius: 26,
|
|
minHeight: 52,
|
|
backgroundColor: colors.elevated,
|
|
paddingHorizontal: 10,
|
|
paddingTop: 8,
|
|
paddingBottom: 8,
|
|
...floatingShadow(colors, 'low'),
|
|
},
|
|
composerCardWithQuotes: {
|
|
borderRadius: 22,
|
|
paddingTop: 10,
|
|
},
|
|
composerBody: {
|
|
position: 'relative',
|
|
},
|
|
composerExpandCorner: {
|
|
position: 'absolute',
|
|
top: 0,
|
|
right: 0,
|
|
width: 28,
|
|
height: 28,
|
|
borderRadius: radius.pill,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
zIndex: 4,
|
|
},
|
|
expandedComposerOverlay: {
|
|
...StyleSheet.absoluteFill,
|
|
zIndex: 50,
|
|
elevation: 50,
|
|
},
|
|
expandedComposerBackdrop: {
|
|
...StyleSheet.absoluteFill,
|
|
backgroundColor: colors.menuDismiss,
|
|
},
|
|
expandedComposerCard: {
|
|
flex: 1,
|
|
marginTop: 88,
|
|
backgroundColor: colors.elevated,
|
|
borderTopLeftRadius: 28,
|
|
borderTopRightRadius: 28,
|
|
paddingHorizontal: spacing.md,
|
|
paddingTop: spacing.xs,
|
|
paddingBottom: spacing.sm,
|
|
...floatingShadow(colors, 'high'),
|
|
},
|
|
expandedComposerHeader: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
justifyContent: 'flex-end',
|
|
minHeight: 40,
|
|
paddingHorizontal: spacing.xs,
|
|
},
|
|
expandedCollapseButton: {
|
|
width: 36,
|
|
height: 36,
|
|
borderRadius: radius.pill,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
expandedQuotesWrap: {
|
|
flexDirection: 'row',
|
|
flexWrap: 'wrap',
|
|
gap: 6,
|
|
paddingHorizontal: spacing.xs,
|
|
paddingBottom: spacing.xs,
|
|
},
|
|
expandedInputContainer: {
|
|
flex: 1,
|
|
paddingHorizontal: spacing.xs,
|
|
paddingVertical: spacing.xs,
|
|
},
|
|
expandedTextInput: {
|
|
...t.body,
|
|
flex: 1,
|
|
fontSize: 16,
|
|
lineHeight: 24,
|
|
color: colors.ink,
|
|
textAlignVertical: 'top',
|
|
padding: 0,
|
|
},
|
|
expandedFooter: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
justifyContent: 'flex-end',
|
|
paddingHorizontal: spacing.xs,
|
|
paddingVertical: spacing.xs,
|
|
minHeight: 48,
|
|
},
|
|
runningComposer: { flexDirection: 'row', alignItems: 'center', gap: 6, paddingVertical: 6, paddingHorizontal: 6 },
|
|
runningComposerPrompt: { flex: 1, minHeight: 36, justifyContent: 'center', minWidth: 0, paddingHorizontal: 4 },
|
|
runningComposerText: { ...t.small, color: colors.muted },
|
|
composerActionsOverlay: {
|
|
position: 'absolute',
|
|
left: 0,
|
|
right: 0,
|
|
bottom: 0,
|
|
height: 36,
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
justifyContent: 'space-between',
|
|
},
|
|
composerActionsRow: {
|
|
marginTop: 6,
|
|
height: 36,
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
justifyContent: 'space-between',
|
|
},
|
|
composerTrailing: { flexDirection: 'row', alignItems: 'center', gap: 4 },
|
|
plusButton: {
|
|
width: 36,
|
|
height: 36,
|
|
borderRadius: 18,
|
|
backgroundColor: 'transparent',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
composerShortcutButton: {
|
|
width: 36,
|
|
height: 36,
|
|
borderRadius: 18,
|
|
backgroundColor: 'transparent',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
plusPressed: { opacity: 0.65, transform: [{ scale: 0.94 }] },
|
|
plusDisabled: { opacity: 0.45 },
|
|
plusMenuOption: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, padding: spacing.md, borderRadius: radius.lg, backgroundColor: colors.card, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.separator, marginBottom: spacing.xs },
|
|
plusMenuOptionPressed: { backgroundColor: colors.surfaceStrong },
|
|
plusMenuOptionDisabled: { opacity: 0.5 },
|
|
plusMenuOptionText: { ...t.body, color: colors.ink, flex: 1 },
|
|
plusCardRow: { flexDirection: 'row', gap: spacing.sm, marginBottom: spacing.xs },
|
|
plusCard: { flex: 1, minHeight: 80, alignItems: 'center', justifyContent: 'center', gap: spacing.xs, paddingVertical: spacing.sm, paddingHorizontal: spacing.xxs, borderRadius: radius.xl, backgroundColor: colors.card, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.separator },
|
|
plusCardText: { ...t.smallStrong, color: colors.ink },
|
|
plusMenuOptionValue: { minWidth: 0, flexShrink: 1, flexDirection: 'row', alignItems: 'center', gap: spacing.xxs },
|
|
plusMenuOptionValueText: { ...t.small, color: colors.muted, flexShrink: 1 },
|
|
modeLoading: { paddingVertical: spacing.lg, alignItems: 'center' },
|
|
effortRow: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', gap: spacing.sm, paddingHorizontal: spacing.md, paddingVertical: spacing.sm, minHeight: 52, borderRadius: radius.lg, backgroundColor: colors.card, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.separator, marginTop: spacing.xs },
|
|
effortRowLabel: { ...t.smallStrong, color: colors.ink },
|
|
effortRowValue: { ...t.small, color: colors.muted, flexShrink: 1 },
|
|
composerQuotesWrap: {
|
|
flexDirection: 'row',
|
|
flexWrap: 'wrap',
|
|
gap: 6,
|
|
paddingHorizontal: 4,
|
|
paddingTop: 2,
|
|
marginBottom: 6,
|
|
},
|
|
composerQuotePill: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
gap: 5,
|
|
paddingHorizontal: 10,
|
|
paddingVertical: 5,
|
|
borderRadius: radius.pill,
|
|
backgroundColor: colors.primarySoft,
|
|
maxWidth: '100%',
|
|
},
|
|
composerQuotePillText: {
|
|
fontSize: 13,
|
|
lineHeight: 17,
|
|
fontWeight: '500',
|
|
color: colors.primary,
|
|
flexShrink: 1,
|
|
},
|
|
composerInputSlotInline: {
|
|
minHeight: 36,
|
|
justifyContent: 'center',
|
|
paddingHorizontal: 4,
|
|
},
|
|
composerInputSlotStacked: {
|
|
minHeight: 36,
|
|
justifyContent: 'center',
|
|
paddingHorizontal: 6,
|
|
},
|
|
composerInputSlotExpandPad: {
|
|
paddingRight: 34,
|
|
},
|
|
composerInlineQuoteBadge: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
gap: 4,
|
|
marginRight: 6,
|
|
paddingVertical: 2,
|
|
},
|
|
composerInlineQuoteText: {
|
|
fontSize: 16,
|
|
fontWeight: '500',
|
|
},
|
|
messageQuotePreview: {
|
|
marginBottom: spacing.xs,
|
|
},
|
|
assistantProseWrap: {
|
|
position: 'relative',
|
|
},
|
|
|
|
composerInput: {
|
|
...t.body,
|
|
fontSize: 16,
|
|
lineHeight: 22,
|
|
color: colors.ink,
|
|
minHeight: 36,
|
|
maxHeight: 136,
|
|
paddingTop: 7,
|
|
paddingBottom: 7,
|
|
paddingHorizontal: 0,
|
|
includeFontPadding: false,
|
|
textAlignVertical: 'center',
|
|
},
|
|
composerInputStacked: {
|
|
textAlignVertical: 'top',
|
|
},
|
|
composerInputEmpty: {
|
|
height: 36,
|
|
paddingTop: 0,
|
|
paddingBottom: 0,
|
|
},
|
|
|
|
sendButton: {
|
|
width: 36,
|
|
height: 36,
|
|
borderRadius: 18,
|
|
backgroundColor: colors.inverse,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
sendPressed: { opacity: 0.78, transform: [{ scale: 0.95 }] },
|
|
stopButton: {
|
|
width: 36,
|
|
height: 36,
|
|
borderRadius: 18,
|
|
backgroundColor: colors.inverse,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
stopPressed: { opacity: 0.78, transform: [{ scale: 0.95 }] },
|
|
sendDisabled: { backgroundColor: colors.surfaceStrong },
|
|
composerHint: {
|
|
...t.caption,
|
|
fontSize: 11,
|
|
lineHeight: 15,
|
|
color: colors.subtle,
|
|
textAlign: 'center',
|
|
marginTop: 4,
|
|
},
|
|
composerHintWarning: {
|
|
color: colors.muted,
|
|
},
|
|
promptInputLabel: { ...t.caption, color: colors.muted, marginBottom: 4, marginTop: 4 },
|
|
promptInput: { borderRadius: radius.md, borderWidth: 1, borderColor: colors.border, backgroundColor: colors.surface, color: colors.ink, paddingHorizontal: spacing.sm, paddingVertical: 8, ...t.body, minHeight: 40 },
|
|
promptTextArea: { minHeight: 88, textAlignVertical: 'top' },
|
|
lightboxBackdrop: {
|
|
flex: 1,
|
|
backgroundColor: 'rgba(0, 0, 0, 0.92)',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
lightboxImage: {
|
|
width: '100%',
|
|
height: '100%',
|
|
},
|
|
lightboxClose: {
|
|
position: 'absolute',
|
|
top: 50,
|
|
right: 20,
|
|
width: 44,
|
|
height: 44,
|
|
borderRadius: 22,
|
|
backgroundColor: 'rgba(0, 0, 0, 0.65)',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
})
|
|
}
|