@arbidocs/react 0.3.173 → 0.3.174

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -7,7 +7,7 @@ import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, c
7
7
  export { WebSocketServerMessage, WsBatchCompleteMessage, WsNotificationResponse, WsPresenceUpdateMessage, WsResponseCompleteMessage, WsTaskUpdateMessage, isMessageType } from '@arbidocs/client';
8
8
  import * as zustand from 'zustand';
9
9
  import * as _tanstack_react_query from '@tanstack/react-query';
10
- export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, Input, Label, MarkdownRenderer, MarkdownRendererProps, MarkdownStreamingContext, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from './ui/index.cjs';
10
+ export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictateContextValue, DictateProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, IconToggleProps, Input, InputProps, Label, MarkdownRenderer, MarkdownRendererProps, MarkdownStreamingContext, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TextareaProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from './ui/index.cjs';
11
11
  import * as lucide_react from 'lucide-react';
12
12
  import { LucideIcon, StickyNote } from 'lucide-react';
13
13
  import { Components } from 'react-markdown';
@@ -3030,6 +3030,29 @@ interface MicWaveformIndicatorProps {
3030
3030
  }
3031
3031
  declare function MicWaveformIndicator({ level, elapsedMs, paused, }: MicWaveformIndicatorProps): React$1.JSX.Element;
3032
3032
 
3033
+ /**
3034
+ * MicRecordingOverlay
3035
+ *
3036
+ * The big, unmissable "is it hearing me" feedback for an active recording —
3037
+ * a centered, portaled card with the REC-badge/timer/waveform visual
3038
+ * (MicWaveformIndicator). Shared by any recorder in the app that wants the
3039
+ * same prominent treatment while actively recording: the chat composer's
3040
+ * press-and-hold mic and the inline dictate button both use this, so
3041
+ * "you are recording" looks and feels identical everywhere it happens.
3042
+ *
3043
+ * Non-interactive (pointer-events disabled) so it never blocks a click
3044
+ * elsewhere; mounted via a portal so it renders above whatever field or
3045
+ * layout it was triggered from, regardless of overflow/z-index there.
3046
+ */
3047
+ interface MicRecordingOverlayProps {
3048
+ level: number;
3049
+ elapsedMs: number;
3050
+ paused?: boolean;
3051
+ /** Caption under the waveform — defaults to the press-and-hold framing. */
3052
+ caption?: string;
3053
+ }
3054
+ declare function MicRecordingOverlay({ level, elapsedMs, paused, caption, }: MicRecordingOverlayProps): React$1.ReactPortal | null;
3055
+
3033
3056
  /**
3034
3057
  * VoiceNoteRecorder
3035
3058
  *
@@ -3069,6 +3092,75 @@ interface VoiceNoteRecorderProps {
3069
3092
  }
3070
3093
  declare function VoiceNoteRecorder({ onSave, onDiscard, onError, title, isSaving, transcribe, }: VoiceNoteRecorderProps): React$1.JSX.Element;
3071
3094
 
3095
+ /**
3096
+ * DraftTitleControls
3097
+ *
3098
+ * A title field + an auto-name toggle for an unsaved draft (blank document,
3099
+ * voice note, or anything else a host app drafts before it exists on the
3100
+ * backend) — so picking a name or leaving AI generation on doesn't require a
3101
+ * separate settings surface.
3102
+ *
3103
+ * REUSE-FIRST: props/callbacks in, no store or config-API coupling. The host
3104
+ * owns where `title` is stored and what `autoRename` actually controls (in
3105
+ * ARBI-frontend, the same `DoctagLLM.AUTO_RENAME` config field the Upload
3106
+ * modal's toggle already writes).
3107
+ */
3108
+ interface DraftTitleControlsProps {
3109
+ title: string;
3110
+ onTitleChange: (title: string) => void;
3111
+ placeholder: string;
3112
+ autoRename: boolean;
3113
+ onAutoRenameChange: (value: boolean) => void;
3114
+ }
3115
+ declare function DraftTitleControls({ title, onTitleChange, placeholder, autoRename, onAutoRenameChange, }: DraftTitleControlsProps): React$1.JSX.Element;
3116
+
3117
+ /**
3118
+ * InlineMicButton
3119
+ *
3120
+ * A dictate-instead-of-type button meant to sit inside a text field's own
3121
+ * padding (a corner of an `<input>`/`<textarea>`), not a standalone feature
3122
+ * in its own right — no waveform, no timer, no card chrome. Only shows while
3123
+ * the host field is focused (or mid-recording/transcribing, so it never
3124
+ * vanishes out from under an active dictation) — otherwise the field stays
3125
+ * clean. Idle it's subtle (small, muted); once pressed it's the opposite —
3126
+ * a solid, unmissable recording indicator, because "is this thing listening"
3127
+ * is the one moment subtlety actively hurts. Built on the same
3128
+ * useAudioRecorder engine as VoiceNoteRecorder/MicButton.
3129
+ *
3130
+ * Two ways to use it, same as WhatsApp/Telegram voice messages:
3131
+ * - Press and hold, release to stop — quick dictation, thumb-friendly.
3132
+ * - A quick tap instead locks it into hands-free recording (no need to keep
3133
+ * the pointer down for a long note); tap again to stop. A tap is whatever
3134
+ * releases before HOLD_THRESHOLD_MS — past that it's a hold, and release
3135
+ * stops it immediately.
3136
+ *
3137
+ * REUSE-FIRST: props/callbacks in. The host supplies `transcribe` (its own
3138
+ * speech-to-text endpoint), `focused` (its own focus state), and
3139
+ * `onTranscript` (where the text goes — append, insert at cursor, whatever
3140
+ * fits the field).
3141
+ *
3142
+ * `preventDefault()` on pointerdown so pressing this button never steals
3143
+ * focus from the field it's embedded in — without that, a field that blurs
3144
+ * to collapse itself (e.g. an editor that exits edit mode on blur) would
3145
+ * close out from under a user mid-dictation, and `focused` would immediately
3146
+ * flip false and hide the button being pressed.
3147
+ */
3148
+ interface InlineMicButtonProps {
3149
+ /** Whether the host field currently has focus. The button renders only
3150
+ * while this is true, or while actively recording/transcribing. */
3151
+ focused: boolean;
3152
+ /** Called with the transcribed text once recording stops and transcription
3153
+ * resolves. The host decides how to merge it into the field's value. */
3154
+ onTranscript: (text: string) => void;
3155
+ /** Surfaces recorder or transcription failures — wire to the host's own
3156
+ * notification system. Without it, failures are silent. */
3157
+ onError?: (message: string) => void;
3158
+ /** The host's own speech-to-text call. */
3159
+ transcribe: (blob: Blob) => Promise<string>;
3160
+ className?: string;
3161
+ }
3162
+ declare function InlineMicButton({ focused, onTranscript, onError, transcribe, className, }: InlineMicButtonProps): React$1.JSX.Element | null;
3163
+
3072
3164
  /** Formats a duration in milliseconds as "mm:ss", clamped to non-negative. */
