diff --git a/apps/android/src/screens/chat/styles.ts b/apps/android/src/screens/chat/styles.ts index a1d0662..ee55953 100644 --- a/apps/android/src/screens/chat/styles.ts +++ b/apps/android/src/screens/chat/styles.ts @@ -1,20 +1,32 @@ import { StyleSheet } from 'react-native' -import { floatingShadow, radius, spacing, typeForDensity, type TypographyDensity } from '../../ui/theme' +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') { +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 }, - modelChip: { minWidth: 0, flexShrink: 1, flexDirection: 'row', alignItems: 'center', gap: 4, paddingLeft: spacing.sm + 2, paddingRight: spacing.sm, height: 38, borderRadius: radius.pill, backgroundColor: colors.surfaceStrong }, 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 }, - modelChipText: { ...t.small, fontSize: 14, color: colors.ink, flexShrink: 1 }, 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. @@ -24,19 +36,15 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' // 44 dp circle reachable as the 48 dp target the design system asks for. latestTurnColumn: { alignItems: 'flex-end', paddingVertical: 2 }, latestTurnButton: { - width: 44, - height: 44, + width: 40, + height: 40, borderRadius: radius.pill, alignItems: 'center', justifyContent: 'center', - backgroundColor: colors.surface, + backgroundColor: colors.elevated, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.separator, - shadowColor: '#000', - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.16, - shadowRadius: 6, - elevation: 4, + ...floatingShadow(colors, 'low'), }, latestTurnButtonPressed: { opacity: 0.7 }, modalBackdrop: { flex: 1, backgroundColor: colors.modalBackdrop, justifyContent: 'flex-end' }, @@ -62,20 +70,57 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' permissionOptionName: { ...t.small, color: colors.ink }, permissionOptionDescription: { ...t.caption, color: colors.muted, marginTop: 2 }, modelFailures: { ...t.caption, color: colors.danger, marginTop: spacing.sm }, - connectionBanner: { minHeight: 40, marginHorizontal: spacing.md, marginTop: spacing.xxs, paddingHorizontal: spacing.md, paddingVertical: spacing.xs, borderRadius: radius.pill, backgroundColor: colors.warningSoft, flexDirection: 'row', alignItems: 'center', gap: spacing.xs }, - connectionDot: { width: 8, height: 8, borderRadius: radius.pill, backgroundColor: colors.warning }, - connectionBannerText: { ...t.small, color: colors.ink, flex: 1 }, + 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 ? 14 : spacing.lg, paddingTop: isCompact ? spacing.md : spacing.xl, paddingBottom: spacing.xxl, gap: isCompact ? 2 : spacing.xxs }, + 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: isCompact ? 2 : spacing.xxs, marginVertical: isCompact ? 2 : spacing.xs }, + assistantBlock: { alignSelf: 'stretch', gap: m.assistantGap, marginTop: Math.max(2, m.assistantGap - 2), marginBottom: m.turnBottomGap }, assistantText: { paddingHorizontal: 0 }, - userBlock: { alignSelf: 'flex-end', maxWidth: '88%', marginVertical: isCompact ? 4 : spacing.sm }, - userContent: { paddingHorizontal: isCompact ? 12 : spacing.md, paddingVertical: isCompact ? 6 : spacing.xs }, - userBubble: { backgroundColor: colors.inverse, borderRadius: radius.lg, maxWidth: '100%' }, + 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', @@ -84,9 +129,10 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' }, userMessageInlineText: { ...t.body, - fontSize: 15, + fontSize: m.bodyFontSize, + lineHeight: m.bodyLineHeight, + letterSpacing: m.letterSpacing, color: colors.ink, - lineHeight: 22, }, avatar: { width: isCompact ? 28 : 32, height: isCompact ? 28 : 32, borderRadius: radius.md, alignItems: 'center', justifyContent: 'center' }, avatarUser: { backgroundColor: colors.primary }, @@ -102,43 +148,62 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' 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: 48, paddingHorizontal: spacing.xs, flexDirection: 'row', alignItems: 'center', gap: spacing.xs }, + 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.surface, padding: isCompact ? 8 : spacing.sm, marginHorizontal: isCompact ? 4 : spacing.xs, marginBottom: isCompact ? 4 : spacing.xs, borderRadius: radius.sm }, - processGroup: { alignSelf: 'stretch', marginHorizontal: spacing.xs }, + 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: 48, flexDirection: 'row', alignItems: 'center', gap: spacing.xs, paddingHorizontal: 0, borderRadius: radius.md }, - processIcon: { width: 28, height: 28, alignItems: 'center', justifyContent: 'center' }, - processCurrent: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, paddingHorizontal: spacing.xs, paddingBottom: spacing.xs }, + 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, color: colors.muted, flex: 1 }, - turnProcessHeader: { minHeight: 48, flexDirection: 'row', alignItems: 'center', gap: spacing.xs }, - turnProcessLabel: { ...t.small, color: colors.muted }, + 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 }, - processBody: { gap: 0, paddingVertical: 2 }, + 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.card }, - toolRow: { minHeight: isCompact ? 36 : 48, paddingHorizontal: spacing.xs, paddingVertical: isCompact ? 0 : spacing.xxs, flexDirection: 'row', alignItems: 'center', gap: spacing.xs }, + 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: isCompact ? 20 : 24, height: isCompact ? 20 : 24, alignItems: 'center', justifyContent: 'center' }, + 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), color: colors.muted, flexShrink: 1 }, + 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: { color: colors.danger }, - toolDetails: { borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: colors.separator, padding: isCompact ? 8 : spacing.sm, gap: isCompact ? 8 : spacing.md }, + 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: isCompact ? 12 : 13, lineHeight: isCompact ? 17 : 20, color: colors.ink, backgroundColor: colors.surfaceStrong, borderRadius: radius.sm, padding: isCompact ? 6 : spacing.sm }, + 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.lg, backgroundColor: colors.warningSoft, padding: spacing.md, gap: spacing.md, marginVertical: spacing.xs }, - questionCard: { borderRadius: radius.lg, backgroundColor: colors.accentSoft, padding: spacing.md, gap: spacing.md, marginVertical: spacing.xs }, + 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 }, @@ -173,7 +238,7 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' subagentRunningFailed: { ...t.smallStrong, color: colors.danger }, subagentProvisioning: { ...t.smallStrong, color: colors.warning }, subagentIdle: { ...t.small, color: colors.muted }, - stopButtonSmall: { width: 38, height: 38, borderRadius: 19, backgroundColor: colors.inverse, alignItems: 'center', justifyContent: 'center', marginRight: spacing.xs }, + 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 }, @@ -190,15 +255,24 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' 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: colors.background, paddingHorizontal: spacing.md, paddingTop: spacing.xs, paddingBottom: spacing.xs }, + 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: 32, flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', gap: spacing.xs, paddingVertical: spacing.sm, borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: colors.separator }, - replyStatusText: { ...t.small, color: colors.accent }, - replyDots: { flexDirection: 'row', alignItems: 'center', marginLeft: -spacing.xs }, - replyDot: { ...t.caption, fontSize: 18, lineHeight: 18, fontWeight: '700' }, + 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 }, @@ -229,26 +303,34 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' marginLeft: 2, }, composerCard: { + position: 'relative', borderWidth: StyleSheet.hairlineWidth, borderColor: colors.separator, - borderRadius: radius.xxl, - backgroundColor: colors.surface, - paddingHorizontal: spacing.xs, - paddingTop: spacing.xs, - paddingBottom: spacing.xs, - gap: spacing.xs, - ...floatingShadow(colors, 'high'), + borderRadius: 26, + minHeight: 52, + backgroundColor: colors.elevated, + paddingHorizontal: 10, + paddingTop: 8, + paddingBottom: 8, + ...floatingShadow(colors, 'low'), }, - composerExpandButton: { + composerCardWithQuotes: { + borderRadius: 22, + paddingTop: 10, + }, + composerBody: { + position: 'relative', + }, + composerExpandCorner: { position: 'absolute', - top: 6, - right: 6, - width: 32, - height: 32, + top: 0, + right: 0, + width: 28, + height: 28, borderRadius: radius.pill, alignItems: 'center', justifyContent: 'center', - zIndex: 5, + zIndex: 4, }, expandedComposerOverlay: { ...StyleSheet.absoluteFill, @@ -256,12 +338,13 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' elevation: 50, }, expandedComposerBackdrop: { - height: 52, + ...StyleSheet.absoluteFill, backgroundColor: colors.menuDismiss, }, expandedComposerCard: { flex: 1, - backgroundColor: colors.surface, + marginTop: 88, + backgroundColor: colors.elevated, borderTopLeftRadius: 28, borderTopRightRadius: 28, paddingHorizontal: spacing.md, @@ -312,33 +395,45 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' paddingVertical: spacing.xs, minHeight: 48, }, - runningComposer: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, padding: spacing.xs }, - runningComposerPrompt: { flex: 1, minHeight: 44, justifyContent: 'center', minWidth: 0 }, + 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 }, - composerControls: { flexDirection: 'row', alignItems: 'center', gap: spacing.xs, paddingHorizontal: 4, paddingBottom: 2 }, - composerSpacer: { flex: 1 }, - // Keep the actual target at the Android 48dp minimum. hitSlop is not - // reliable when a control sits inside a clipped/native text-input surface. + 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: 38, - height: 38, - borderRadius: radius.pill, - backgroundColor: colors.surfaceStrong, + width: 36, + height: 36, + borderRadius: 18, + backgroundColor: 'transparent', alignItems: 'center', justifyContent: 'center', }, - quickPromptsButton: { - height: 38, - flexShrink: 0, - paddingHorizontal: spacing.sm + 2, - borderRadius: radius.pill, - backgroundColor: colors.surfaceStrong, + composerShortcutButton: { + width: 36, + height: 36, + borderRadius: 18, + backgroundColor: 'transparent', alignItems: 'center', justifyContent: 'center', }, - quickPromptsText: { ...t.small, fontSize: 14, color: colors.ink }, - plusPressed: { opacity: 0.7 }, - plusDisabled: { opacity: 0.52 }, + 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 }, @@ -352,13 +447,43 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' 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 }, - composerInputWrap: { - position: 'relative', + composerQuotesWrap: { + flexDirection: 'row', + flexWrap: 'wrap', + gap: 6, + paddingHorizontal: 4, + paddingTop: 2, + marginBottom: 6, + }, + composerQuotePill: { flexDirection: 'row', alignItems: 'center', - flexWrap: 'wrap', - minHeight: 44, - paddingHorizontal: spacing.sm, + 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', @@ -377,236 +502,58 @@ export function createStyles(colors: ThemeColors, density: TypographyDensity = ' assistantProseWrap: { position: 'relative', }, - floatingCalloutAnchor: { - position: 'absolute', - top: -46, - left: 0, - right: 0, - zIndex: 999, - alignItems: 'center', - }, - assistantSelectableText: { + + composerInput: { ...t.body, - fontSize: 15, - lineHeight: 23, - padding: 0, - margin: 0, - }, - calloutBackdrop: { - flex: 1, - backgroundColor: 'rgba(0, 0, 0, 0.25)', - justifyContent: 'center', - alignItems: 'center', - padding: spacing.md, - }, - calloutMenu: { - flexDirection: 'row', - alignItems: 'center', - backgroundColor: colors.surface, - borderRadius: radius.md, - borderWidth: StyleSheet.hairlineWidth, - borderColor: colors.border, - shadowColor: '#000', - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.18, - shadowRadius: 8, - elevation: 8, - paddingHorizontal: spacing.xs, - height: 42, - maxWidth: 320, - }, - calloutBtn: { - paddingHorizontal: spacing.sm, - paddingVertical: 6, - borderRadius: radius.sm, - }, - calloutBtnPressed: { - backgroundColor: colors.surfaceStrong, - }, - calloutBtnText: { - ...t.small, + fontSize: 16, + lineHeight: 22, color: colors.ink, - fontWeight: '600', + minHeight: 36, + maxHeight: 136, + paddingTop: 7, + paddingBottom: 7, + paddingHorizontal: 0, + includeFontPadding: false, + textAlignVertical: 'center', }, - calloutDivider: { - width: StyleSheet.hairlineWidth, - height: 16, - backgroundColor: colors.separator, + composerInputStacked: { + textAlignVertical: 'top', }, - - snippetModalBackdrop: { - flex: 1, - backgroundColor: 'rgba(0, 0, 0, 0.4)', - justifyContent: 'center', - alignItems: 'center', - padding: spacing.md, + composerInputEmpty: { + height: 36, + paddingTop: 0, + paddingBottom: 0, }, - snippetModalCard: { - width: '100%', - maxWidth: 380, - backgroundColor: colors.surface, - borderRadius: radius.lg, - borderWidth: StyleSheet.hairlineWidth, - borderColor: colors.border, - padding: spacing.md, - shadowColor: '#000', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.15, - shadowRadius: 16, - elevation: 10, - }, - snippetModalHeader: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - marginBottom: spacing.sm, - }, - snippetHeaderLeft: { - flexDirection: 'row', - alignItems: 'center', - gap: 6, - }, - snippetModalTitle: { - ...t.bodyStrong, - color: colors.ink, - fontSize: 14, - }, - snippetCloseBtn: { - padding: 4, - }, - snippetPreviewBox: { - backgroundColor: colors.surfaceStrong, - borderRadius: radius.md, - padding: spacing.sm, - marginBottom: spacing.sm, - }, - snippetPreviewQuote: { - ...t.small, - color: colors.primary, - fontWeight: '500', - lineHeight: 18, - }, - snippetCharCount: { - fontSize: 11, - lineHeight: 14, - color: colors.muted, - marginTop: 4, - textAlign: 'right', - }, - snippetChipRow: { - marginBottom: spacing.sm, - }, - snippetChipScroll: { - gap: 6, - }, - snippetChip: { - paddingHorizontal: spacing.sm, - paddingVertical: 5, - borderRadius: radius.pill, - backgroundColor: colors.surfaceStrong, - borderWidth: StyleSheet.hairlineWidth, - borderColor: colors.border, - }, - snippetChipActive: { - backgroundColor: colors.primarySoft, - borderColor: colors.primary, - }, - snippetChipText: { - fontSize: 11, - lineHeight: 14, - color: colors.muted, - fontWeight: '500', - }, - snippetChipTextActive: { - color: colors.primary, - fontWeight: '600', - }, - snippetEditorWrap: { - maxHeight: 140, - backgroundColor: colors.surfaceStrong, - borderRadius: radius.md, - padding: spacing.sm, - marginBottom: spacing.md, - }, - snippetTextInput: { - ...t.small, - color: colors.ink, - lineHeight: 20, - minHeight: 70, - }, - snippetActionRow: { - flexDirection: 'row', - alignItems: 'center', - gap: spacing.sm, - }, - snippetCopyBtn: { - flex: 1, - height: 40, - borderRadius: radius.md, - borderWidth: StyleSheet.hairlineWidth, - borderColor: colors.border, - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center', - gap: 6, - backgroundColor: colors.surface, - }, - snippetCopyBtnActive: { - borderColor: colors.primary, - backgroundColor: colors.primarySoft, - }, - snippetCopyText: { - ...t.small, - color: colors.ink, - fontWeight: '500', - }, - snippetAskBtn: { - flex: 1.4, - height: 40, - borderRadius: radius.md, - backgroundColor: colors.primary, - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center', - gap: 6, - }, - snippetAskBtnDisabled: { - opacity: 0.5, - }, - snippetAskText: { - ...t.small, - color: colors.white, - fontWeight: '600', - }, - - composerInput: { ...t.body, flex: 1, minWidth: 80, fontSize: 16, color: colors.ink, minHeight: 44, maxHeight: 126, paddingVertical: 10, paddingHorizontal: 0, textAlignVertical: 'top' }, sendButton: { - width: 40, - height: 40, - borderRadius: radius.pill, - backgroundColor: colors.primary, - alignItems: 'center', - justifyContent: 'center', - }, - sendPressed: { backgroundColor: colors.primaryPressed }, - stopButton: { - width: 40, - height: 40, - borderRadius: radius.pill, + width: 36, + height: 36, + borderRadius: 18, backgroundColor: colors.inverse, alignItems: 'center', justifyContent: 'center', }, - stopPressed: { opacity: 0.78 }, + 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.muted, + color: colors.subtle, textAlign: 'center', - marginTop: 5, + 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 },