UNPKG

claritykit-svelte

Version:

A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility

121 lines 4.44 kB
import type { RichTextContent, MediaBlock } from './types.js'; import type { CollaborationState, UserInfo } from '../../knowledge/CollaborativeBlockEditor/types.js'; import { type MentionUser, type SlashCommand, type EmojiCategory, type PollData, type MediaUploadResult } from './extensions'; interface ComposerInputProps { placeholder?: string; enableRichText?: boolean; enableKnowledgeIntegration?: boolean; replyingTo?: string; class?: string; disabled?: boolean; autoFocus?: boolean; onsend?: (event: CustomEvent<{ content: string | RichTextContent; replyTo?: string; }>) => void; oncancel?: (event: CustomEvent<{}>) => void; ontyping?: (event: CustomEvent<{ isTyping: boolean; }>) => void; 'ondraft-saved'?: (event: CustomEvent<{ content: string | RichTextContent; }>) => void; enableMediaUpload?: boolean; acceptedFileTypes?: string[]; maxFileSize?: number; maxFiles?: number; onFileUpload?: (files: File[]) => Promise<MediaBlock[]>; enableCollaboration?: boolean; userId?: string; userInfo?: UserInfo; serverUrl?: string; threadId?: string; showUserAwareness?: boolean; compactAwareness?: boolean; onCollaborationStateChange?: (state: CollaborationState) => void; onUserJoined?: (user: UserInfo) => void; onUserLeft?: (userId: string) => void; enableMentions?: boolean; searchUsers?: (query: string) => Promise<MentionUser[]> | MentionUser[]; onMentionSelect?: (user: MentionUser) => void; onNotificationTriggered?: (mentionedUserId: string, messageId?: string) => void; enableSlashCommands?: boolean; slashCommands?: SlashCommand[]; enableEmojiPicker?: boolean; emojiCategories?: EmojiCategory[]; enableCodeBlocks?: boolean; enableThreadReferences?: boolean; enablePolls?: boolean; onThreadClick?: (threadId: string, messageId?: string) => void; onPollCreate?: (pollData: Omit<PollData, 'id' | 'createdAt' | 'totalVotes'>) => Promise<string>; onPollVote?: (pollId: string, optionId: string, userId: string) => Promise<void>; enableAdvancedMedia?: boolean; enableImageResize?: boolean; enableVideoEmbed?: boolean; enableFileAttachments?: boolean; enableAudioRecording?: boolean; onMediaUpload?: (files: File[]) => Promise<MediaUploadResult[]>; onAudioUpload?: (blob: Blob) => Promise<{ url: string; id: string; }>; transcriptionService?: (blob: Blob) => Promise<string>; } interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> { new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & { $$bindings?: Bindings; } & Exports; (internal: unknown, props: Props & { $$events?: Events; $$slots?: Slots; }): Exports & { $set?: any; $on?: any; }; z_$$bindings?: Bindings; } declare const ComposerInput: $$__sveltets_2_IsomorphicComponent<ComposerInputProps, { send: CustomEvent<{ content: string | RichTextContent; replyTo?: string; }>; cancel: CustomEvent<{}>; typing: CustomEvent<{ isTyping: boolean; }>; 'draft-saved': CustomEvent<{ content: string | RichTextContent; }>; 'collaboration-state-changed': CustomEvent<CollaborationState>; 'user-joined': CustomEvent<{ user: UserInfo; threadId: string; }>; 'user-left': CustomEvent<{ userId: string; threadId: string; }>; 'user-awareness-updated': CustomEvent<{ users: UserInfo[]; threadId: string; }>; 'mention-selected': CustomEvent<{ user: MentionUser; messageId?: string; }>; 'notification-triggered': CustomEvent<{ mentionedUserId: string; messageId?: string; }>; } & { [evt: string]: CustomEvent<any>; }, {}, { getCollaborationState: () => CollaborationState; getConnectedUsers: () => UserInfo[]; focusEditor: () => void; getEditorContent: () => any; setEditorContent: (newContent: string) => void; }, "">; type ComposerInput = InstanceType<typeof ComposerInput>; export default ComposerInput; //# sourceMappingURL=ComposerInput.svelte.d.ts.map