3073
3165
  declare function formatElapsed(ms: number): string;
3074
3166
 
@@ -3104,4 +3196,4 @@ interface ArbiUiState {
3104
3196
  }
3105
3197
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
3106
3198
 
3107
- export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, AgentBadge, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, type AppNotification, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, type AudioRecorderState, BASE_COLORS, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, type DateSeparatorProps, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, type DocumentCardMenuProps, type DocumentCardProps, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicWaveformIndicator, type MicWaveformIndicatorProps, NEUTRAL_GRAY, NotificationBell, type NotificationBellProps, type NotificationTypeMeta, type NotifyOptions, type NotifyVariant, OpenAIIcon, PLACEHOLDER_COLOR, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PassageCard, type PassageCardProps, PdfIcon, type PresenceDisplayStatus, PresenceLabel, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type Rag, RagDot, RelevanceDot, type RenderMarkdown, type SearchChunk, SemanticSearch, type SemanticSearchProps, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, type TagEntityProps, type TagLike, type ThreadAccessors, type ThreadItem, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseAudioRecorderResult, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuStatus, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VoiceNoteRecorder, type VoiceNoteRecorderProps, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatElapsed, formatRelativeTime, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, hasVideoTrack, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
3199
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, AgentBadge, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, type AppNotification, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, type AudioRecorderState, BASE_COLORS, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, type DateSeparatorProps, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, type DocumentCardMenuProps, type DocumentCardProps, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DraftTitleControls, type DraftTitleControlsProps, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, InlineMicButton, type InlineMicButtonProps, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicRecordingOverlay, type MicRecordingOverlayProps, MicWaveformIndicator, type MicWaveformIndicatorProps, NEUTRAL_GRAY, NotificationBell, type NotificationBellProps, type NotificationTypeMeta, type NotifyOptions, type NotifyVariant, OpenAIIcon, PLACEHOLDER_COLOR, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PassageCard, type PassageCardProps, PdfIcon, type PresenceDisplayStatus, PresenceLabel, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type Rag, RagDot, RelevanceDot, type RenderMarkdown, type SearchChunk, SemanticSearch, type SemanticSearchProps, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, type TagEntityProps, type TagLike, type ThreadAccessors, type ThreadItem, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseAudioRecorderResult, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuStatus, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VoiceNoteRecorder, type VoiceNoteRecorderProps, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatElapsed, formatRelativeTime, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, hasVideoTrack, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, c
7
7
  export { WebSocketServerMessage, WsBatchCompleteMessage, WsNotificationResponse, WsPresenceUpdateMessage, WsResponseCompleteMessage, WsTaskUpdateMessage, isMessageType } from '@arbidocs/client';
