@arbidocs/react 0.4.58 → 0.4.60

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
@@ -512,6 +512,9 @@ declare const arbiQueryKeys: {
512
512
  workspaces: () => readonly ["arbi", "workspaces"];
513
513
  workspaceUsers: (workspaceId: string) => readonly ["arbi", "workspaceUsers", string];
514
514
  documents: (workspaceId: string) => readonly ["arbi", "documents", string];
515
+ /** Every version list: the prefix a new version invalidates. */
516
+ allDocumentVersions: () => readonly ["arbi", "documentVersions"];
517
+ documentVersions: (docId: string) => readonly ["arbi", "documentVersions", string];
515
518
  conversations: (workspaceId: string) => readonly ["arbi", "conversations", string];
516
519
  /** Every workspace's conversation list (and threads): the prefix a conversation write invalidates. */
517
520
  allConversations: () => readonly ["arbi", "conversations"];
@@ -630,6 +633,14 @@ declare function useDocuments(workspaceId: string | undefined, options?: {
630
633
  re_ocred?: boolean | null | undefined;
631
634
  config_ext_id?: string | null | undefined;
632
635
  parent_ext_id?: string | null | undefined;
636
+ lineage_id?: string | null | undefined;
637
+ version_number: number;
638
+ is_current: boolean;
639
+ thread_id?: string | null | undefined;
640
+ derived_from: {
641
+ doc_ext_id: string;
642
+ role: _arbidocs_client.components["schemas"]["DocRelationRole"];
643
+ }[];
633
644
  source_message_ext_id?: string | null | undefined;
634
645
  conversation_ext_id?: string | null | undefined;
635
646
  created_by_ext_id: string;
@@ -3197,16 +3208,6 @@ interface UsageTotals {
3197
3208
  */
3198
3209
  declare function isUsageMetered(usage: UsageTotals, subscription: string | null | undefined): boolean;
3199
3210
 
3200
- /**
3201
- * The AI engine — domain-agnostic hooks for building an AI-native app on ARBI.
3202
- *
3203
- * `useAiTask` runs a streaming, cited agentic query (tokens, agent steps and
3204
- * artifacts accumulate live, with follow-up threading). `useWorkspaceDocs`
3205
- * resolves a workspace's document ids to ground on, and `useSemanticSearch`
3206
- * returns retrieval-only cited passages. These wrap the low-level SDK hooks so a
3207
- * vertical app never re-implements the streaming/accumulation plumbing.
3208
- */
3209
-
3210
3211
  /**
3211
3212
  * Resolve a workspace's document set and their external ids. Pass the active
3212
3213
  * `workspaceId`; the kit stays agnostic about how selection is managed.
@@ -3232,6 +3233,14 @@ declare function useWorkspaceDocs(workspaceId?: string): {
3232
3233
  re_ocred?: boolean | null | undefined;
3233
3234
  config_ext_id?: string | null | undefined;
3234
3235
  parent_ext_id?: string | null | undefined;
3236
+ lineage_id?: string | null | undefined;
3237
+ version_number: number;
3238
+ is_current: boolean;
3239
+ thread_id?: string | null | undefined;
3240
+ derived_from: {
3241
+ doc_ext_id: string;
3242
+ role: _arbidocs_client.components["schemas"]["DocRelationRole"];
3243
+ }[];
3235
3244
  source_message_ext_id?: string | null | undefined;
3236
3245
  conversation_ext_id?: string | null | undefined;
3237
3246
  created_by_ext_id: string;
@@ -3302,7 +3311,7 @@ declare function useAiTask(): {
3302
3311
  file_type: string;
3303
3312
  is_complete: boolean;
3304
3313
  version: number;
3305
- parent_doc_ext_id?: string | null;
3314
+ version_of?: string | null;
3306
3315
  message_ext_id?: string | null;
3307
3316
  }[];
3308
3317
  run: (question: string, docIds: string[], opts?: AiRunOptions) => Promise<SSEStreamResult | null>;
package/dist/index.d.ts CHANGED
@@ -512,6 +512,9 @@ declare const arbiQueryKeys: {
512
512
  workspaces: () => readonly ["arbi", "workspaces"];
513
513
  workspaceUsers: (workspaceId: string) => readonly ["arbi", "workspaceUsers", string];
514
514
  documents: (workspaceId: string) => readonly ["arbi", "documents", string];
515
+ /** Every version list: the prefix a new version invalidates. */
516
+ allDocumentVersions: () => readonly ["arbi", "documentVersions"];
517
+ documentVersions: (docId: string) => readonly ["arbi", "documentVersions", string];
515
518
  conversations: (workspaceId: string) => readonly ["arbi", "conversations", string];
516
519
  /** Every workspace's conversation list (and threads): the prefix a conversation write invalidates. */
517
520
  allConversations: () => readonly ["arbi", "conversations"];
@@ -630,6 +633,14 @@ declare function useDocuments(workspaceId: string | undefined, options?: {
630
633
  re_ocred?: boolean | null | undefined;
631
634
  config_ext_id?: string | null | undefined;
632
635
  parent_ext_id?: string | null | undefined;
636
+ lineage_id?: string | null | undefined;
637
+ version_number: number;
638
+ is_current: boolean;
639
+ thread_id?: string | null | undefined;
640
+ derived_from: {
641
+ doc_ext_id: string;
642
+ role: _arbidocs_client.components["schemas"]["DocRelationRole"];
643
+ }[];
633
644
  source_message_ext_id?: string | null | undefined;
634
645
  conversation_ext_id?: string | null | undefined;
635
646
  created_by_ext_id: string;
@@ -3197,16 +3208,6 @@ interface UsageTotals {
3197
3208
  */
3198
3209
  declare function isUsageMetered(usage: UsageTotals, subscription: string | null | undefined): boolean;
3199
3210
 
3200
- /**
3201
- * The AI engine — domain-agnostic hooks for building an AI-native app on ARBI.
3202
- *
3203
- * `useAiTask` runs a streaming, cited agentic query (tokens, agent steps and
3204
- * artifacts accumulate live, with follow-up threading). `useWorkspaceDocs`
3205
- * resolves a workspace's document ids to ground on, and `useSemanticSearch`
3206
- * returns retrieval-only cited passages. These wrap the low-level SDK hooks so a
3207
- * vertical app never re-implements the streaming/accumulation plumbing.
3208
- */
3209
-
3210
3211
  /**
3211
3212
  * Resolve a workspace's document set and their external ids. Pass the active
3212
3213
  * `workspaceId`; the kit stays agnostic about how selection is managed.
@@ -3232,6 +3233,14 @@ declare function useWorkspaceDocs(workspaceId?: string): {
3232
3233
  re_ocred?: boolean | null | undefined;
3233
3234
  config_ext_id?: string | null | undefined;
3234
3235
  parent_ext_id?: string | null | undefined;
3236
+ lineage_id?: string | null | undefined;
3237
+ version_number: number;
3238
+ is_current: boolean;
3239
+ thread_id?: string | null | undefined;
3240
+ derived_from: {
3241
+ doc_ext_id: string;
3242
+ role: _arbidocs_client.components["schemas"]["DocRelationRole"];
3243
+ }[];
3235
3244
  source_message_ext_id?: string | null | undefined;
3236
3245
  conversation_ext_id?: string | null | undefined;
3237
3246
  created_by_ext_id: string;
@@ -3302,7 +3311,7 @@ declare function useAiTask(): {
3302
3311
  file_type: string;
3303
3312
  is_complete: boolean;
3304
3313
  version: number;
3305
- parent_doc_ext_id?: string | null;
3314
+ version_of?: string | null;
3306
3315
  message_ext_id?: string | null;
3307
3316
  }[];
3308
3317
  run: (question: string, docIds: string[], opts?: AiRunOptions) => Promise<SSEStreamResult | null>;
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
- import { arbiQueryKeys, useDocuments, useConversations, useAssistantQuery, useConversationThreads, useWorkspaces, useParsedDocument, useTags, useActivity, useThumbnails } from './chunk-GT6KN3DV.js';
2
- export { DEFAULT_USD_PER_CREDIT, arbiQueryKeys, cleanDraftMarkdown, cleanDraftWithReport, creditsToUsd, formatCredits, isUsageMetered, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks, useActivity, useAgents, useAssistantQuery, useConfigs, useConversationThreads, useConversations, useDeleteAgents, useDocuments, useFacts, useHealth, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSessions, useTags, useThumbnails, useUserUsageToday, useWorkspaceUsers, useWorkspaces } from './chunk-GT6KN3DV.js';
1
+ import { arbiQueryKeys, useDocuments, useConversations, useAssistantQuery, useConversationThreads, useWorkspaces, useParsedDocument, useTags, useActivity, useThumbnails } from './chunk-DSG3E7QX.js';
2
+ export { DEFAULT_USD_PER_CREDIT, arbiQueryKeys, cleanDraftMarkdown, cleanDraftWithReport, creditsToUsd, formatCredits, isUsageMetered, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks, useActivity, useAgents, useAssistantQuery, useConfigs, useConversationThreads, useConversations, useDeleteAgents, useDocuments, useFacts, useHealth, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSessions, useTags, useThumbnails, useUserUsageToday, useWorkspaceUsers, useWorkspaces } from './chunk-DSG3E7QX.js';
3
3
  import { formatRelativeTime } from './chunk-UDOPD3GK.js';
4
4
  export { DEFAULT_NOTIFY_TONE, NotificationBell, Toaster, formatRelativeTime, notify, seedNotifications, selectUnread, toast, useNotify } from './chunk-UDOPD3GK.js';
5
- import { AudioViewer, ImageViewer, VideoViewer } from './chunk-HDCRPPBW.js';
6
- import { useArbi } from './chunk-J4MX2W4H.js';
7
- export { ArbiProvider, useArbi } from './chunk-J4MX2W4H.js';
8
- import { returnFocusToMark, MarkMenu, AiMarkdown, Card, Badge, TagEntity, Input, FILE_TYPE_COLORS, getEntityIcon, UserEntity, getEntityColorStyles, AgentBadge, Textarea, Label, Slider, DocumentEntity, DocumentCard, useAudioRecorder, MicWaveformIndicator, IconToggle, classifyMediaError, formatElapsed, PassageCard } from './chunk-E632M56M.js';
9
- export { AgentBadge, AiMarkdown, ArbiBotHeadIcon, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DictateProvider, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, ThreadVisibilityIcon, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, badgeVariants, cardVariants, configureEntityRegistry, configureRagLabels, configureStatusRegistry, formatElapsed, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, toggleVariants, useAudioRecorder } from './chunk-E632M56M.js';
5
+ import { returnFocusToMark, MarkMenu, AiMarkdown, Card, Badge, TagEntity, Input, FILE_TYPE_COLORS, getEntityIcon, UserEntity, getEntityColorStyles, AgentBadge, Textarea, Label, Slider, DocumentEntity, DocumentCard, useAudioRecorder, MicWaveformIndicator, IconToggle, classifyMediaError, formatElapsed, PassageCard } from './chunk-CVN7MAGQ.js';
6
+ export { AgentBadge, AiMarkdown, ArbiBotHeadIcon, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DictateProvider, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, ThreadVisibilityIcon, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, badgeVariants, cardVariants, configureEntityRegistry, configureRagLabels, configureStatusRegistry, formatElapsed, getDocIcon, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, toggleVariants, useAudioRecorder } from './chunk-CVN7MAGQ.js';
7
+ import { Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-QS3Q5542.js';
8
+ export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from './chunk-QS3Q5542.js';
10
9
  import { normalizeCitationMarkup, MarkdownRenderer } from './chunk-JPGV7NMY.js';
11
10
  export { MarkdownRenderer, MarkdownStreamingContext, closeOpenEmphasis, markdownBaseComponents, normalizeCitationMarkup, splitMarkdownBlocks, trimOpenCitation } from './chunk-JPGV7NMY.js';
12
11
  import { ScrollArea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator } from './chunk-N5SVBDLC.js';
13
12
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ScrollArea, ScrollBar } from './chunk-N5SVBDLC.js';
14
- import { Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-QS3Q5542.js';
15
- export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from './chunk-QS3Q5542.js';
16
13
  import { cn } from './chunk-SN5YV6FF.js';
17
14
  export { cn } from './chunk-SN5YV6FF.js';
15
+ import { AudioViewer, ImageViewer, VideoViewer } from './chunk-HDCRPPBW.js';
16
+ import { useArbi } from './chunk-J4MX2W4H.js';
17
+ export { ArbiProvider, useArbi } from './chunk-J4MX2W4H.js';
18
18
  import React, { memo, useState, createContext, useMemo, useCallback, useEffect, useRef, useLayoutEffect, useContext, useId, Fragment as Fragment$1 } from 'react';
19
19
  import { useQueryClient, useMutation, useQuery } from '@tanstack/react-query';
20
20
  import { resolveCitations, summarizeCitations, formatFileSize, connectWithReconnect, dm } from '@arbidocs/sdk/browser';