@handled-ai/design-system 0.16.2 → 0.17.1

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.ts CHANGED
@@ -13,6 +13,7 @@ export { CollapsibleSection, CollapsibleSectionProps } from './components/collap
13
13
  export { ComplianceBadge, ComplianceBadgeProps, ComplianceStatus } from './components/compliance-badge.js';
14
14
  export { ContactChip, ContactChipProps } from './components/contact-chip.js';
15
15
  export { ContactChannel, ContactItem, ContactList, ContactListProps } from './components/contact-list.js';
16
+ export { ContextualQuickActionContextLabel, ContextualQuickActionContextLabelProps, ContextualQuickActionItem, ContextualQuickActionLauncher, ContextualQuickActionLauncherProps } from './components/contextual-quick-action-launcher.js';
16
17
  export { CheckInsCard, RecentlyCompletedCard, TopTasksCard, UpcomingMeetingsCard } from './components/dashboard-cards.js';
17
18
  export { DataRow, DataTable, DataTableProps } from './components/data-table.js';
18
19
  export { ConditionFieldDef, ConditionFilterValue, ConditionOperator, DEFAULT_OPERATORS, DataTableConditionFilter, DataTableConditionFilterProps, OPERATOR_LABELS, generateConditionId, getOperators } from './components/data-table-condition-filter.js';
@@ -51,6 +52,7 @@ export { RichTextAction, RichTextToolbar, RichTextToolbarProps } from './compone
51
52
  export { ScoreAnalysisModal, ScoreAnalysisModalProps, ScoreAnalysisPanel } from './components/score-analysis-modal.js';
52
53
  export { ScoreBreakdown, ScoreBreakdownProps, ScoreFactor } from './components/score-breakdown.js';
53
54
  export { ScoreFeedback, useScoreFeedback } from './components/score-feedback.js';
55
+ export { ScoreWhyChips, ScoreWhyChipsProps, SignalPriorityChip, SignalPriorityChipProps, SignalPriorityPanel, SignalPriorityPanelProps, getSignalScoreUrgencyLabel } from './components/score-why-chips.js';
54
56
  export { ScoreRing, ScoreRingProps, getScoreColor } from './components/score-ring.js';
55
57
  export { ScrollArea, ScrollBar } from './components/scroll-area.js';
56
58
  export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './components/select.js';
@@ -86,7 +88,7 @@ export { VolumeAnalysisChart, VolumeAnalysisChartProps, VolumeDataKey } from './
86
88
  export { MetricCardData, TopLineMetrics, TopLineMetricsProps } from './charts/top-line-metrics.js';
87
89
  export { PipelineFilterBreakdown, PipelineOverview, PipelineOverviewProps, PipelineStage, PipelineStageMetrics, PipelineStageTiming } from './charts/pipeline-overview.js';
88
90
  export { SankeyChart, SankeyData, SankeyDropOff, SankeyHoverCardData, SankeyLink, SankeyNode, SankeyStageMetrics } from './charts/sankey-chart.js';
89
- export { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, WorkQueueViewConfig } from './prototype/prototype-config.js';
91
+ export { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, SignalScoreExplanationBucket, SignalScoreExplanationSignal, SignalScoreUrgencyLabel, WorkQueueViewConfig } from './prototype/prototype-config.js';
90
92
  export { PrototypeShell, PrototypeShellProps } from './prototype/prototype-shell.js';
91
93
  export { DetailView, DetailViewProps, PrototypeInboxView, PrototypeInboxViewProps } from './prototype/prototype-inbox-view.js';
92
94
  export { PrototypeInsightsView, PrototypeInsightsViewProps } from './prototype/prototype-insights-view.js';
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ import { CollapsibleSection } from "./components/collapsible-section.js";
13
13
  export * from "./components/compliance-badge.js";
14
14
  export * from "./components/contact-chip.js";
15
15
  export * from "./components/contact-list.js";
16
+ export * from "./components/contextual-quick-action-launcher.js";
16
17
  export * from "./components/dashboard-cards.js";
17
18
  export * from "./components/data-table.js";
18
19
  export * from "./components/data-table-condition-filter.js";
@@ -53,6 +54,7 @@ export * from "./components/rich-text-toolbar.js";
53
54
  export * from "./components/score-analysis-modal.js";
54
55
  export * from "./components/score-breakdown.js";
55
56
  export * from "./components/score-feedback.js";
57
+ export * from "./components/score-why-chips.js";
56
58
  export * from "./components/score-ring.js";
57
59
  export * from "./components/scroll-area.js";