8
8
  import * as zustand from 'zustand';
9
9
  import * as _tanstack_react_query from '@tanstack/react-query';
10
- export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, Input, Label, MarkdownRenderer, MarkdownRendererProps, MarkdownStreamingContext, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from './ui/index.js';
10
+ export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardProps, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictateContextValue, DictateProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, IconToggleProps, Input, InputProps, Label, MarkdownRenderer, MarkdownRendererProps, MarkdownStreamingContext, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TextareaProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from './ui/index.js';
11
11
  import * as lucide_react from 'lucide-react';
12
12
  import { LucideIcon, StickyNote } from 'lucide-react';
13
13
  import { Components } from 'react-markdown';
@@ -3030,6 +3030,29 @@ interface MicWaveformIndicatorProps {
3030
3030
  }
3031
3031
  declare function MicWaveformIndicator({ level, elapsedMs, paused, }: MicWaveformIndicatorProps): React$1.JSX.Element;
3032
3032
 
3033
+ /**
3034
+ * MicRecordingOverlay
3035
+ *
3036
+ * The big, unmissable "is it hearing me" feedback for an active recording —
3037
+ * a centered, portaled card with the REC-badge/timer/waveform visual
3038
+ * (MicWaveformIndicator). Shared by any recorder in the app that wants the
3039
+ * same prominent treatment while actively recording: the chat composer's
3040
+ * press-and-hold mic and the inline dictate button both use this, so
3041
+ * "you are recording" looks and feels identical everywhere it happens.
3042
+ *
3043
+ * Non-interactive (pointer-events disabled) so it never blocks a click
3044
+ * elsewhere; mounted via a portal so it renders above whatever field or
3045
+ * layout it was triggered from, regardless of overflow/z-index there.
3046
+ */
3047
+ interface MicRecordingOverlayProps {
3048
+ level: number;
3049
+ elapsedMs: number;
3050
+ paused?: boolean;
3051
+ /** Caption under the waveform — defaults to the press-and-hold framing. */
3052
+ caption?: string;
3053
+ }
3054
+ declare function MicRecordingOverlay({ level, elapsedMs, paused, caption, }: MicRecordingOverlayProps): React$1.ReactPortal | null;
3055
+
3033
3056
  /**
3034
3057
  * VoiceNoteRecorder
3035
3058
  *
@@ -3069,6 +3092,75 @@ interface VoiceNoteRecorderProps {
3069
3092
  }
3070
3093
  declare function VoiceNoteRecorder({ onSave, onDiscard, onError, title, isSaving, transcribe, }: VoiceNoteRecorderProps): React$1.JSX.Element;
3071
3094
 
3095
+ /**
3096
+ * DraftTitleControls
3097
+ *
3098
+ * A title field + an auto-name toggle for an unsaved draft (blank document,
3099
+ * voice note, or anything else a host app drafts before it exists on the
3100
+ * backend) — so picking a name or leaving AI generation on doesn't require a
3101
+ * separate settings surface.
3102
+ *
3103
+ * REUSE-FIRST: props/callbacks in, no store or config-API coupling. The host
3104
+ * owns where `title` is stored and what `autoRename` actually controls (in
3105
+ * ARBI-frontend, the same `DoctagLLM.AUTO_RENAME` config field the Upload
3106
+ * modal's toggle already writes).
3107
+ */
3108
+ interface DraftTitleControlsProps {
3109
+ title: string;
3110
+ onTitleChange: (title: string) => void;
3111
+ placeholder: string;
3112
+ autoRename: boolean;
3113
+ onAutoRenameChange: (value: boolean) => void;
3114
+ }
3115
+ declare function DraftTitleControls({ title, onTitleChange, placeholder, autoRename, onAutoRenameChange, }: DraftTitleControlsProps): React$1.JSX.Element;
3116
+
3117
+ /**
3118
+ * InlineMicButton
3119
+ *
3120
+ * A dictate-instead-of-type button meant to sit inside a text field's own
3121
+ * padding (a corner of an `<input>`/`<textarea>`), not a standalone feature
3122
+ * in its own right — no waveform, no timer, no card chrome. Only shows while
3123
+ * the host field is focused (or mid-recording/transcribing, so it never
3124
+ * vanishes out from under an active dictation) — otherwise the field stays
3125
+ * clean. Idle it's subtle (small, muted); once pressed it's the opposite —
3126
+ * a solid, unmissable recording indicator, because "is this thing listening"
3127
+ * is the one moment subtlety actively hurts. Built on the same
3128
+ * useAudioRecorder engine as VoiceNoteRecorder/MicButton.
3129
+ *
3130
+ * Two ways to use it, same as WhatsApp/Telegram voice messages:
3131
+ * - Press and hold, release to stop — quick dictation, thumb-friendly.
3132
+ * - A quick tap instead locks it into hands-free recording (no need to keep
3133
+ * the pointer down for a long note); tap again to stop. A tap is whatever
3134
+ * releases before HOLD_THRESHOLD_MS — past that it's a hold, and release
3135
+ * stops it immediately.
3136
+ *
3137
+ * REUSE-FIRST: props/callbacks in. The host supplies `transcribe` (its own
3138
+ * speech-to-text endpoint), `focused` (its own focus state), and
3139
+ * `onTranscript` (where the text goes — append, insert at cursor, whatever
3140
+ * fits the field).
3141
+ *
3142
+ * `preventDefault()` on pointerdown so pressing this button never steals
3143
+ * focus from the field it's embedded in — without that, a field that blurs
3144
+ * to collapse itself (e.g. an editor that exits edit mode on blur) would
3145
+ * close out from under a user mid-dictation, and `focused` would immediately
3146
+ * flip false and hide the button being pressed.
3147
+ */
3148
+ interface InlineMicButtonProps {
3149
+ /** Whether the host field currently has focus. The button renders only
3150
+ * while this is true, or while actively recording/transcribing. */
3151
+ focused: boolean;
3152
+ /** Called with the transcribed text once recording stops and transcription
3153
+ * resolves. The host decides how to merge it into the field's value. */
3154
+ onTranscript: (text: string) => void;
3155
+ /** Surfaces recorder or transcription failures — wire to the host's own
3156
+ * notification system. Without it, failures are silent. */
3157
+ onError?: (message: string) => void;
3158
+ /** The host's own speech-to-text call. */
3159
+ transcribe: (blob: Blob) => Promise<string>;
3160
+ className?: string;
3161
+ }
3162
+ declare function InlineMicButton({ focused, onTranscript, onError, transcribe, className, }: InlineMicButtonProps): React$1.JSX.Element | null;
3163
+
3072
3164
  /** Formats a duration in milliseconds as "mm:ss", clamped to non-negative. */
