@arbidocs/react 0.3.147 → 0.3.148

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
@@ -1118,6 +1118,52 @@ interface SemanticSearchProps {
1118
1118
  }
1119
1119
  declare function SemanticSearch({ docIds, workspaceId, searchMode, placeholder, className, 'data-testid': testId, }: SemanticSearchProps): React$1.JSX.Element;
1120
1120
 
1121
+ /**
1122
+ * PassageCard — the card ("bubble") a single retrieved passage is rendered as.
1123
+ *
1124
+ * One presentation shared by every surface that lists retrieval hits: the
1125
+ * <SemanticSearch> block here and the ARBI-frontend monolith's SmartSearch
1126
+ * results. Those had drifted into two different looks for the same object; this
1127
+ * is the single one.
1128
+ *
1129
+ * The card owns the chrome only — the rounded border, the AI-accent hover /
1130
+ * focus / selected states, the header row and the relevance dot. What goes in
1131
+ * the header and how the snippet itself is rendered stays with the caller,
1132
+ * because those genuinely differ: the block shows a plain-text excerpt in a
1133
+ * narrow sidebar, the monolith renders markdown with a show-more toggle.
1134
+ *
1135
+ * Theming is semantic tokens only (shadcn + the AI-accent contract).
1136
+ */
1137
+
1138
+ /**
1139
+ * A dot conveying relevance — green (high) / amber (mid) / muted (low).
1140
+ *
1141
+ * The band is shown, the raw number is not: scores are not on a normalized 0-1
1142
+ * scale across search modes (BM25 keyword scores can exceed 1), so a printed
1143
+ * figure invites a comparison it cannot support. The value is kept in the
1144
+ * tooltip for anyone debugging a ranking.
1145
+ */
1146
+ declare function RelevanceDot({ score }: {
1147
+ score?: number | null;
1148
+ }): React__default.JSX.Element | null;
1149
+ interface PassageCardProps {
1150
+ /** Left of the header row — the source affordance (document pill, page label). */
1151
+ header: React__default.ReactNode;
1152
+ /** Relevance score for the dot. Omit to hide it. */
1153
+ score?: number | null;
1154
+ /** Extra affordance pinned right of the dot (e.g. a hover-revealed open icon). */
1155
+ headerRight?: React__default.ReactNode;
1156
+ /** Marks the card as the currently open passage. */
1157
+ active?: boolean;
1158
+ onClick?: (e: React__default.MouseEvent) => void;
1159
+ /** Rendered under the snippet, outside the click target's typography. */
1160
+ footer?: React__default.ReactNode;
1161
+ className?: string;
1162
+ children: React__default.ReactNode;
1163
+ 'data-testid'?: string;
1164
+ }
1165
+ declare function PassageCard({ header, score, headerRight, active, onClick, footer, className, children, 'data-testid': testId, }: PassageCardProps): React__default.JSX.Element;
1166
+
1121
1167
  /**
1122
1168
  * Ask questions grounded in a SINGLE document (docId scoped to one file), plus a
1123
1169
  * one-click "suggest tags" action. Drop it in a document viewer.
@@ -2721,4 +2767,4 @@ interface ArbiUiState {
2721
2767
  }
2722
2768
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
2723
2769
 
2724
- export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, 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, 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, PdfIcon, type PresenceDisplayStatus, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, type Rag, RagDot, 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, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, describeActivity, formatRelativeTime, 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 };
2770
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, 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, 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, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, 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, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, describeActivity, formatRelativeTime, 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 };
package/dist/index.d.ts CHANGED
@@ -1118,6 +1118,52 @@ interface SemanticSearchProps {
1118
1118
  }
1119
1119
  declare function SemanticSearch({ docIds, workspaceId, searchMode, placeholder, className, 'data-testid': testId, }: SemanticSearchProps): React$1.JSX.Element;
1120
1120
 
1121
+ /**
1122
+ * PassageCard — the card ("bubble") a single retrieved passage is rendered as.
1123
+ *
1124
+ * One presentation shared by every surface that lists retrieval hits: the
1125
+ * <SemanticSearch> block here and the ARBI-frontend monolith's SmartSearch
1126
+ * results. Those had drifted into two different looks for the same object; this
1127
+ * is the single one.
1128
+ *
1129
+ * The card owns the chrome only — the rounded border, the AI-accent hover /
1130
+ * focus / selected states, the header row and the relevance dot. What goes in
1131
+ * the header and how the snippet itself is rendered stays with the caller,
1132
+ * because those genuinely differ: the block shows a plain-text excerpt in a
1133
+ * narrow sidebar, the monolith renders markdown with a show-more toggle.
1134
+ *
1135
+ * Theming is semantic tokens only (shadcn + the AI-accent contract).
1136
+ */
1137
+
1138
+ /**
1139
+ * A dot conveying relevance — green (high) / amber (mid) / muted (low).
1140
+ *
1141
+ * The band is shown, the raw number is not: scores are not on a normalized 0-1
1142
+ * scale across search modes (BM25 keyword scores can exceed 1), so a printed
1143
+ * figure invites a comparison it cannot support. The value is kept in the
1144
+ * tooltip for anyone debugging a ranking.
1145
+ */
1146
+ declare function RelevanceDot({ score }: {
1147
+ score?: number | null;
1148
+ }): React__default.JSX.Element | null;
1149
+ interface PassageCardProps {
1150
+ /** Left of the header row — the source affordance (document pill, page label). */
1151
+ header: React__default.ReactNode;
1152
+ /** Relevance score for the dot. Omit to hide it. */
1153
+ score?: number | null;
1154
+ /** Extra affordance pinned right of the dot (e.g. a hover-revealed open icon). */
1155
+ headerRight?: React__default.ReactNode;
1156
+ /** Marks the card as the currently open passage. */
1157
+ active?: boolean;
1158
+ onClick?: (e: React__default.MouseEvent) => void;
1159
+ /** Rendered under the snippet, outside the click target's typography. */
1160
+ footer?: React__default.ReactNode;
1161
+ className?: string;
1162
+ children: React__default.ReactNode;
1163
+ 'data-testid'?: string;
1164
+ }
1165
+ declare function PassageCard({ header, score, headerRight, active, onClick, footer, className, children, 'data-testid': testId, }: PassageCardProps): React__default.JSX.Element;
1166
+
1121
1167
  /**
1122
1168
  * Ask questions grounded in a SINGLE document (docId scoped to one file), plus a
1123
1169
  * one-click "suggest tags" action. Drop it in a document viewer.
@@ -2721,4 +2767,4 @@ interface ArbiUiState {
2721
2767
  }
2722
2768
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
2723
2769
 
2724
- export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, 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, 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, PdfIcon, type PresenceDisplayStatus, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, type Rag, RagDot, 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, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, describeActivity, formatRelativeTime, 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 };
2770
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, 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, 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, ProjectEntity, type ProjectEntityProps, type ProjectRelation, type ProjectsUsageAggregate, ProviderIcon, 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, Toaster, type ToolResponses, TxtIcon, TypingIndicator, type UseDirectMessagesResult, UserEntity, type UserEntityProps, UserMenu, type UserMenuItem, type UserMenuProps, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, describeActivity, formatRelativeTime, 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 };
package/dist/index.js CHANGED
@@ -2698,6 +2698,79 @@ function DocumentReview({
2698
2698
  }
2699
2699
  );
2700
2700
  }
2701
+ var TIERS = [
2702
+ { min: 0.7, tone: "bg-emerald-500", label: "High relevance" },
2703
+ { min: 0.4, tone: "bg-amber-500", label: "Medium relevance" },
2704
+ { min: -Infinity, tone: "bg-muted-foreground/40", label: "Low relevance" }
2705
+ ];
2706
+ function RelevanceDot({ score }) {
2707
+ if (score == null) return null;
2708
+ const tier = TIERS.find((t) => score >= t.min) ?? TIERS[TIERS.length - 1];
2709
+ return /* @__PURE__ */ jsx(
2710
+ "span",
2711
+ {
2712
+ role: "img",
2713
+ "aria-label": tier.label,
2714
+ title: `${tier.label} (${score.toFixed(2)})`,
2715
+ className: cn("size-1.5 shrink-0 rounded-full", tier.tone),
2716
+ "data-testid": "passage-relevance"
2717
+ }
2718
+ );
2719
+ }
2720
+ function PassageCard({
2721
+ header,
2722
+ score,
2723
+ headerRight,
2724
+ active,
2725
+ onClick,
2726
+ footer,
2727
+ className,
2728
+ children,
2729
+ "data-testid": testId
2730
+ }) {
2731
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [
2732
+ /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2", children: [
2733
+ header,
2734
+ (score != null || headerRight) && /* @__PURE__ */ jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
2735
+ /* @__PURE__ */ jsx(RelevanceDot, { score }),
2736
+ headerRight
2737
+ ] })
2738
+ ] }),
2739
+ /* @__PURE__ */ jsx("div", { className: "[&_mark]:rounded-sm [&_mark]:bg-ai-accent/20 [&_mark]:px-0.5 [&_mark]:font-medium [&_mark]:text-foreground", children })
2740
+ ] });
2741
+ return /* @__PURE__ */ jsxs(
2742
+ "div",
2743
+ {
2744
+ className: cn(
2745
+ "group rounded-lg border border-border bg-card p-3 text-left transition-colors",
2746
+ onClick && "hover:border-ai-accent/40 focus-within:ring-2 focus-within:ring-ai-accent/40",
2747
+ active && "border-ai-accent/60 ring-1 ring-ai-accent/30",
2748
+ className
2749
+ ),
2750
+ children: [
2751
+ onClick ? /* @__PURE__ */ jsx(
2752
+ "div",
2753
+ {
2754
+ role: "button",
2755
+ tabIndex: 0,
2756
+ onClick,
2757
+ onKeyDown: (e) => {
2758
+ if (e.key === "Enter" || e.key === " ") {
2759
+ e.preventDefault();
2760
+ onClick(e);
2761
+ }
2762
+ },
2763
+ "aria-current": active || void 0,
2764
+ "data-testid": testId,
2765
+ className: "cursor-pointer focus:outline-none",
2766
+ children: body
2767
+ }
2768
+ ) : /* @__PURE__ */ jsx("div", { "aria-current": active || void 0, "data-testid": testId, children: body }),
2769
+ footer
2770
+ ]
2771
+ }
2772
+ );
2773
+ }
2701
2774
  function queryTerms(query) {
2702
2775
  const terms = /* @__PURE__ */ new Set();
2703
2776
  for (const phrase of query.match(/"([^"]+)"/g) ?? []) {
@@ -2714,20 +2787,10 @@ function HighlightedSnippet({ text, terms }) {
2714
2787
  if (terms.length === 0) return [text];
2715
2788
  const escaped = terms.map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
2716
2789
  const re = new RegExp(`(${escaped.join("|")})`, "gi");
2717
- return text.split(re).map(
2718
- (part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx("mark", { className: "rounded-sm bg-ai-accent/20 px-0.5 text-foreground", children: part }, i) : part
2719
- );
2790
+ return text.split(re).map((part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx("mark", { children: part }, i) : part);
2720
2791
  }, [text, terms]);
2721
2792
  return /* @__PURE__ */ jsx(Fragment, { children: nodes });
2722
2793
  }
2723
- function RelevanceDot({ score }) {
2724
- if (score == null) return null;
2725
- const tone = score >= 0.7 ? "bg-emerald-500" : score >= 0.4 ? "bg-amber-500" : "bg-muted-foreground/40";
2726
- return /* @__PURE__ */ jsxs("span", { className: "ml-auto inline-flex items-center gap-1.5 text-[10px] text-muted-foreground", children: [
2727
- /* @__PURE__ */ jsx("span", { className: cn("size-1.5 rounded-full", tone), "aria-hidden": true }),
2728
- score.toFixed(2)
2729
- ] });
2730
- }
2731
2794
  function ResultRow({
2732
2795
  result,
2733
2796
  index,
@@ -2735,34 +2798,26 @@ function ResultRow({
2735
2798
  isActive,
2736
2799
  onSelect
2737
2800
  }) {
2738
- return /* @__PURE__ */ jsxs(
2739
- "button",
2801
+ return /* @__PURE__ */ jsx(
2802
+ PassageCard,
2740
2803
  {
2741
- type: "button",
2742
2804
  onClick: onSelect,
2805
+ active: isActive,
2806
+ score: result.score,
2743
2807
  "data-testid": `arbi-semantic-search-result-${index}`,
2744
- "aria-current": isActive,
2745
- className: cn(
2746
- "w-full rounded-lg border border-border bg-card p-3 text-left transition-colors",
2747
- "hover:border-ai-accent/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ai-accent/40",
2748
- isActive && "border-ai-accent/60 ring-1 ring-ai-accent/30"
2749
- ),
2750
- children: [
2751
- /* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center gap-2", children: [
2752
- /* @__PURE__ */ jsx(FileText, { className: "size-3.5 shrink-0 text-ai-accent" }),
2753
- /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium text-foreground", children: result.docTitle ?? "Document" }),
2754
- result.page != null && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", children: [
2755
- "p.",
2756
- result.page
2757
- ] }),
2758
- /* @__PURE__ */ jsx(RelevanceDot, { score: result.score })
2759
- ] }),
2760
- /* @__PURE__ */ jsxs("p", { className: "line-clamp-3 text-xs leading-relaxed text-muted-foreground", children: [
2761
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/60", children: "\u2026 " }),
2762
- /* @__PURE__ */ jsx(HighlightedSnippet, { text: result.content, terms }),
2763
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/60", children: " \u2026" })
2808
+ header: /* @__PURE__ */ jsxs(Fragment, { children: [
2809
+ /* @__PURE__ */ jsx(FileText, { className: "size-3.5 shrink-0 text-ai-accent" }),
2810
+ /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium text-foreground", children: result.docTitle ?? "Document" }),
2811
+ result.page != null && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", children: [
2812
+ "p.",
2813
+ result.page
2764
2814
  ] })
2765
- ]
2815
+ ] }),
2816
+ children: /* @__PURE__ */ jsxs("p", { className: "line-clamp-3 text-xs leading-relaxed text-muted-foreground", children: [
2817
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/60", children: "\u2026 " }),
2818
+ /* @__PURE__ */ jsx(HighlightedSnippet, { text: result.content, terms }),
2819
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/60", children: " \u2026" })
2820
+ ] })
2766
2821
  }
