mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 16:33:27 +00:00
Introduces commons/ui/richtext: one cross-platform RichTextViewer that both the touch (Amethyst Android) and mouse-first (Desktop) front ends can drive, to replace the two current forks (amethyst RichTextViewer + DesktopRichTextViewer). The shared core owns the universal parts (paragraph/RTL/word layout, plain text, inline custom emoji, hashtags) and delegates the segments whose *presentation and* call-to-action diverge by platform (media, equation, quoted event, mention, payment, link preview, relay/invite, secret message) to a RichTextSegmentRenderer strategy provided via LocalRichTextSegmentRenderer -- the same CompositionLocal idiom the codebase already uses for LocalInlineQuoteRenderer. Universal actions (open url/email/phone, hashtag) go through a small RichTextInteractions callback bag. A PlainTextSegmentRenderer default keeps the core usable from previews/tests/headless callers. Contract + skeleton only; compiles in :commons. No consumer wired yet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LUiGxXMbjVmgspa1X15o1V