3073
3165
  declare function formatElapsed(ms: number): string;
3074
3166
 
@@ -3104,4 +3196,4 @@ interface ArbiUiState {
3104
3196
  }
3105
3197
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
3106
3198
 
3107
- export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, AgentBadge, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, type AppNotification, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, type AudioRecorderState, BASE_COLORS, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, type DateSeparatorProps, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, type DocumentCardMenuProps, type DocumentCardProps, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicWaveformIndicator, type MicWaveformIndicatorProps, NEUTRAL_GRAY, NotificationBell, type NotificationBellProps, type NotificationTypeMeta, type NotifyOptions, type NotifyVariant, OpenAIIcon, PLACEHOLDER_COLOR, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PassageCard, type PassageCardProps, PdfIcon, type PresenceDisplayStatus, PresenceLabel, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type Rag, RagDot, RelevanceDot, type RenderMarkdown, type SearchChunk, SemanticSearch, type SemanticSearchProps, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, type TagEntityProps, type TagLike, type ThreadAccessors, type ThreadItem, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseAudioRecorderResult, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuStatus, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VoiceNoteRecorder, type VoiceNoteRecorderProps, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatElapsed, formatRelativeTime, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, hasVideoTrack, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
3199
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, AgentBadge, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, type AppNotification, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, type AudioRecorderState, BASE_COLORS, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, type DateSeparatorProps, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, type DocumentCardMenuProps, type DocumentCardProps, DocumentEntity, type DocumentEntityProps, DocumentGallery, type DocumentGalleryProps, type DocumentLike, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DraftTitleControls, type DraftTitleControlsProps, ENTITY_MAPPINGS, EmlIcon, EntityIcon, type EntityIconComponent, EntityPill, type EntityRegistryOverride, type EntityType, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, InlineMicButton, type InlineMicButtonProps, LinkedInIcon, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicRecordingOverlay, type MicRecordingOverlayProps, MicWaveformIndicator, type MicWaveformIndicatorProps, NEUTRAL_GRAY, NotificationBell, type NotificationBellProps, type NotificationTypeMeta, type NotifyOptions, type NotifyVariant, OpenAIIcon, PLACEHOLDER_COLOR, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, PassageCard, type PassageCardProps, PdfIcon, type PresenceDisplayStatus, PresenceLabel, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type Rag, RagDot, RelevanceDot, type RenderMarkdown, type SearchChunk, SemanticSearch, type SemanticSearchProps, type StatusBadgeComponent, type StatusBadgeProps, StatusPill, type StatusPillProps, type StatusVariant, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, type TagEntityProps, type TagLike, type ThreadAccessors, type ThreadItem, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseAudioRecorderResult, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuStatus, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VoiceNoteRecorder, type VoiceNoteRecorderProps, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatElapsed, formatRelativeTime, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, hasVideoTrack, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { useArbi, ArbiProvider, AudioViewer } from './chunk-Q6XAXIT3.js';
2
2
  export { ArbiProvider, useArbi } from './chunk-Q6XAXIT3.js';