2767
2822
  );
2768
2823
  }
@@ -6735,6 +6790,6 @@ function DocumentGallery({
6735
6790
  );
6736
6791
  }
6737
6792
 
6738
- export { ActivityFeed, 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, 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, NEUTRAL_GRAY2 as NEUTRAL_GRAY, NotificationBell, OpenAIIcon, PLACEHOLDER_COLOR, PdfIcon, ProjectEntity, ProviderIcon, RagDot, SemanticSearch, StatusPill, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, Toaster, TxtIcon, TypingIndicator, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, describeActivity, formatRelativeTime, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, 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 };
6793
+ export { ActivityFeed, 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, 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, NEUTRAL_GRAY2 as NEUTRAL_GRAY, NotificationBell, OpenAIIcon, PLACEHOLDER_COLOR, PassageCard, PdfIcon, ProjectEntity, ProviderIcon, RagDot, RelevanceDot, SemanticSearch, StatusPill, TAG_TYPE_ICONS, TAG_TYPE_LABELS, TagEntity, Toaster, TxtIcon, TypingIndicator, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, XlsIcon, arbiQueryKeys, configureEntityRegistry, configureRagLabels, configureStatusRegistry, cropImage, describeActivity, formatRelativeTime, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getNotificationTypeMeta, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceActionText, getWorkspaceColor, getWorkspaceSentPhrase, 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 };
6739
6794
  //# sourceMappingURL=index.js.map
6740
6795
  //# sourceMappingURL=index.js.map