58
60
  export * from "./components/select.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @handled-ai/design-system\n * UI components and utilities (shadcn-style, New York)\n */\n\n// Utilities\nexport { cn } from \"./lib/utils\"\nexport { BRAND_ICONS, BRAND_GRAPHICS } from \"./lib/icons\"\n\n// Hooks\nexport { useIsMobile } from \"./hooks/use-mobile\"\n\n// Components (light — no recharts/nivo/three transitive deps)\nexport * from \"./components/activity-detail\"\nexport * from \"./components/activity-log\"\nexport * from \"./components/agent-popover\"\nexport * from \"./components/agent-widget\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/button\"\nexport * from \"./components/card\"\nexport { CollapsibleSection, type CollapsibleSectionProps } from \"./components/collapsible-section\"\nexport * from \"./components/compliance-badge\"\nexport * from \"./components/contact-chip\"\nexport * from \"./components/contact-list\"\nexport * from \"./components/dashboard-cards\"\nexport * from \"./components/data-table\"\nexport * from \"./components/data-table-condition-filter\"\nexport * from \"./components/data-table-display\"\nexport * from \"./components/data-table-filter\"\nexport * from \"./components/data-table-quick-views\"\nexport * from \"./components/data-table-toolbar\"\nexport * from \"./components/detail-view\"\nexport * from \"./components/dialog\"\nexport * from \"./components/dropdown-menu\"\nexport * from \"./components/empty-state\"\nexport * from \"./components/entity-panel\"\nexport * from \"./components/filter-chip\"\nexport * from \"./components/inbox-row\"\nexport * from \"./components/inbox-toolbar\"\nexport * from \"./components/inline-banner\"\nexport * from \"./components/input\"\nexport * from \"./components/insights-filter-bar\"\nexport * from \"./components/item-list\"\nexport * from \"./components/item-list-display\"\nexport * from \"./components/item-list-filter\"\nexport * from \"./components/item-list-toolbar\"\nexport * from \"./components/kbd-hint\"\nexport * from \"./components/label\"\nexport * from \"./components/message\"\nexport * from \"./components/metric-card\"\nexport * from \"./components/performance-metrics-table\"\nexport * from \"./components/preview-list\"\nexport * from \"./components/progress\"\nexport * from \"./components/quick-action-chat-area\"\nexport {\n QuickActionModal,\n type QuickActionPriority,\n type QuickActionTaskDraft,\n type QuickActionTemplate,\n} from \"./components/quick-action-modal\"\nexport * from \"./components/quick-action-sidebar-nav\"\nexport * from \"./components/recommended-actions-section\"\nexport * from \"./components/report-card\"\nexport * from \"./components/rich-text-toolbar\"\nexport * from \"./components/score-analysis-modal\"\nexport * from \"./components/score-breakdown\"\nexport * from \"./components/score-feedback\"\nexport * from \"./components/score-ring\"\nexport * from \"./components/scroll-area\"\nexport * from \"./components/select\"\nexport * from \"./components/separator\"\nexport * from \"./components/sheet\"\nexport * from \"./components/sidebar\"\nexport * from \"./components/signal-feedback-inline\"\nexport * from \"./components/simple-data-table\"\nexport * from \"./components/skeleton\"\nexport * from \"./components/status-badge\"\nexport * from \"./components/step-timeline\"\nexport * from \"./components/sticky-action-bar\"\nexport * from \"./components/styled-bar-list\"\nexport { DraftFeedbackInline } from \"./components/draft-feedback-inline\"\nexport type { DraftFeedbackInlineProps } from \"./components/draft-feedback-inline\"\nexport { AccountContactsPopover, BrandIcon } from \"./components/account-contacts-popover\"\nexport type { AccountContactsPopoverProps } from \"./components/account-contacts-popover\"\nexport * from \"./components/suggested-actions\"\nexport * from \"./components/switch\"\nexport * from \"./components/table\"\nexport * from \"./components/tabs\"\nexport * from \"./components/textarea\"\nexport * from \"./components/timeline-activity\"\nexport * from \"./components/tooltip\"\nexport * from \"./components/variable-autocomplete\"\nexport * from \"./components/view-mode-toggle\"\nexport * from \"./components/virtualized-data-table\"\nexport type { ColumnSizingState } from \"@tanstack/react-table\"\n\n// Charts (re-exported for backward compatibility with root imports)\nexport * from \"./charts/index\"\n\n// Prototype template system (re-exported for backward compatibility)\nexport * from \"./prototype/prototype-config\"\nexport * from \"./prototype/prototype-shell\"\nexport * from \"./prototype/prototype-inbox-view\"\nexport * from \"./prototype/prototype-insights-view\"\nexport * from \"./prototype/prototype-accounts-view\"\nexport * from \"./prototype/prototype-admin-view\"\nexport * from \"./prototype/prototype-work-queue-view\"\n"],"mappings":"AAMA,SAAS,UAAU;AACnB,SAAS,aAAa,sBAAsB;AAG5C,SAAS,mBAAmB;AAG5B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,0BAAwD;AACjE,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,OAIK;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,2BAA2B;AAEpC,SAAS,wBAAwB,iBAAiB;AAElD,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAId,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @handled-ai/design-system\n * UI components and utilities (shadcn-style, New York)\n */\n\n// Utilities\nexport { cn } from \"./lib/utils\"\nexport { BRAND_ICONS, BRAND_GRAPHICS } from \"./lib/icons\"\n\n// Hooks\nexport { useIsMobile } from \"./hooks/use-mobile\"\n\n// Components (light — no recharts/nivo/three transitive deps)\nexport * from \"./components/activity-detail\"\nexport * from \"./components/activity-log\"\nexport * from \"./components/agent-popover\"\nexport * from \"./components/agent-widget\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/button\"\nexport * from \"./components/card\"\nexport { CollapsibleSection, type CollapsibleSectionProps } from \"./components/collapsible-section\"\nexport * from \"./components/compliance-badge\"\nexport * from \"./components/contact-chip\"\nexport * from \"./components/contact-list\"\nexport * from \"./components/contextual-quick-action-launcher\"\nexport * from \"./components/dashboard-cards\"\nexport * from \"./components/data-table\"\nexport * from \"./components/data-table-condition-filter\"\nexport * from \"./components/data-table-display\"\nexport * from \"./components/data-table-filter\"\nexport * from \"./components/data-table-quick-views\"\nexport * from \"./components/data-table-toolbar\"\nexport * from \"./components/detail-view\"\nexport * from \"./components/dialog\"\nexport * from \"./components/dropdown-menu\"\nexport * from \"./components/empty-state\"\nexport * from \"./components/entity-panel\"\nexport * from \"./components/filter-chip\"\nexport * from \"./components/inbox-row\"\nexport * from \"./components/inbox-toolbar\"\nexport * from \"./components/inline-banner\"\nexport * from \"./components/input\"\nexport * from \"./components/insights-filter-bar\"\nexport * from \"./components/item-list\"\nexport * from \"./components/item-list-display\"\nexport * from \"./components/item-list-filter\"\nexport * from \"./components/item-list-toolbar\"\nexport * from \"./components/kbd-hint\"\nexport * from \"./components/label\"\nexport * from \"./components/message\"\nexport * from \"./components/metric-card\"\nexport * from \"./components/performance-metrics-table\"\nexport * from \"./components/preview-list\"\nexport * from \"./components/progress\"\nexport * from \"./components/quick-action-chat-area\"\nexport {\n QuickActionModal,\n type QuickActionPriority,\n type QuickActionTaskDraft,\n type QuickActionTemplate,\n} from \"./components/quick-action-modal\"\nexport * from \"./components/quick-action-sidebar-nav\"\nexport * from \"./components/recommended-actions-section\"\nexport * from \"./components/report-card\"\nexport * from \"./components/rich-text-toolbar\"\nexport * from \"./components/score-analysis-modal\"\nexport * from \"./components/score-breakdown\"\nexport * from \"./components/score-feedback\"\nexport * from \"./components/score-why-chips\"\nexport * from \"./components/score-ring\"\nexport * from \"./components/scroll-area\"\nexport * from \"./components/select\"\nexport * from \"./components/separator\"\nexport * from \"./components/sheet\"\nexport * from \"./components/sidebar\"\nexport * from \"./components/signal-feedback-inline\"\nexport * from \"./components/simple-data-table\"\nexport * from \"./components/skeleton\"\nexport * from \"./components/status-badge\"\nexport * from \"./components/step-timeline\"\nexport * from \"./components/sticky-action-bar\"\nexport * from \"./components/styled-bar-list\"\nexport { DraftFeedbackInline } from \"./components/draft-feedback-inline\"\nexport type { DraftFeedbackInlineProps } from \"./components/draft-feedback-inline\"\nexport { AccountContactsPopover, BrandIcon } from \"./components/account-contacts-popover\"\nexport type { AccountContactsPopoverProps } from \"./components/account-contacts-popover\"\nexport * from \"./components/suggested-actions\"\nexport * from \"./components/switch\"\nexport * from \"./components/table\"\nexport * from \"./components/tabs\"\nexport * from \"./components/textarea\"\nexport * from \"./components/timeline-activity\"\nexport * from \"./components/tooltip\"\nexport * from \"./components/variable-autocomplete\"\nexport * from \"./components/view-mode-toggle\"\nexport * from \"./components/virtualized-data-table\"\nexport type { ColumnSizingState } from \"@tanstack/react-table\"\n\n// Charts (re-exported for backward compatibility with root imports)\nexport * from \"./charts/index\"\n\n// Prototype template system (re-exported for backward compatibility)\nexport * from \"./prototype/prototype-config\"\nexport * from \"./prototype/prototype-shell\"\nexport * from \"./prototype/prototype-inbox-view\"\nexport * from \"./prototype/prototype-insights-view\"\nexport * from \"./prototype/prototype-accounts-view\"\nexport * from \"./prototype/prototype-admin-view\"\nexport * from \"./prototype/prototype-work-queue-view\"\n"],"mappings":"AAMA,SAAS,UAAU;AACnB,SAAS,aAAa,sBAAsB;AAG5C,SAAS,mBAAmB;AAG5B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,0BAAwD;AACjE,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,OAIK;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,2BAA2B;AAEpC,SAAS,wBAAwB,iBAAiB;AAElD,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAId,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -1,4 +1,4 @@