3
- import { cn, Avatar, AvatarFallback, AvatarImage, Tooltip, TooltipTrigger, TooltipContent, Popover, PopoverTrigger, PopoverContent, AiMarkdown, Card, Button, Badge, MarkdownRenderer, Input, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, ScrollArea, DropdownMenuItem, Textarea, Slider, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DropdownMenuLabel, DropdownMenuSeparator, Checkbox } from './chunk-PAJGQHFM.js';
4
- export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, Input, Label, MarkdownRenderer, MarkdownStreamingContext, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, markdownBaseComponents, splitMarkdownBlocks, toggleVariants } from './chunk-PAJGQHFM.js';
3
+ import { cn, Avatar, AvatarFallback, AvatarImage, Tooltip, TooltipTrigger, TooltipContent, Popover, PopoverTrigger, PopoverContent, AiMarkdown, Card, Button, Badge, MarkdownRenderer, Input, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, ScrollArea, DropdownMenuItem, Textarea, Slider, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DropdownMenuLabel, DropdownMenuSeparator, Checkbox, useAudioRecorder, MicWaveformIndicator, IconToggle } from './chunk-QZAXTBVW.js';
4
+ export { AiMarkdown, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictateProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, InlineMicButton, Input, Label, MarkdownRenderer, MarkdownStreamingContext, MicRecordingOverlay, MicWaveformIndicator, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, formatElapsed, markdownBaseComponents, splitMarkdownBlocks, toggleVariants, useAudioRecorder } from './chunk-QZAXTBVW.js';
5
5
  import React2, { memo, useState, createContext, forwardRef, useMemo, useCallback, useId, useRef, useContext, useEffect, Fragment as Fragment$1 } from 'react';
6
6
  import { useQuery, useMutation, useQueries, QueryClient, QueryClientProvider, useQueryClient } from '@tanstack/react-query';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -7160,227 +7160,11 @@ function DocumentGallery({
7160
7160
  }
7161
7161
  );
7162
7162
  }
