mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-13 17:07:27 +02:00
Refactor the chat composer into a reusable NostrEditor component with configurable behavior for different UI contexts (chat, posts, long-form). Key changes: - Create NostrEditor with configurable props: - submitBehavior: 'enter' | 'ctrl-enter' | 'button-only' - variant: 'inline' | 'multiline' | 'full' - blobPreview: 'compact' | 'card' | 'gallery' - Extract suggestion system into pluggable architecture (SuggestionConfig) - Add helper functions to create standard Nostr suggestions - Update search hooks (useProfileSearch, useEmojiSearch) with injectable sources for custom profile/emoji sets - Convert MentionEditor to backward-compatible wrapper around NostrEditor - Update ChatViewer to use new NostrEditor component This enables building WYSIWYG editors with the same autocomplete features as chat (profile mentions, emoji, uploads) but with different behaviors suitable for long-form posts or notes.