1
- export { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, WorkQueueViewConfig } from './prototype-config.js';
1
+ export { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, SignalScoreExplanationBucket, SignalScoreExplanationSignal, SignalScoreUrgencyLabel, WorkQueueViewConfig } from './prototype-config.js';
2
2
  export { PrototypeShell, PrototypeShellProps } from './prototype-shell.js';
3
3
  export { DetailView, DetailViewProps, PrototypeInboxView, PrototypeInboxViewProps } from './prototype-inbox-view.js';
4
4
  export { PrototypeInsightsView, PrototypeInsightsViewProps } from './prototype-insights-view.js';
@@ -28,16 +28,46 @@ interface QueueItem {
28
28
  company: string;
29
29
  tag1: string;
30
30
  }
31
+ type SignalScoreUrgencyLabel = "Low" | "Medium" | "High" | "Urgent";
32
+ interface SignalScoreExplanationSignal {
33
+ id?: string;
34
+ label: string;
35
+ description?: string;
36
+ source?: string;
37
+ time?: string;
38
+ metric?: string;
39
+ }
40
+ interface SignalScoreExplanationBucket {
41
+ key: string;
42
+ label: string;
43
+ kind: "signal" | "factor" | "merged";
44
+ score?: number;
45
+ classification?: string;
46
+ rationale?: string;
47
+ evidence?: string[];
48
+ signals?: SignalScoreExplanationSignal[];
49
+ primaryMetricLabel?: string;
50
+ primaryMetricValue?: string;
51
+ signalCount?: number;
52
+ signalIds?: string[];
53
+ primarySignalId?: string;
54
+ factorKeys?: string[];
55
+ }
31
56
  interface SignalScoreData {
32
57
  score: number;
33
58
  factors: ScoreFactor[];
34
59
  whyNow: string;
35
60
  evidence: string[];
36
61
  confidence: number;
62
+ urgencyLabel?: SignalScoreUrgencyLabel;
63
+ urgencyExplanation?: string;
64
+ explanationBuckets?: SignalScoreExplanationBucket[];
37
65
  onFactorFeedback?: (factorKey: string, type: "up" | "down" | null, detail?: string) => void;
66
+ /** @deprecated The compact score UX no longer renders score-level thumbs by default. */
38
67
  onScoreFeedback?: (type: "up" | "down", pills: string[], detail: string) => void;
39
68
  onApproveFeedback?: (reasons: string[], detail: string) => void;
40
69
  onDismissFeedback?: (reasons: string[], detail: string, subReason?: string) => void;
70
+ /** @deprecated The compact score UX no longer renders score-level thumbs by default. */
41
71
  initialScoreFeedback?: {
42
72
  type: "up" | "down";
43
73
  pills: string[];
@@ -80,7 +110,13 @@ interface InboxViewConfig {
80
110
  hideToolbarActions?: boolean;
81
111
  hideHoverActions?: boolean;
82
112
  onSuggestedActionFeedback?: (actionId: number | string, feedback: string, actionTitle?: string) => void;
113
+ /** @deprecated The compact score UX no longer renders score-level thumbs by default. */
83
114
  onScoreFeedback?: (type: "up" | "down", pills: string[], detail: string) => void;
115
+ onOpenSignalBucket?: (args: {
116
+ item: QueueItem;
117
+ bucketKey: string;
118
+ signalId: string;
119
+ }) => void;
84
120
  buildEntityChips?: (item: QueueItem) => Array<{
85
121
  id: string;
86
122
  label: string;
@@ -132,6 +168,10 @@ interface InboxViewConfig {
132
168
  briefStyleVariant?: BriefStyleVariant;
133
169
  /** Render extra content at the end of the detail view, below the suggested actions section. */
134
170
  renderDetailExtra?: (item: QueueItem) => React.ReactNode;
171
+ /** Render extra content inline with the detail title. */
172
+ renderTitleExtra?: (item: QueueItem) => React.ReactNode;
173
+ /** Render supporting content below the detail title. */
174
+ renderTitleSubtext?: (item: QueueItem) => React.ReactNode;
135
175
  /** Render content between the signal brief text and the signal score bar (e.g. "Signals on Case" chips). */
136
176
  renderBeforeScore?: (item: QueueItem) => React.ReactNode;
137
177
  /** Render content between the signal score section and the activity timeline (e.g. OpportunityPanel). */
@@ -291,4 +331,4 @@ interface PrototypeConfig {
291
331
  navigableViews?: string[];
292
332
  }
293
333
 
294
- export type { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, WorkQueueViewConfig };
334
+ export type { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, SignalScoreExplanationBucket, SignalScoreExplanationSignal, SignalScoreUrgencyLabel, WorkQueueViewConfig };
@@ -37,6 +37,8 @@ interface DetailViewProps {
37
37
  onOpenEntityPanel?: () => void;
38
38
  onOpenRecentActivity?: () => void;
39
39
  onSuggestedActionFeedback?: (actionId: number | string, feedback: string, actionTitle?: string) => void;
40
+ /** @deprecated The compact score UX no longer renders score-level thumbs by default. */
41
+ onScoreFeedback?: (type: "up" | "down", pills: string[], detail: string) => void;
40
42
  onSignalApprove?: (item: QueueItem) => void | Promise<boolean>;
41
43
  getSignalApprovalState?: (item: QueueItem) => ApprovalState | undefined;
42
44
  signalLabels?: InboxViewConfig["signalLabels"];
@@ -49,16 +51,24 @@ interface DetailViewProps {
49
51
  /** Render content between the signal score section and the activity timeline. */
50
52
  renderAfterScore?: (item: QueueItem) => React.ReactNode;
51
53
  lastActivityTime?: string;
54
+ /** Render extra content inline with the detail title. */
55
+ renderTitleExtra?: (item: QueueItem) => React.ReactNode;
56
+ /** Render supporting content below the detail title. */
57
+ renderTitleSubtext?: (item: QueueItem) => React.ReactNode;
52
58
  /** Render extra metadata chips (e.g. assignee) inside the chips row below the title. */
53
59
  renderMetadataExtra?: (item: QueueItem) => React.ReactNode;
54
- onScoreFeedback?: (type: "up" | "down", pills: string[], detail: string) => void;
60
+ onOpenSignalBucket?: (args: {
61
+ item: QueueItem;
62
+ bucketKey: string;
63
+ signalId: string;
64
+ }) => void;
55
65
  approveButtonIconUrl?: string;
56
66
  opportunityPreview?: OpportunityPreview;
57
67
  onRequestApproval?: () => Promise<void>;
58
68
  /** Number of important/attention-worthy events to highlight on the collapsed timeline header. */
59
69
  attentionCount?: number;
60
70
  }
61
- declare function DetailView({ item, sections, getSignalScore, buildSuggestedActions, buildSourceItems, getTimelineEvents, accountContacts, emailSignature, iconMap, onOpenEntityPanel, onOpenRecentActivity, onSuggestedActionFeedback: _onSuggestedActionFeedback, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, renderDetailExtra, renderBeforeScore, renderAfterScore, lastActivityTime, renderMetadataExtra, onScoreFeedback, approveButtonIconUrl, opportunityPreview, onRequestApproval, attentionCount, }: DetailViewProps): React.JSX.Element;
62
- declare function PrototypeInboxView({ items, filterCategories, detailSections, accountContacts, buildAccountContacts, emailSignature, buildSuggestedActions: buildSuggestedActionsProp, buildSourceItems: buildSourceItemsProp, getSignalScore: getSignalScoreProp, getTimelineEvents, iconMap, hideToolbarActions, hideHoverActions, onSuggestedActionFeedback, onScoreFeedback, headerActions, onOpenEntityPanel, onOpenRecentActivity, onItemSelect, defaultViewMode, buildEntityChips, quickFilterTabs, hideAccountsButton, accountDetailsLabel, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, renderDetailExtra, renderBeforeScore, renderAfterScore, lastActivityTime, sortOptions, activeSortId, onSortChange, }: PrototypeInboxViewProps): React.JSX.Element;
71
+ declare function DetailView({ item, sections, getSignalScore, buildSuggestedActions, buildSourceItems: _buildSourceItems, getTimelineEvents, accountContacts, emailSignature, iconMap, onOpenEntityPanel, onOpenRecentActivity, onSuggestedActionFeedback: _onSuggestedActionFeedback, onScoreFeedback: _onScoreFeedback, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, renderDetailExtra, renderBeforeScore, renderAfterScore, lastActivityTime, renderTitleExtra, renderTitleSubtext, renderMetadataExtra, onOpenSignalBucket, approveButtonIconUrl, opportunityPreview, onRequestApproval, attentionCount, }: DetailViewProps): React.JSX.Element;
72
+ declare function PrototypeInboxView({ items, filterCategories, detailSections, accountContacts, buildAccountContacts, emailSignature, buildSuggestedActions: buildSuggestedActionsProp, buildSourceItems: buildSourceItemsProp, getSignalScore: getSignalScoreProp, getTimelineEvents, iconMap, hideToolbarActions, hideHoverActions, onSuggestedActionFeedback, onScoreFeedback, onOpenSignalBucket, headerActions, onOpenEntityPanel, onOpenRecentActivity, onItemSelect, defaultViewMode, buildEntityChips, quickFilterTabs, hideAccountsButton, accountDetailsLabel, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, renderDetailExtra, renderBeforeScore, renderAfterScore, lastActivityTime, renderTitleExtra, renderTitleSubtext, sortOptions, activeSortId, onSortChange, }: PrototypeInboxViewProps): React.JSX.Element;
63
73
 
64
74
  export { DetailView, type DetailViewProps, PrototypeInboxView, type PrototypeInboxViewProps };
@@ -55,9 +55,7 @@ import {
55
55
  } from "../components/inbox-toolbar.js";
56
56
  import { GroupedListView } from "../components/item-list.js";
57
57
  import { SignalApproval } from "../components/signal-feedback-inline.js";
58
- import { ScoreFeedback } from "../components/score-feedback.js";
59
- import { ScoreBreakdown } from "../components/score-breakdown.js";
60
- import { Citation } from "../components/detail-view.js";
58
+ import { ScoreWhyChips, SignalPriorityChip, SignalPriorityPanel } from "../components/score-why-chips.js";
61
59
  import {
62
60
  SuggestedActions
63
61
  } from "../components/suggested-actions.js";
@@ -92,7 +90,7 @@ function DetailView({
92
90
  sections,
93
91
  getSignalScore,
94
92
  buildSuggestedActions,
95
- buildSourceItems,
93
+ buildSourceItems: _buildSourceItems,
96
94
  getTimelineEvents,
97
95
  accountContacts,
98
96
  emailSignature,
@@ -100,6 +98,7 @@ function DetailView({
100
98
  onOpenEntityPanel,
101
99
  onOpenRecentActivity,
102
100
  onSuggestedActionFeedback: _onSuggestedActionFeedback,
101
+ onScoreFeedback: _onScoreFeedback,
103
102
  onSignalApprove,
104
103
  getSignalApprovalState,
105
104
  signalLabels,
@@ -110,31 +109,33 @@ function DetailView({
110
109
  renderBeforeScore,
111
110
  renderAfterScore,
112
111
  lastActivityTime,
112
+ renderTitleExtra,
113
+ renderTitleSubtext,
113
114
  renderMetadataExtra,
114
- onScoreFeedback,
115
+ onOpenSignalBucket,
115
116
  approveButtonIconUrl,
116
117
  opportunityPreview,
117
118
  onRequestApproval,
118
119
  attentionCount
119
120
  }) {
120
121
  var _a, _b, _c;
121
- const [evidenceExpanded, setEvidenceExpanded] = React.useState(false);
122
122
  const [showTimeline, setShowTimeline] = React.useState(false);
123
123
  const [extraActions, setExtraActions] = React.useState([]);
124
+ const [priorityOpen, setPriorityOpen] = React.useState(false);
125
+ const priorityPanelId = React.useId();
124
126
  React.useEffect(() => {
125
127
  setShowTimeline(false);
126
- setEvidenceExpanded(false);
127
128
  setExtraActions([]);
129
+ setPriorityOpen(false);
128
130
  }, [item.id]);
129
131
  const signalData = React.useMemo(
130
132
  () => getSignalScore(item.company, item),
131
- [getSignalScore, item.company, item]
133
+ [getSignalScore, item]
132
134
  );
133
135
  const suggestedActions = React.useMemo(
134
136
  () => [...buildSuggestedActions(item), ...extraActions],
135
137
  [buildSuggestedActions, item, extraActions]
136
138
  );
137
- const sourceItems = React.useMemo(() => buildSourceItems(item), [buildSourceItems, item]);
138
139
  const timelineEvents = React.useMemo(
139
140
  () => {
140
141
  var _a2;
@@ -191,14 +192,24 @@ function DetailView({
191
192
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
192
193
  /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: item.company })
193
194
  ] }),
194
- /* @__PURE__ */ jsx("h1", { className: "mb-3 text-2xl font-bold tracking-tight text-foreground", children: item.title }),
195
- /* @__PURE__ */ jsxs("div", { className: "mb-6 flex flex-wrap items-center gap-2", children: [
196
- (item.statusColor === "red" || item.statusColor === "orange") && /* @__PURE__ */ jsxs("div", { className: `inline-flex items-center gap-1 rounded-md px-2.5 py-1 text-xs font-semibold ${item.statusColor === "red" ? "bg-red-50 text-red-700" : "bg-orange-50 text-orange-700"}`, children: [
197
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold", children: "!" }),
198
- " ",
199
- item.tag1.charAt(0).toUpperCase() + item.tag1.slice(1)
195
+ /* @__PURE__ */ jsxs("div", { className: "mb-3 flex flex-wrap items-start gap-x-3 gap-y-2", children: [
196
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
197
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold tracking-tight text-foreground", children: item.title }),
198
+ renderTitleSubtext == null ? void 0 : renderTitleSubtext(item)
200
199
  ] }),
201
- /* @__PURE__ */ jsx("div", { className: "inline-flex items-center gap-1 rounded-md bg-muted px-2.5 py-1 text-xs font-medium text-muted-foreground", children: item.tag1 }),
200
+ renderTitleExtra == null ? void 0 : renderTitleExtra(item)
201
+ ] }),
202
+ /* @__PURE__ */ jsxs("div", { className: "mb-6 flex flex-wrap items-center gap-2", children: [
203
+ /* @__PURE__ */ jsx(
204
+ SignalPriorityChip,
205
+ {
206
+ score: signalData.score,
207
+ urgencyLabel: signalData.urgencyLabel,
208
+ isOpen: priorityOpen,
209
+ controlsId: priorityPanelId,
210
+ onClick: () => setPriorityOpen((prev) => !prev)
211
+ }
212
+ ),
202
213
  signalData.timeChipLabel && /* @__PURE__ */ jsx(Badge, { variant: "outline", title: (_a = signalData.timeChipDetail) != null ? _a : void 0, children: signalData.timeChipLabel }),
203
214
  /* @__PURE__ */ jsxs(
204
215
  "button",
@@ -215,32 +226,9 @@ function DetailView({
215
226
  ),
216
227
  renderMetadataExtra == null ? void 0 : renderMetadataExtra(item)
217
228
  ] }),
229
+ priorityOpen && /* @__PURE__ */ jsx(SignalPriorityPanel, { id: priorityPanelId, signalData, className: "mb-6" }),
218
230
  sections.signalBrief && (() => {
219
- var _a2, _b2;
220
- const pct = signalData.score;
221
- const scoreColor = pct >= 70 ? "text-emerald-600" : pct >= 40 ? "text-amber-600" : "text-red-600";
222
- const barColor = pct >= 70 ? "bg-emerald-500" : pct >= 40 ? "bg-amber-500" : "bg-red-500";
223
- const scoreLabel = pct >= 70 ? "HIGH" : pct >= 40 ? "MEDIUM" : "LOW";
224
- const evidenceWithCitations = sourceItems.length >= 4 ? [
225
- /* @__PURE__ */ jsxs(Fragment, { children: [
226
- "There are ",
227
- /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: "3 unusual signals" }),
228
- " including a large balance outflow and reduced login frequency",
229
- /* @__PURE__ */ jsx(Citation, { number: 1, source: sourceItems[0] }),
230
- /* @__PURE__ */ jsx(Citation, { number: 2, source: sourceItems[1] }),
231
- /* @__PURE__ */ jsx(Citation, { number: 3, source: sourceItems[2] })
232
- ] }),
233
- /* @__PURE__ */ jsxs(Fragment, { children: [
234
- "Scott mentioned in ",
235
- /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: "#treasury-questions" }),
236
- " that they are actively looking for treasury management options",
237
- /* @__PURE__ */ jsx(Citation, { number: 4, source: sourceItems[2] })
238
- ] }),
239
- /* @__PURE__ */ jsxs(Fragment, { children: [
240
- "You have a recent email thread regarding optimization options that hasn't been replied to",
241
- /* @__PURE__ */ jsx(Citation, { number: 5, source: sourceItems[3] })
242
- ] })
243
- ] : signalData.evidence.map((ev, i) => /* @__PURE__ */ jsx("span", { children: ev }, i));
231
+ var _a2;
244
232
  const briefHeading = (_a2 = signalBriefCopy == null ? void 0 : signalBriefCopy.heading) != null ? _a2 : "Signal brief";
245
233
  const introOpt = signalBriefCopy == null ? void 0 : signalBriefCopy.intro;
246
234
  const briefIntro = introOpt === null ? null : typeof introOpt === "function" ? introOpt(item) : introOpt != null ? introOpt : `Signals indicate a potential opportunity for ${item.company}.`;
@@ -251,64 +239,14 @@ function DetailView({
251
239
  signalData.signalBrief ? /* @__PURE__ */ jsx("p", { className: isProminent ? "text-base text-foreground leading-relaxed mb-4" : "text-sm text-foreground/90 leading-relaxed mb-4", children: signalData.signalBrief }) : /* @__PURE__ */ jsx("p", { className: isProminent ? "text-base text-foreground leading-relaxed mb-4" : "text-sm text-foreground/90 leading-relaxed mb-4", children: signalData.whyNow }),
252
240
  renderBeforeScore == null ? void 0 : renderBeforeScore(item),
253
241
  /* @__PURE__ */ jsx(
254
- ScoreFeedback.Root,
242
+ ScoreWhyChips,
255
243
  {
256
- onSubmitFeedback: (type, pills, detail) => {
257
- var _a3, _b3;
258
- return (_b3 = (_a3 = signalData.onScoreFeedback) != null ? _a3 : onScoreFeedback) == null ? void 0 : _b3(type, pills, detail);
259
- },
260
- initialFeedback: signalData.initialScoreFeedback,
261
- children: /* @__PURE__ */ jsxs("div", { className: "mb-5 rounded-md border border-border bg-muted/20 p-3", children: [
262
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-1.5", children: [
263
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-wider", children: "Signal Score" }),
264
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
265
- /* @__PURE__ */ jsxs("span", { className: "text-sm font-bold text-foreground", children: [
266
- signalData.score,
267
- "/100"
268
- ] }),
269
- /* @__PURE__ */ jsx("span", { className: `text-[10px] font-bold uppercase ${scoreColor}`, children: scoreLabel }),
270
- /* @__PURE__ */ jsx(ScoreFeedback.Trigger, {})
271
- ] })
272
- ] }),
273
- /* @__PURE__ */ jsx(ScoreFeedback.Panel, {}),
274
- /* @__PURE__ */ jsx("div", { className: "h-1.5 bg-muted rounded-full overflow-hidden mb-2", children: /* @__PURE__ */ jsx(
275
- "div",
276
- {
277
- className: `h-full rounded-full transition-all duration-500 ${barColor}`,
278
- style: { width: `${signalData.score}%` }
279
- }
280
- ) }),
281
- /* @__PURE__ */ jsxs(
282
- "button",
283
- {
284
- type: "button",
285
- onClick: () => setEvidenceExpanded((prev) => !prev),
286
- className: "flex items-center gap-1 text-[11px] font-medium text-muted-foreground hover:text-foreground transition-colors",
287
- children: [
288
- /* @__PURE__ */ jsx(ChevronDown, { className: `h-3 w-3 transition-transform duration-200 ${evidenceExpanded ? "rotate-180" : ""}` }),
289
- "View more"
290
- ]
291
- }
292
- ),
293
- evidenceExpanded && /* @__PURE__ */ jsxs("div", { className: "mt-3 space-y-3", children: [
294
- /* @__PURE__ */ jsx("ul", { className: "space-y-2", children: evidenceWithCitations.map((ev, index) => /* @__PURE__ */ jsxs("li", { className: "flex items-start gap-2 text-sm", children: [
295
- /* @__PURE__ */ jsx("div", { className: "w-1.5 h-1.5 bg-primary rounded-full mt-2 flex-shrink-0" }),
296
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground leading-relaxed", children: ev })
297
- ] }, index)) }),
298
- /* @__PURE__ */ jsx(
299
- ScoreBreakdown,
300
- {
301
- factors: signalData.factors,
302
- onFactorFeedback: (_b2 = signalData.onFactorFeedback) != null ? _b2 : ((key, type, detail) => console.log("Signal factor feedback:", { company: item.company, factor: key, type, detail })),
303
- initialFeedback: signalData.initialFactorFeedback
304
- }
305
- ),
306
- /* @__PURE__ */ jsx(SignalApproval.Actions, {})
307
- ] })
308
- ] })
244
+ item,
245
+ signalData,
246
+ onOpenSignalBucket
309
247
  }
310
248
  ),
311
- !evidenceExpanded && /* @__PURE__ */ jsx(SignalApproval.Actions, {})
249
+ /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(SignalApproval.Actions, {}) })
312
250
  ] });
313
251
  })(),
314
252
  renderAfterScore == null ? void 0 : renderAfterScore(item),
@@ -383,6 +321,7 @@ function PrototypeInboxView({
383
321
  hideHoverActions,
384
322
  onSuggestedActionFeedback,
385
323
  onScoreFeedback,
324
+ onOpenSignalBucket,
386
325
  headerActions,
387
326
  onOpenEntityPanel,
388
327
  onOpenRecentActivity,
@@ -402,6 +341,8 @@ function PrototypeInboxView({
402
341
  renderBeforeScore,
403
342
  renderAfterScore,
404
343
  lastActivityTime,
344
+ renderTitleExtra,
345
+ renderTitleSubtext,
405
346
  sortOptions,
406
347
  activeSortId,
407
348
  onSortChange
@@ -586,6 +527,7 @@ function PrototypeInboxView({
586
527
  onOpenEntityPanel,
587
528
  onOpenRecentActivity,
588
529
  onSuggestedActionFeedback,
530
+ onScoreFeedback,
589
531
  onSignalApprove,
590
532
  getSignalApprovalState,
591
533
  signalLabels,
@@ -596,7 +538,9 @@ function PrototypeInboxView({
596
538
  renderBeforeScore,
597
539
  renderAfterScore,
598
540
  lastActivityTime,
599
- onScoreFeedback
541
+ renderTitleExtra,
542
+ renderTitleSubtext,
543
+ onOpenSignalBucket
600
544
  };
601
545
  return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col", children: [
602
546
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-border bg-background px-4 py-3 shrink-0", children: [