7163
- var LEVEL_UPDATE_INTERVAL_MS = 50;
7164
- function classifyMicError(err) {
7165
- const name = err instanceof DOMException ? err.name : void 0;
7166
- if (name === "NotAllowedError" || name === "SecurityError") {
7167
- return "Microphone access is blocked. Allow microphone permission in your browser settings to use voice input.";
7168
- }
7169
- if (name === "NotFoundError" || name === "DevicesNotFoundError") {
7170
- return "No microphone found on this device.";
7171
- }
7172
- if (!navigator.mediaDevices?.getUserMedia) {
7173
- return "Voice input is not supported in this browser.";
7174
- }
7175
- return "Could not start recording. Please try again.";
7176
- }
7177
- function useAudioRecorder() {
7178
- const [state, setState] = useState("idle");
7179
- const [level, setLevel] = useState(0);
7180
- const [elapsedMs, setElapsedMs] = useState(0);
7181
- const [blob, setBlob] = useState(null);
7182
- const [mimeType, setMimeType] = useState(null);
7183
- const [error, setError] = useState(null);
7184
- const mediaRecorderRef = useRef(null);
7185
- const chunksRef = useRef([]);
7186
- const streamRef = useRef(null);
7187
- const stateRef = useRef("idle");
7188
- stateRef.current = state;
7189
- const segmentStartRef = useRef(0);
7190
- const accumulatedMsRef = useRef(0);
7191
- const audioContextRef = useRef(null);
7192
- const analyserRef = useRef(null);
7193
- const levelRafRef = useRef(null);
7194
- const stopMeter = useCallback(() => {
7195
- if (levelRafRef.current !== null) cancelAnimationFrame(levelRafRef.current);
7196
- levelRafRef.current = null;
7197
- analyserRef.current = null;
7198
- void audioContextRef.current?.close().catch(() => {
7199
- });
7200
- audioContextRef.current = null;
7201
- }, []);
7202
- const startMeter = useCallback((stream) => {
7203
- const audioContext = new AudioContext();
7204
- const source = audioContext.createMediaStreamSource(stream);
7205
- const analyser = audioContext.createAnalyser();
7206
- analyser.fftSize = 256;
7207
- source.connect(analyser);
7208
- audioContextRef.current = audioContext;
7209
- analyserRef.current = analyser;
7210
- const data = new Uint8Array(analyser.frequencyBinCount);
7211
- let lastUpdate = 0;
7212
- const tick = (t) => {
7213
- const active = analyserRef.current;
7214
- if (!active) return;
7215
- if (t - lastUpdate >= LEVEL_UPDATE_INTERVAL_MS) {
7216
- lastUpdate = t;
7217
- active.getByteTimeDomainData(data);
7218
- let sumSquares = 0;
7219
- for (let i = 0; i < data.length; i++) {
7220
- const centered = (data[i] - 128) / 128;
7221
- sumSquares += centered * centered;
7222
- }
7223
- const rms = Math.sqrt(sumSquares / data.length);
7224
- setLevel(Math.sqrt(Math.min(1, rms * 8)));
7225
- setElapsedMs(accumulatedMsRef.current + (t - segmentStartRef.current));
7226
- }
7227
- levelRafRef.current = requestAnimationFrame(tick);
7228
- };
7229
- levelRafRef.current = requestAnimationFrame(tick);
7230
- }, []);
7231
- const stopTracks = useCallback(() => {
7232
- streamRef.current?.getTracks().forEach((t) => t.stop());
7233
- streamRef.current = null;
7234
- }, []);
7235
- useEffect(
7236
- () => () => {
7237
- stopTracks();
7238
- stopMeter();
7239
- },
7240
- [stopTracks, stopMeter]
7241
- );
7242
- const start = useCallback(async () => {
7243
- if (stateRef.current === "recording" || stateRef.current === "paused") return;
7244
- setError(null);
7245
- try {
7246
- const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
7247
- streamRef.current = stream;
7248
- const mt = MediaRecorder.isTypeSupported("audio/webm") ? "audio/webm" : "audio/mp4";
7249
- const recorder = new MediaRecorder(stream, { mimeType: mt });
7250
- chunksRef.current = [];
7251
- recorder.ondataavailable = (e) => {
7252
- if (e.data.size > 0) chunksRef.current.push(e.data);
7253
- };
7254
- mediaRecorderRef.current = recorder;
7255
- setMimeType(mt);
7256
- setBlob(null);
7257
- accumulatedMsRef.current = 0;
7258
- segmentStartRef.current = performance.now();
7259
- recorder.start();
7260
- setState("recording");
7261
- startMeter(stream);
7262
- } catch (err) {
7263
- stopTracks();
7264
- setError(classifyMicError(err));
7265
- }
7266
- }, [startMeter, stopTracks]);
7267
- const pause = useCallback(() => {
7268
- const recorder = mediaRecorderRef.current;
7269
- if (!recorder || recorder.state !== "recording") return;
7270
- recorder.pause();
7271
- accumulatedMsRef.current += performance.now() - segmentStartRef.current;
7272
- stopMeter();
7273
- setLevel(0);
7274
- setState("paused");
7275
- }, [stopMeter]);
7276
- const resume = useCallback(() => {
7277
- const recorder = mediaRecorderRef.current;
7278
- if (!recorder || recorder.state !== "paused") return;
7279
- recorder.resume();
7280
- segmentStartRef.current = performance.now();
7281
- setState("recording");
7282
- if (streamRef.current) startMeter(streamRef.current);
7283
- }, [startMeter]);
7284
- const stop = useCallback(() => {
7285
- const recorder = mediaRecorderRef.current;
7286
- if (!recorder || recorder.state === "inactive") return;
7287
- const finalElapsed = recorder.state === "paused" ? accumulatedMsRef.current : accumulatedMsRef.current + (performance.now() - segmentStartRef.current);
7288
- stopMeter();
7289
- recorder.onstop = () => {
7290
- stopTracks();
7291
- const finalBlob = chunksRef.current.length ? new Blob(chunksRef.current, { type: recorder.mimeType }) : null;
7292
- setBlob(finalBlob);
7293
- setElapsedMs(finalElapsed);
7294
- setLevel(0);
7295
- setState("stopped");
7296
- };
7297
- recorder.stop();
7298
- }, [stopMeter, stopTracks]);
7299
- const reset = useCallback(() => {
7300
- setState("idle");
7301
- setBlob(null);
7302
- setElapsedMs(0);
7303
- setLevel(0);
7304
- setMimeType(null);
7305
- setError(null);
7306
- }, []);
7307
- return { state, level, elapsedMs, blob, mimeType, error, start, pause, resume, stop, reset };
7308
- }
7309
-
7310
- // src/documents/format-elapsed.ts
7311
- function formatElapsed(ms) {
7312
- const totalSeconds = Math.max(0, Math.floor(ms / 1e3));
7313
- const minutes = Math.floor(totalSeconds / 60);
7314
- const seconds = totalSeconds % 60;
7315
- return `${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}`;
7316
- }
7317
- var BAR_WEIGHTS = [
7318
- 0.25,
7319
- 0.32,
7320
- 0.48,
7321
- 0.62,
7322
- 0.82,
7323
- 0.56,
7324
- 0.92,
7325
- 0.72,
7326
- 1,
7327
- 0.86,
7328
- 0.62,
7329
- 0.96,
7330
- 0.76,
7331
- 0.5,
7332
- 0.84,
7333
- 0.66,
7334
- 0.42,
7335
- 0.56,
7336
- 0.36,
7337
- 0.28,
7338
- 0.22
7339
- ];
7340
- var MIN_BAR_PX = 3;
7341
- var MAX_BAR_PX = 40;
7342
- function MicWaveformIndicator({
7343
- level,
7344
- elapsedMs,
7345
- paused = false
7346
- }) {
7347
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", "data-testid": "mic-waveform-indicator", children: [
7348
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7349
- /* @__PURE__ */ jsxs("span", { className: "relative flex h-2 w-2", children: [
7350
- !paused && /* @__PURE__ */ jsx("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-red-500 opacity-75" }),
7351
- /* @__PURE__ */ jsx(
7352
- "span",
7353
- {
7354
- className: `relative inline-flex h-2 w-2 rounded-full ${paused ? "bg-muted-foreground" : "bg-red-500"}`
7355
- }
7356
- )
7357
- ] }),
7358
- /* @__PURE__ */ jsx(
7359
- "span",
7360
- {
7361
- className: `text-xs font-semibold uppercase tracking-wide ${paused ? "text-muted-foreground" : "text-red-500"}`,
7362
- children: paused ? "Paused" : "Rec"
7363
- }
7364
- ),
7365
- /* @__PURE__ */ jsx("span", { className: "font-mono text-xs tabular-nums text-muted-foreground", children: formatElapsed(elapsedMs) })
7366
- ] }),
7367
- /* @__PURE__ */ jsx("div", { className: "flex h-10 items-end gap-[3px]", "data-testid": "mic-waveform-indicator-bars", children: BAR_WEIGHTS.map((weight, i) => /* @__PURE__ */ jsx(
7368
- "span",
7369
- {
7370
- className: "w-1 rounded-full bg-secondary transition-[height] duration-75 ease-out",
7371
- style: {
7372
- height: Math.min(MAX_BAR_PX, Math.max(MIN_BAR_PX, level * weight * MAX_BAR_PX))
7373
- }
7374
- },
7375
- i
7376
- )) })
7377
- ] });
7378
- }
7379
7163
  function VoiceNoteRecorder({
7380
7164
  onSave,
7381
7165
  onDiscard,
7382
7166
  onError,
7383
- title = "Voice note",
7167
+ title = "Voice Memo",
7384
7168
  isSaving = false,
7385
7169
  transcribe
7386
7170
  }) {
@@ -7531,6 +7315,40 @@ function VoiceNoteRecorder({
7531
7315
  ] })
