@arbidocs/react 0.3.171 → 0.3.172
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/chunk-Q6XAXIT3.js +43 -0
- package/dist/chunk-Q6XAXIT3.js.map +1 -0
- package/dist/{chunk-ZMTLGO3K.cjs → chunk-RWCMW36I.cjs} +20 -2
- package/dist/chunk-RWCMW36I.cjs.map +1 -0
- package/dist/index.cjs +403 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +110 -1
- package/dist/index.d.ts +110 -1
- package/dist/index.js +363 -4
- package/dist/index.js.map +1 -1
- package/dist/viewers/index.cjs +7 -21
- package/dist/viewers/index.cjs.map +1 -1
- package/dist/viewers/index.js +3 -19
- package/dist/viewers/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-J4MX2W4H.js +0 -26
- package/dist/chunk-J4MX2W4H.js.map +0 -1
- package/dist/chunk-ZMTLGO3K.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -2970,6 +2970,115 @@ interface DocumentReviewProps {
|
|
|
2970
2970
|
}
|
|
2971
2971
|
declare function DocumentReview({ docId, doc, workspaceId, stage, activeChunkId, onClose, className, }: DocumentReviewProps): React__default.JSX.Element;
|
|
2972
2972
|
|
|
2973
|
+
/**
|
|
2974
|
+
* useAudioRecorder
|
|
2975
|
+
*
|
|
2976
|
+
* Shared recording engine — getUserMedia capture, MediaRecorder lifecycle,
|
|
2977
|
+
* and an AnalyserNode-driven live level meter. Host apps layer their own
|
|
2978
|
+
* interaction model on top of the primitives here: a press-and-hold mic
|
|
2979
|
+
* calls start()/stop() on press/release and never pauses; a toggle-style
|
|
2980
|
+
* recorder exposes all of start/pause/resume/stop/reset as buttons.
|
|
2981
|
+
*
|
|
2982
|
+
* REUSE-FIRST: no app coupling. Failures surface via the returned `error`
|
|
2983
|
+
* string rather than an app-specific toast/notification call — the host
|
|
2984
|
+
* decides how (or whether) to display it.
|
|
2985
|
+
*/
|
|
2986
|
+
type AudioRecorderState = 'idle' | 'recording' | 'paused' | 'stopped';
|
|
2987
|
+
interface UseAudioRecorderResult {
|
|
2988
|
+
state: AudioRecorderState;
|
|
2989
|
+
/** Live input level, 0-1. 0 while idle/paused/stopped. */
|
|
2990
|
+
level: number;
|
|
2991
|
+
/** Total recorded duration so far (excludes time spent paused). Frozen at
|
|
2992
|
+
* its final value once stopped, until reset() clears it. */
|
|
2993
|
+
elapsedMs: number;
|
|
2994
|
+
/** The finished recording. Only set once state === 'stopped'. */
|
|
2995
|
+
blob: Blob | null;
|
|
2996
|
+
/** The MediaRecorder MIME type used (e.g. 'audio/webm'). Only set once
|
|
2997
|
+
* recording has started at least once. */
|
|
2998
|
+
mimeType: string | null;
|
|
2999
|
+
/** A human-readable message from the last failed start() attempt. Cleared
|
|
3000
|
+
* at the start of every new attempt, so it always transitions through
|
|
3001
|
+
* `null` even if the next failure has the same message. */
|
|
3002
|
+
error: string | null;
|
|
3003
|
+
start: () => Promise<void>;
|
|
3004
|
+
pause: () => void;
|
|
3005
|
+
resume: () => void;
|
|
3006
|
+
stop: () => void;
|
|
3007
|
+
/** Back to idle: clears blob/elapsedMs/mimeType, ready to record again. */
|
|
3008
|
+
reset: () => void;
|
|
3009
|
+
}
|
|
3010
|
+
declare function useAudioRecorder(): UseAudioRecorderResult;
|
|
3011
|
+
|
|
3012
|
+
/**
|
|
3013
|
+
* MicWaveformIndicator
|
|
3014
|
+
*
|
|
3015
|
+
* The REC-badge + timer + waveform visual — the reusable "is it hearing me"
|
|
3016
|
+
* piece shared by any press-and-hold or toggle-style audio recorder a host
|
|
3017
|
+
* app builds on `useAudioRecorder`. Purely presentational: no portal, no
|
|
3018
|
+
* card chrome, no caption — callers provide their own context around it.
|
|
3019
|
+
*
|
|
3020
|
+
* Styled like the REC-badge + timer + waveform convention every voice
|
|
3021
|
+
* recorder app uses (Voice Memos, WhatsApp, Slack huddles) — recognisable
|
|
3022
|
+
* at a glance as "this bar height is how loud you are", not just decoration.
|
|
3023
|
+
*/
|
|
3024
|
+
interface MicWaveformIndicatorProps {
|
|
3025
|
+
level: number;
|
|
3026
|
+
elapsedMs: number;
|
|
3027
|
+
/** Dims the REC badge and freezes the "recording" framing while paused,
|
|
3028
|
+
* without needing a separate visual language. */
|
|
3029
|
+
paused?: boolean;
|
|
3030
|
+
}
|
|
3031
|
+
declare function MicWaveformIndicator({ level, elapsedMs, paused, }: MicWaveformIndicatorProps): React$1.JSX.Element;
|
|
3032
|
+
|
|
3033
|
+
/**
|
|
3034
|
+
* VoiceNoteRecorder
|
|
3035
|
+
*
|
|
3036
|
+
* A toggle-style recorder (press to start, pause/resume, stop, review, then
|
|
3037
|
+
* save or discard) as opposed to a press-and-hold mic. Shares its
|
|
3038
|
+
* capture/metering engine (useAudioRecorder) and its REC-badge/timer/waveform
|
|
3039
|
+
* visual (MicWaveformIndicator) with any other recorder a host app builds.
|
|
3040
|
+
*
|
|
3041
|
+
* REUSE-FIRST: no app coupling. The host supplies `onSave`/`onDiscard` (and
|
|
3042
|
+
* optionally `onError`) — this component owns only the recording UI and
|
|
3043
|
+
* in-memory blob, never persistence. Nothing is uploaded until the host's
|
|
3044
|
+
* `onSave` is called and resolves.
|
|
3045
|
+
*/
|
|
3046
|
+
interface VoiceNoteRecorderProps {
|
|
3047
|
+
/** Called with the reviewed recording when the user hits Save. Resolve to
|
|
3048
|
+
* let the host close/replace this recorder; the recorder shows a saving
|
|
3049
|
+
* spinner while the promise is pending. */
|
|
3050
|
+
onSave: (blob: Blob, mimeType: string | null) => Promise<void> | void;
|
|
3051
|
+
/** Called when the user discards the draft. */
|
|
3052
|
+
onDiscard: () => void;
|
|
3053
|
+
/** Surfaces recorder failures (e.g. denied mic permission) — wire this to
|
|
3054
|
+
* the host's own notification system. Without it, failures are silent. */
|
|
3055
|
+
onError?: (message: string) => void;
|
|
3056
|
+
/** Title passed through to the playback preview. */
|
|
3057
|
+
title?: string;
|
|
3058
|
+
/** External saving state, e.g. while the host's onSave promise is
|
|
3059
|
+
* pending — disables actions and shows a spinner on Save. */
|
|
3060
|
+
isSaving?: boolean;
|
|
3061
|
+
}
|
|
3062
|
+
declare function VoiceNoteRecorder({ onSave, onDiscard, onError, title, isSaving, }: VoiceNoteRecorderProps): React$1.JSX.Element;
|
|
3063
|
+
|
|
3064
|
+
/** Formats a duration in milliseconds as "mm:ss", clamped to non-negative. */
|
|
3065
|
+
declare function formatElapsed(ms: number): string;
|
|
3066
|
+
|
|
3067
|
+
/**
|
|
3068
|
+
* Content-based audio-vs-video detection for containers that don't tell you
|
|
3069
|
+
* from the extension alone. WebM in particular can hold audio-only, video-only,
|
|
3070
|
+
* or both, and a host app bucketing purely by file extension will get an
|
|
3071
|
+
* audio-only recording (e.g. a voice note) wrong, since `.webm` is what
|
|
3072
|
+
* MediaRecorder produces either way.
|
|
3073
|
+
*
|
|
3074
|
+
* No backend involvement needed: most document APIs don't expose a
|
|
3075
|
+
* content-type field to check post-upload (only a file name), but loading the
|
|
3076
|
+
* bytes into a hidden <video> element and reading its decoded metadata does
|
|
3077
|
+
* the job entirely client-side — videoWidth/videoHeight report 0x0 when
|
|
3078
|
+
* there's no video track, even though duration/audio still work fine.
|
|
3079
|
+
*/
|
|
3080
|
+
declare function hasVideoTrack(blob: Blob): Promise<boolean>;
|
|
3081
|
+
|
|
2973
3082
|
/**
|
|
2974
3083
|
* SDK-owned UI store for cross-block coordination.
|
|
2975
3084
|
*
|
|
@@ -2987,4 +3096,4 @@ interface ArbiUiState {
|
|
|
2987
3096
|
}
|
|
2988
3097
|
declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
|
|
2989
3098
|
|
|
2990
|
-
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, 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, 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 UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuStatus, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatRelativeTime, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, 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 };
|
|
3099
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -2970,6 +2970,115 @@ interface DocumentReviewProps {
|
|
|
2970
2970
|
}
|
|
2971
2971
|
declare function DocumentReview({ docId, doc, workspaceId, stage, activeChunkId, onClose, className, }: DocumentReviewProps): React__default.JSX.Element;
|
|
2972
2972
|
|
|
2973
|
+
/**
|
|
2974
|
+
* useAudioRecorder
|
|
2975
|
+
*
|
|
2976
|
+
* Shared recording engine — getUserMedia capture, MediaRecorder lifecycle,
|
|
2977
|
+
* and an AnalyserNode-driven live level meter. Host apps layer their own
|
|
2978
|
+
* interaction model on top of the primitives here: a press-and-hold mic
|
|
2979
|
+
* calls start()/stop() on press/release and never pauses; a toggle-style
|
|
2980
|
+
* recorder exposes all of start/pause/resume/stop/reset as buttons.
|
|
2981
|
+
*
|
|
2982
|
+
* REUSE-FIRST: no app coupling. Failures surface via the returned `error`
|
|
2983
|
+
* string rather than an app-specific toast/notification call — the host
|
|
2984
|
+
* decides how (or whether) to display it.
|
|
2985
|
+
*/
|
|
2986
|
+
type AudioRecorderState = 'idle' | 'recording' | 'paused' | 'stopped';
|
|
2987
|
+
interface UseAudioRecorderResult {
|
|
2988
|
+
state: AudioRecorderState;
|
|
2989
|
+
/** Live input level, 0-1. 0 while idle/paused/stopped. */
|
|
2990
|
+
level: number;
|
|
2991
|
+
/** Total recorded duration so far (excludes time spent paused). Frozen at
|
|
2992
|
+
* its final value once stopped, until reset() clears it. */
|
|
2993
|
+
elapsedMs: number;
|
|
2994
|
+
/** The finished recording. Only set once state === 'stopped'. */
|
|
2995
|
+
blob: Blob | null;
|
|
2996
|
+
/** The MediaRecorder MIME type used (e.g. 'audio/webm'). Only set once
|
|
2997
|
+
* recording has started at least once. */
|
|
2998
|
+
mimeType: string | null;
|
|
2999
|
+
/** A human-readable message from the last failed start() attempt. Cleared
|
|
3000
|
+
* at the start of every new attempt, so it always transitions through
|
|
3001
|
+
* `null` even if the next failure has the same message. */
|
|
3002
|
+
error: string | null;
|
|
3003
|
+
start: () => Promise<void>;
|
|
3004
|
+
pause: () => void;
|
|
3005
|
+
resume: () => void;
|
|
3006
|
+
stop: () => void;
|
|
3007
|
+
/** Back to idle: clears blob/elapsedMs/mimeType, ready to record again. */
|
|
3008
|
+
reset: () => void;
|
|
3009
|
+
}
|
|
3010
|
+
declare function useAudioRecorder(): UseAudioRecorderResult;
|
|
3011
|
+
|
|
3012
|
+
/**
|
|
3013
|
+
* MicWaveformIndicator
|
|
3014
|
+
*
|
|
3015
|
+
* The REC-badge + timer + waveform visual — the reusable "is it hearing me"
|
|
3016
|
+
* piece shared by any press-and-hold or toggle-style audio recorder a host
|
|
3017
|
+
* app builds on `useAudioRecorder`. Purely presentational: no portal, no
|
|
3018
|
+
* card chrome, no caption — callers provide their own context around it.
|
|
3019
|
+
*
|
|
3020
|
+
* Styled like the REC-badge + timer + waveform convention every voice
|
|
3021
|
+
* recorder app uses (Voice Memos, WhatsApp, Slack huddles) — recognisable
|
|
3022
|
+
* at a glance as "this bar height is how loud you are", not just decoration.
|
|
3023
|
+
*/
|
|
3024
|
+
interface MicWaveformIndicatorProps {
|
|
3025
|
+
level: number;
|
|
3026
|
+
elapsedMs: number;
|
|
3027
|
+
/** Dims the REC badge and freezes the "recording" framing while paused,
|
|
3028
|
+
* without needing a separate visual language. */
|
|
3029
|
+
paused?: boolean;
|
|
3030
|
+
}
|
|
3031
|
+
declare function MicWaveformIndicator({ level, elapsedMs, paused, }: MicWaveformIndicatorProps): React$1.JSX.Element;
|
|
3032
|
+
|
|
3033
|
+
/**
|
|
3034
|
+
* VoiceNoteRecorder
|
|
3035
|
+
*
|
|
3036
|
+
* A toggle-style recorder (press to start, pause/resume, stop, review, then
|
|
3037
|
+
* save or discard) as opposed to a press-and-hold mic. Shares its
|
|
3038
|
+
* capture/metering engine (useAudioRecorder) and its REC-badge/timer/waveform
|
|
3039
|
+
* visual (MicWaveformIndicator) with any other recorder a host app builds.
|
|
3040
|
+
*
|
|
3041
|
+
* REUSE-FIRST: no app coupling. The host supplies `onSave`/`onDiscard` (and
|
|
3042
|
+
* optionally `onError`) — this component owns only the recording UI and
|
|
3043
|
+
* in-memory blob, never persistence. Nothing is uploaded until the host's
|
|
3044
|
+
* `onSave` is called and resolves.
|
|
3045
|
+
*/
|
|
3046
|
+
interface VoiceNoteRecorderProps {
|
|
3047
|
+
/** Called with the reviewed recording when the user hits Save. Resolve to
|
|
3048
|
+
* let the host close/replace this recorder; the recorder shows a saving
|
|
3049
|
+
* spinner while the promise is pending. */
|
|
3050
|
+
onSave: (blob: Blob, mimeType: string | null) => Promise<void> | void;
|
|
3051
|
+
/** Called when the user discards the draft. */
|
|
3052
|
+
onDiscard: () => void;
|
|
3053
|
+
/** Surfaces recorder failures (e.g. denied mic permission) — wire this to
|
|
3054
|
+
* the host's own notification system. Without it, failures are silent. */
|
|
3055
|
+
onError?: (message: string) => void;
|
|
3056
|
+
/** Title passed through to the playback preview. */
|
|
3057
|
+
title?: string;
|
|
3058
|
+
/** External saving state, e.g. while the host's onSave promise is
|
|
3059
|
+
* pending — disables actions and shows a spinner on Save. */
|
|
3060
|
+
isSaving?: boolean;
|
|
3061
|
+
}
|
|
3062
|
+
declare function VoiceNoteRecorder({ onSave, onDiscard, onError, title, isSaving, }: VoiceNoteRecorderProps): React$1.JSX.Element;
|
|
3063
|
+
|
|
3064
|
+
/** Formats a duration in milliseconds as "mm:ss", clamped to non-negative. */
|
|
3065
|
+
declare function formatElapsed(ms: number): string;
|
|
3066
|
+
|
|
3067
|
+
/**
|
|
3068
|
+
* Content-based audio-vs-video detection for containers that don't tell you
|
|
3069
|
+
* from the extension alone. WebM in particular can hold audio-only, video-only,
|
|
3070
|
+
* or both, and a host app bucketing purely by file extension will get an
|
|
3071
|
+
* audio-only recording (e.g. a voice note) wrong, since `.webm` is what
|
|
3072
|
+
* MediaRecorder produces either way.
|
|
3073
|
+
*
|
|
3074
|
+
* No backend involvement needed: most document APIs don't expose a
|
|
3075
|
+
* content-type field to check post-upload (only a file name), but loading the
|
|
3076
|
+
* bytes into a hidden <video> element and reading its decoded metadata does
|
|
3077
|
+
* the job entirely client-side — videoWidth/videoHeight report 0x0 when
|
|
3078
|
+
* there's no video track, even though duration/audio still work fine.
|
|
3079
|
+
*/
|
|
3080
|
+
declare function hasVideoTrack(blob: Blob): Promise<boolean>;
|
|
3081
|
+
|
|
2973
3082
|
/**
|
|
2974
3083
|
* SDK-owned UI store for cross-block coordination.
|
|
2975
3084
|
*
|
|
@@ -2987,4 +3096,4 @@ interface ArbiUiState {
|
|
|
2987
3096
|
}
|
|
2988
3097
|
declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
|
|
2989
3098
|
|
|
2990
|
-
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, 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, 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 UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuStatus, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, annotateThread, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, dayKey, describeActivity, formatRelativeTime, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, isWorkspaceNotificationType, notify, parseActivityContent, redlineStats, seedNotifications, selectUnread, textToArtifact, toRedlineMarkdown, useActivity, useAgents, useAiTask, useArbi, 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 };
|
|
3099
|
+
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 };
|