7532
7316
  ] });
7533
7317
  }
7318
+ var AUTO_RENAME_COLORS = { text: "text-amber-700", bg: "bg-amber-500" };
7319
+ function DraftTitleControls({
7320
+ title,
7321
+ onTitleChange,
7322
+ placeholder,
7323
+ autoRename,
7324
+ onAutoRenameChange
7325
+ }) {
7326
+ return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-shrink-0 items-center gap-1.5", children: [
7327
+ /* @__PURE__ */ jsx(
7328
+ "input",
7329
+ {
7330
+ type: "text",
7331
+ value: title,
7332
+ onChange: (e) => onTitleChange(e.target.value),
7333
+ placeholder,
7334
+ className: "min-w-0 max-w-[220px] rounded-md bg-muted px-2 py-1 text-sm font-medium outline-none focus-visible:ring-1 focus-visible:ring-primary",
7335
+ "data-testid": "draft-title-input"
7336
+ }
7337
+ ),
7338
+ /* @__PURE__ */ jsx(
7339
+ IconToggle,
7340
+ {
7341
+ icon: Sparkles,
7342
+ isActive: autoRename,
7343
+ onToggle: onAutoRenameChange,
7344
+ colors: AUTO_RENAME_COLORS,
7345
+ tooltipActive: "Auto-name from content is on \u2014 generates a title once saved",
7346
+ tooltipInactive: "Auto-name from content is off \u2014 uses the name typed above",
7347
+ "data-testid": "draft-auto-rename-toggle"
7348
+ }
7349
+ )
7350
+ ] });
7351
+ }
7534
7352
 
7535
7353
  // src/documents/has-video-track.ts
7536
7354
  function hasVideoTrack(blob) {
@@ -7556,6 +7374,6 @@ function hasVideoTrack(blob) {
7556
7374
  });
7557
7375
  }
7558
7376
 
7559
- export { ActivityFeed, AgentBadge, AiActionCard, AiAnswer, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, ArbiChatPanel, ArbiIcon, ArbiWebSocketProvider, ArtifactCanvas, AudIcon, BASE_COLORS2 as BASE_COLORS, ChatBubble, CitationRenderer, ClaudeIcon, CommandPalette, CommandPaletteProvider, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, DirectMessages, DmAvatar, DmComposer, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, DocumentEntity, DocumentGallery, DocumentReview, DocumentTable, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, ImageCropper, ImgIcon, LinkedInIcon, MessageArtifactCard, MessageBubble2 as MessageBubble, MessageThread, MicWaveformIndicator, NEUTRAL_GRAY2 as NEUTRAL_GRAY, NotificationBell, OpenAIIcon, PLACEHOLDER_COLOR, PassageCard, PdfIcon, PresenceLabel, ProjectEntity, ProviderIcon, RUN_WINDOW_MS, RagDot, RelevanceDot, SemanticSearch, StatusPill, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, Toaster, TxtIcon, TypingIndicator, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VoiceNoteRecorder, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatElapsed, formatRelativeTime, getDocIcon, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, hasVideoTrack, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
7377
+ export { ActivityFeed, AgentBadge, AiActionCard, AiAnswer, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, ArbiChat, ArbiChatPanel, ArbiIcon, ArbiWebSocketProvider, ArtifactCanvas, AudIcon, BASE_COLORS2 as BASE_COLORS, ChatBubble, CitationRenderer, ClaudeIcon, CommandPalette, CommandPaletteProvider, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_NOTIFY_TONE, DateSeparator, DirectMessages, DmAvatar, DmComposer, DocIcon, DocQaPanel, DocSearch, DocumentCard, DocumentCardMenu, DocumentEntity, DocumentGallery, DocumentReview, DocumentTable, DraftTitleControls, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, HtmlIcon, ImageCropModal, ImageCropper, ImgIcon, LinkedInIcon, MessageArtifactCard, MessageBubble2 as MessageBubble, MessageThread, NEUTRAL_GRAY2 as NEUTRAL_GRAY, NotificationBell, OpenAIIcon, PLACEHOLDER_COLOR, PassageCard, PdfIcon, PresenceLabel, ProjectEntity, ProviderIcon, RUN_WINDOW_MS, RagDot, RelevanceDot, SemanticSearch, StatusPill, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, Toaster, TxtIcon, TypingIndicator, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VoiceNoteRecorder, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatRelativeTime, getDocIcon, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, hasVideoTrack, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbiConnected, useArbiDocumentSync, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useCommandPalette, useConfigs, useConversations, useDeleteAgents, useDirectMessages, useDocuments, useFacts, useHealth, useNotify, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSemanticSearch, useSessions, useTags, useTasks, useThumbnails, useUserUsageToday, useWorkspaceDocs, useWorkspaces, userDisplayName, userInitials };
7560
7378
  //# sourceMappingURL=index.js.map
7561
7379
  //# sourceMappingURL=index.js.map