pxengine 0.1.104 → 0.1.106
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/README.md +132 -132
- package/config/tailwind-preset.js +159 -159
- package/dist/index.cjs +240 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -6
- package/dist/index.d.ts +37 -6
- package/dist/index.mjs +240 -22
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +19415 -0
- package/package.json +121 -121
package/dist/index.d.cts
CHANGED
|
@@ -3168,15 +3168,23 @@ interface InsightFinding {
|
|
|
3168
3168
|
confidence?: string;
|
|
3169
3169
|
chart_ref?: string;
|
|
3170
3170
|
}
|
|
3171
|
+
/** An insight item may be a {label,value} object, a richer finding, or a plain string. */
|
|
3172
|
+
type InsightItemLike = InsightSummaryItem | InsightFinding | string;
|
|
3171
3173
|
interface InsightSummaryCardProps {
|
|
3172
3174
|
title: string;
|
|
3173
|
-
/**
|
|
3175
|
+
/** Summary line. Agents have used `summary`, `executive_summary`, `thesis`,
|
|
3176
|
+
* or `subtitle` — all accepted. */
|
|
3174
3177
|
summary?: string;
|
|
3175
3178
|
executive_summary?: string;
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
/**
|
|
3179
|
-
|
|
3179
|
+
thesis?: string;
|
|
3180
|
+
subtitle?: string;
|
|
3181
|
+
/** Item list. Agents have used `insights`, `key_findings`, `key_insights`,
|
|
3182
|
+
* `findings`, or `items`, with items as objects OR plain strings. */
|
|
3183
|
+
insights?: InsightItemLike[];
|
|
3184
|
+
key_findings?: InsightItemLike[];
|
|
3185
|
+
key_insights?: InsightItemLike[];
|
|
3186
|
+
findings?: InsightItemLike[];
|
|
3187
|
+
items?: InsightItemLike[];
|
|
3180
3188
|
/** Card-level confidence used as a fallback for items that omit their own. */
|
|
3181
3189
|
confidence?: string;
|
|
3182
3190
|
className?: string;
|
|
@@ -3506,6 +3514,14 @@ interface ResearchReportJobCardProps {
|
|
|
3506
3514
|
key_findings?: string[];
|
|
3507
3515
|
/** HTML report URL */
|
|
3508
3516
|
html_url?: string;
|
|
3517
|
+
/** How the report was generated: template (default) or legacy */
|
|
3518
|
+
generation_mode?: "template" | "legacy" | string;
|
|
3519
|
+
/** Built-in template id used to render the report */
|
|
3520
|
+
template_id?: string;
|
|
3521
|
+
/** Saved version id after user approval */
|
|
3522
|
+
template_version_id?: string;
|
|
3523
|
+
/** User review state for template-based reports */
|
|
3524
|
+
review_status?: "pending_review" | "approved" | "auto" | string;
|
|
3509
3525
|
/** Dynamic theme colors generated based on topic */
|
|
3510
3526
|
theme?: ReportTheme;
|
|
3511
3527
|
/** Error message if job failed */
|
|
@@ -3516,6 +3532,17 @@ interface ResearchReportJobCardProps {
|
|
|
3516
3532
|
pollUrl?: string;
|
|
3517
3533
|
/** Auth token for polling requests */
|
|
3518
3534
|
authToken?: string;
|
|
3535
|
+
/**
|
|
3536
|
+
* Shareable link copied when the user clicks Share.
|
|
3537
|
+
* Falls back to `/r/{job_id}` on the current origin when not provided.
|
|
3538
|
+
*/
|
|
3539
|
+
shareUrl?: string;
|
|
3540
|
+
/**
|
|
3541
|
+
* Approve endpoint (POST). Defaults to `/api/reports/{job_id}/approve`.
|
|
3542
|
+
*/
|
|
3543
|
+
approveUrl?: string;
|
|
3544
|
+
/** Regenerate endpoint (POST). Defaults to `/api/reports/{job_id}/regenerate`. */
|
|
3545
|
+
regenerateUrl?: string;
|
|
3519
3546
|
/** Additional CSS classes */
|
|
3520
3547
|
className?: string;
|
|
3521
3548
|
/** Callback when job completes */
|
|
@@ -3540,6 +3567,10 @@ interface ResearchReportJobOutput {
|
|
|
3540
3567
|
key_findings?: string[];
|
|
3541
3568
|
theme?: ReportTheme;
|
|
3542
3569
|
html_url?: string;
|
|
3570
|
+
generation_mode?: string;
|
|
3571
|
+
template_id?: string;
|
|
3572
|
+
template_version_id?: string;
|
|
3573
|
+
review_status?: string;
|
|
3543
3574
|
}
|
|
3544
3575
|
|
|
3545
3576
|
declare const ResearchReportJobCard: React__default.FC<ResearchReportJobCardProps>;
|
|
@@ -4138,4 +4169,4 @@ interface AnalyticsChartProps {
|
|
|
4138
4169
|
}
|
|
4139
4170
|
declare function AnalyticsChart({ config: configProp, chartId, apiBase, authToken, height, className, loading: loadingProp, error: errorProp, }: AnalyticsChartProps): react_jsx_runtime.JSX.Element;
|
|
4140
4171
|
|
|
4141
|
-
export { Accordion, AccordionAtom, type AccordionAtomType, AccordionContent, AccordionItem, AccordionTrigger, ActionButton, type ActionButtonAtom, type ActionButtonProps, type ActionPriority, ActionPriorityCard, type ActionPriorityCardMolecule, type ActionPriorityCardProps, type ActionPriorityItem, Alert, AlertAtom, type AlertAtomType, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogAtom, type AlertDialogAtomType, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnalyticsChart, type AnalyticsChartMolecule, type AnalyticsChartProps, type AnalyticsSummaryCardMolecule, ApprovalCard, type ApprovalCardMolecule, type ApprovalCardProps, type ApprovalDetail, type ApprovalStatus, type AreaChartMolecule, ArrowToggleAtom, type ArrowToggleAtomType, AspectRatio, AspectRatioAtom, type AspectRatioAtomType, AudienceDemographicsCard, type AudienceDemographicsCardMolecule, AudienceMetricCard, type AudienceMetricCardMolecule, AudiencePersonaCard, type AudiencePersonaCardMolecule, type AudiencePersonaCardProps, Avatar, AvatarAtom, type AvatarAtomType, AvatarFallback, AvatarImage, Badge, BadgeAtom, type BadgeAtomType, type BarChartMolecule, type BaseAnalyticsChartMolecule, type BaseAtom, type BaseMolecule, type BranchCI, BrandAffinityGroup, type BrandAffinityGroupMolecule, Breadcrumb, BreadcrumbAtom, type BreadcrumbAtomType, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BudgetAllocCard, type BudgetAllocCardProps, type BudgetAllocItem, Button, type ButtonAction, ButtonAtom, type ButtonAtomType, type ButtonSize$1 as ButtonSize, type ButtonVariant$1 as ButtonVariant, Calendar, CalendarAtom, type CalendarAtomType, type CalendarEventAttendee, CalendarEventCard, type CalendarEventCardProps, type CalendarEventStatus, CampaignBriefCard, type CampaignBriefCardMolecule, type CampaignBriefCardProps, CampaignConceptCard, type CampaignConceptCardProps, CampaignSeedCard, type CampaignSeedCardAtom, type CampaignSeedCardProps, Card, CardAtom, type CardAtomType, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselAtom, type CarouselAtomType, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChannelPlanCard, type ChannelPlanCardMolecule, type ChannelPlanCardProps, type ChannelPlanItem, ChartAtom, type ChartAtomType, type ChartDataPoint, Checkbox, CheckboxAtom, type CheckboxAtomType, ChecklistCard, type ChecklistCardMolecule, type ChecklistCardProps, type ChecklistItem, Collapsible, CollapsibleAtom, type CollapsibleAtomType, CollapsibleContent, CollapsibleTrigger, type CollectedField, type ColumnChartMolecule, Command, CommandAtom, type CommandAtomType, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ComparativeChartMolecule, type ComparisonAttribute, ComparisonCard, type ComparisonCardProps, type ComparisonOption, ConfirmationCard, type ConfirmationCardMolecule, type ConfirmationCardProps, ContentPreviewGallery, type ContentPreviewGalleryMolecule, ContextMenu, ContextMenuAtom, type ContextMenuAtomType, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger, CountrySelectDisplay, CountrySelectEdit, CreatorActionHeader, type CreatorActionHeaderMolecule, CreatorCompactView, type CreatorCompactViewProps, type CreatorDetailData, CreatorExpandedPanel, CreatorGridCard, type CreatorGridCardMolecule, CreatorImageList, type CreatorImageListProps, CreatorProfileSummary, type CreatorProfileSummaryMolecule, CreatorProgressBar, type CreatorProgressBarProps, CreatorSearch, type CreatorSearchProps, type CreatorVersionData, CreatorWidget, type CreatorWidgetAction, type CreatorWidgetMolecule, type CreatorWidgetProps, CreatorWidgetSkeleton, type CreatorWidgetStatus, DataGrid, type DataGridMolecule, DataSourceChecklistCard, type DataSourceChecklistCardMolecule, type DataSourceChecklistCardProps, type DataSourceItem, DataTableCard, type DataTableCardMolecule, type DataTableCardProps, type DataTableColumn, Dialog, DialogAtom, type DialogAtomType, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DonutChartMolecule, Drawer, DrawerAtom, type DrawerAtomType, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuAtom, type DropdownMenuAtomType, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, DynamicFormCard, type DynamicFormCardMolecule, type DynamicFormCardProps, EditableField, type EditableFieldProps, EmptyState, type EmptyStateMolecule, FeedbackRatingCard, type FeedbackRatingCardMolecule, type FeedbackRatingCardProps, type FetchCreatorDetailsParams, type FetchStatusParams, type FetchVersionsParams, FileUpload, type FileUploadMolecule, FilterBar, type FilterBarMolecule, Form, FormCard, type FormCardProps, FormControl, FormDescription, FormField, FormInputAtom, type FormInputAtomType, FormItem, FormLabel, FormMessage, FormSelectAtom, type FormSelectAtomType, FormTextareaAtom, type FormTextareaAtomType, type FunnelChartMolecule, type GapSize, GitHubConnectCard, type GitHubConnectCardProps, type GitHubConnectMolecule, GitHubIssueTrackerCard, type GitHubIssueTrackerCardProps, type GitHubIssueTrackerMolecule, GitHubRepoHealthCard, type GitHubRepoHealthCardProps, type GitHubRepoHealthMolecule, GitHubReposListCard, type GitHubReposListCardProps, GoalAlignmentCard, type GoalAlignmentCardMolecule, type GoalAlignmentCardProps, type GoalAlignmentItem, GoogleSheetsCard, type GoogleSheetsCardProps, GoogleSheetsConnectCard, type GoogleSheetsConnectCardProps, GoogleSheetsListCard, type GoogleSheetsListCardProps, GrowthChartCard, type GrowthChartCardMolecule, type HeatmapChartMolecule, HoverCard, HoverCardContent, HoverCardTrigger, IconAtom, type IconAtomType, type IconName, Input, InputAtom, type InputAtomType, type InputElementLike, InputOTP, InputOTPAtom, type InputOTPAtomType, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputType, InputWidget, type InputWidgetField, type InputWidgetFieldKind, type InputWidgetType, InsightDigestCard, type InsightDigestCardMolecule, type InsightDigestCardProps, type InsightDigestItem, type InsightFinding, InsightSummaryCard, type InsightSummaryCardMolecule, type InsightSummaryCardProps, type InsightSummaryItem, type JobProgress$2 as JobProgress, type KPIMetricCardMolecule, type KPIStatItem, KPIStatsCard, type KPIStatsCardMolecule, type KPIStatsCardProps, KbdAtom, type KbdAtomType, KeywordBundlesDisplay, KeywordBundlesEdit, Label, LabelAtom, type LabelAtomType, LayoutAtom, type LayoutAtomType, type LayoutDirection, type LineChartMolecule, LoadingOverlay, type LoadingOverlayMolecule, MCQCard, type MCQCardAtom, type MCQCardProps, type MCQOption, Menubar, MenubarCheckboxItem, MenubarContent, MenubarItem, MenubarLabel, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NextStepCard, type NextStepCardMolecule, type NextStepCardProps, type NextStepItem, NotificationList, type NotificationListMolecule, PXEngineRenderer, Pagination, PaginationAtom, type PaginationAtomType, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type PersonaSegment, type PieChartMolecule, PlatformIconGroup, type PlatformIconGroupMolecule, PlatformSelectDisplay, PlatformSelectEdit, PollCard, type PollCardMolecule, type PollCardProps, type PollOption, type PollingConfig, Popover, PopoverAtom, type PopoverAtomType, PopoverContent, PopoverTrigger, type PresentationFormats, PresentationJobCard, type PresentationJobCardProps, type PresentationJobOutput, type PriorityActionItem, PriorityActionsCard, type PriorityActionsCardMolecule, type PriorityActionsCardProps, Progress, ProgressAtom, type ProgressAtomType, type PullRequest, REGISTERED_COMPONENTS, RadioAtom, type RadioAtomType, RadioGroup, RadioGroupAtom, type RadioGroupAtomType, RadioGroupItem, RatingAtom, type RatingAtomType, RecommendationCard, type RecommendationCardMolecule, type RecommendationCardProps, type RepoItem, type ReportTheme, ResearchBriefCard, type ResearchBriefCardMolecule, type ResearchBriefCardProps, type ResearchBriefItem, type JobProgress$1 as ResearchJobProgress, ResearchReportJobCard, type ResearchReportJobCardProps, type ResearchReportJobOutput, ResizableAtom, type ResizableAtomType, ResizablePanel, ResizablePanelGroup, RiskSignalCard, type RiskSignalCardMolecule, type RiskSignalCardProps, type RiskSignalItem, type RunSseConfig, ScoreBreakdownCard, type ScoreBreakdownCardMolecule, type ScoreBreakdownCardProps, type ScoreBreakdownItem, ScrollArea, ScrollAreaAtom, type ScrollAreaAtomType, ScrollBar, SearchSpecCard, type SearchSpecCardAtom, type SearchSpecCardProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeparatorAtom, type SeparatorAtomType, Sheet, SheetAtom, type SheetAtomType, SheetClose, type SheetColumn, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetRow, type SheetTabItem, SheetTitle, SheetTrigger, Skeleton, SkeletonAtom, type SkeletonAtomType, Slider, SliderAtom, type SliderAtomType, type SocialPost, SocialPostCard, type SocialPostCardProps, type SocialPostMolecule, Spinner, SpinnerAtom, type SpinnerAtomType, type SpreadsheetItem, type StackedBarChartMolecule, type StackedColumnChartMolecule, type StaleIssue, StatsGrid, type StatsGridMolecule, type StatusDetails, StepWizard, type StepWizardMolecule, Switch, SwitchAtom, type SwitchAtomType, Table, TableAtom, type TableAtomType, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsAtom, type TabsAtomType, TabsContent, TabsList, TabsTrigger, TagCloud, type TagCloudMolecule, TextAtom, type TextAtomType, type TextVariant, Textarea, TextareaAtom, type TimeSeriesChartMolecule, TimelineAtom, type TimelineAtomType, TimelineCard, type TimelineCardMolecule, type TimelineCardProps, type TimelineStep, type TimelineStepStatus, ToggleAtom, type ToggleAtomType, Tooltip, TooltipAtom, type TooltipAtomType, TooltipContent, TooltipProvider, TooltipTrigger, TopPostsGrid, type TopPostsGridMolecule, type TrendIndicatorMolecule, type UIAtom, type UIComponent, type UIMolecule, type UISchema, VideoAtom, type VideoAtomType, WebSearchJobCard, type WebSearchJobCardProps, type WebSearchJobOutput, type WebSearchResult, type WidgetTheme, WidgetThemeContext, cn, defaultFetchSelections, defaultPersistSelection, elementToQAField, formatQAMessage, generateFieldsFromData, generateFieldsFromPropDefinitions, isInputAtom, submitWidgetToAgent, th, useCreatorWidgetPolling, useWidgetTheme, withAlpha };
|
|
4172
|
+
export { Accordion, AccordionAtom, type AccordionAtomType, AccordionContent, AccordionItem, AccordionTrigger, ActionButton, type ActionButtonAtom, type ActionButtonProps, type ActionPriority, ActionPriorityCard, type ActionPriorityCardMolecule, type ActionPriorityCardProps, type ActionPriorityItem, Alert, AlertAtom, type AlertAtomType, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogAtom, type AlertDialogAtomType, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnalyticsChart, type AnalyticsChartMolecule, type AnalyticsChartProps, type AnalyticsSummaryCardMolecule, ApprovalCard, type ApprovalCardMolecule, type ApprovalCardProps, type ApprovalDetail, type ApprovalStatus, type AreaChartMolecule, ArrowToggleAtom, type ArrowToggleAtomType, AspectRatio, AspectRatioAtom, type AspectRatioAtomType, AudienceDemographicsCard, type AudienceDemographicsCardMolecule, AudienceMetricCard, type AudienceMetricCardMolecule, AudiencePersonaCard, type AudiencePersonaCardMolecule, type AudiencePersonaCardProps, Avatar, AvatarAtom, type AvatarAtomType, AvatarFallback, AvatarImage, Badge, BadgeAtom, type BadgeAtomType, type BarChartMolecule, type BaseAnalyticsChartMolecule, type BaseAtom, type BaseMolecule, type BranchCI, BrandAffinityGroup, type BrandAffinityGroupMolecule, Breadcrumb, BreadcrumbAtom, type BreadcrumbAtomType, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BudgetAllocCard, type BudgetAllocCardProps, type BudgetAllocItem, Button, type ButtonAction, ButtonAtom, type ButtonAtomType, type ButtonSize$1 as ButtonSize, type ButtonVariant$1 as ButtonVariant, Calendar, CalendarAtom, type CalendarAtomType, type CalendarEventAttendee, CalendarEventCard, type CalendarEventCardProps, type CalendarEventStatus, CampaignBriefCard, type CampaignBriefCardMolecule, type CampaignBriefCardProps, CampaignConceptCard, type CampaignConceptCardProps, CampaignSeedCard, type CampaignSeedCardAtom, type CampaignSeedCardProps, Card, CardAtom, type CardAtomType, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselAtom, type CarouselAtomType, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChannelPlanCard, type ChannelPlanCardMolecule, type ChannelPlanCardProps, type ChannelPlanItem, ChartAtom, type ChartAtomType, type ChartDataPoint, Checkbox, CheckboxAtom, type CheckboxAtomType, ChecklistCard, type ChecklistCardMolecule, type ChecklistCardProps, type ChecklistItem, Collapsible, CollapsibleAtom, type CollapsibleAtomType, CollapsibleContent, CollapsibleTrigger, type CollectedField, type ColumnChartMolecule, Command, CommandAtom, type CommandAtomType, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ComparativeChartMolecule, type ComparisonAttribute, ComparisonCard, type ComparisonCardProps, type ComparisonOption, ConfirmationCard, type ConfirmationCardMolecule, type ConfirmationCardProps, ContentPreviewGallery, type ContentPreviewGalleryMolecule, ContextMenu, ContextMenuAtom, type ContextMenuAtomType, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger, CountrySelectDisplay, CountrySelectEdit, CreatorActionHeader, type CreatorActionHeaderMolecule, CreatorCompactView, type CreatorCompactViewProps, type CreatorDetailData, CreatorExpandedPanel, CreatorGridCard, type CreatorGridCardMolecule, CreatorImageList, type CreatorImageListProps, CreatorProfileSummary, type CreatorProfileSummaryMolecule, CreatorProgressBar, type CreatorProgressBarProps, CreatorSearch, type CreatorSearchProps, type CreatorVersionData, CreatorWidget, type CreatorWidgetAction, type CreatorWidgetMolecule, type CreatorWidgetProps, CreatorWidgetSkeleton, type CreatorWidgetStatus, DataGrid, type DataGridMolecule, DataSourceChecklistCard, type DataSourceChecklistCardMolecule, type DataSourceChecklistCardProps, type DataSourceItem, DataTableCard, type DataTableCardMolecule, type DataTableCardProps, type DataTableColumn, Dialog, DialogAtom, type DialogAtomType, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DonutChartMolecule, Drawer, DrawerAtom, type DrawerAtomType, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuAtom, type DropdownMenuAtomType, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, DynamicFormCard, type DynamicFormCardMolecule, type DynamicFormCardProps, EditableField, type EditableFieldProps, EmptyState, type EmptyStateMolecule, FeedbackRatingCard, type FeedbackRatingCardMolecule, type FeedbackRatingCardProps, type FetchCreatorDetailsParams, type FetchStatusParams, type FetchVersionsParams, FileUpload, type FileUploadMolecule, FilterBar, type FilterBarMolecule, Form, FormCard, type FormCardProps, FormControl, FormDescription, FormField, FormInputAtom, type FormInputAtomType, FormItem, FormLabel, FormMessage, FormSelectAtom, type FormSelectAtomType, FormTextareaAtom, type FormTextareaAtomType, type FunnelChartMolecule, type GapSize, GitHubConnectCard, type GitHubConnectCardProps, type GitHubConnectMolecule, GitHubIssueTrackerCard, type GitHubIssueTrackerCardProps, type GitHubIssueTrackerMolecule, GitHubRepoHealthCard, type GitHubRepoHealthCardProps, type GitHubRepoHealthMolecule, GitHubReposListCard, type GitHubReposListCardProps, GoalAlignmentCard, type GoalAlignmentCardMolecule, type GoalAlignmentCardProps, type GoalAlignmentItem, GoogleSheetsCard, type GoogleSheetsCardProps, GoogleSheetsConnectCard, type GoogleSheetsConnectCardProps, GoogleSheetsListCard, type GoogleSheetsListCardProps, GrowthChartCard, type GrowthChartCardMolecule, type HeatmapChartMolecule, HoverCard, HoverCardContent, HoverCardTrigger, IconAtom, type IconAtomType, type IconName, Input, InputAtom, type InputAtomType, type InputElementLike, InputOTP, InputOTPAtom, type InputOTPAtomType, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputType, InputWidget, type InputWidgetField, type InputWidgetFieldKind, type InputWidgetType, InsightDigestCard, type InsightDigestCardMolecule, type InsightDigestCardProps, type InsightDigestItem, type InsightFinding, type InsightItemLike, InsightSummaryCard, type InsightSummaryCardMolecule, type InsightSummaryCardProps, type InsightSummaryItem, type JobProgress$2 as JobProgress, type KPIMetricCardMolecule, type KPIStatItem, KPIStatsCard, type KPIStatsCardMolecule, type KPIStatsCardProps, KbdAtom, type KbdAtomType, KeywordBundlesDisplay, KeywordBundlesEdit, Label, LabelAtom, type LabelAtomType, LayoutAtom, type LayoutAtomType, type LayoutDirection, type LineChartMolecule, LoadingOverlay, type LoadingOverlayMolecule, MCQCard, type MCQCardAtom, type MCQCardProps, type MCQOption, Menubar, MenubarCheckboxItem, MenubarContent, MenubarItem, MenubarLabel, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NextStepCard, type NextStepCardMolecule, type NextStepCardProps, type NextStepItem, NotificationList, type NotificationListMolecule, PXEngineRenderer, Pagination, PaginationAtom, type PaginationAtomType, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type PersonaSegment, type PieChartMolecule, PlatformIconGroup, type PlatformIconGroupMolecule, PlatformSelectDisplay, PlatformSelectEdit, PollCard, type PollCardMolecule, type PollCardProps, type PollOption, type PollingConfig, Popover, PopoverAtom, type PopoverAtomType, PopoverContent, PopoverTrigger, type PresentationFormats, PresentationJobCard, type PresentationJobCardProps, type PresentationJobOutput, type PriorityActionItem, PriorityActionsCard, type PriorityActionsCardMolecule, type PriorityActionsCardProps, Progress, ProgressAtom, type ProgressAtomType, type PullRequest, REGISTERED_COMPONENTS, RadioAtom, type RadioAtomType, RadioGroup, RadioGroupAtom, type RadioGroupAtomType, RadioGroupItem, RatingAtom, type RatingAtomType, RecommendationCard, type RecommendationCardMolecule, type RecommendationCardProps, type RepoItem, type ReportTheme, ResearchBriefCard, type ResearchBriefCardMolecule, type ResearchBriefCardProps, type ResearchBriefItem, type JobProgress$1 as ResearchJobProgress, ResearchReportJobCard, type ResearchReportJobCardProps, type ResearchReportJobOutput, ResizableAtom, type ResizableAtomType, ResizablePanel, ResizablePanelGroup, RiskSignalCard, type RiskSignalCardMolecule, type RiskSignalCardProps, type RiskSignalItem, type RunSseConfig, ScoreBreakdownCard, type ScoreBreakdownCardMolecule, type ScoreBreakdownCardProps, type ScoreBreakdownItem, ScrollArea, ScrollAreaAtom, type ScrollAreaAtomType, ScrollBar, SearchSpecCard, type SearchSpecCardAtom, type SearchSpecCardProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeparatorAtom, type SeparatorAtomType, Sheet, SheetAtom, type SheetAtomType, SheetClose, type SheetColumn, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetRow, type SheetTabItem, SheetTitle, SheetTrigger, Skeleton, SkeletonAtom, type SkeletonAtomType, Slider, SliderAtom, type SliderAtomType, type SocialPost, SocialPostCard, type SocialPostCardProps, type SocialPostMolecule, Spinner, SpinnerAtom, type SpinnerAtomType, type SpreadsheetItem, type StackedBarChartMolecule, type StackedColumnChartMolecule, type StaleIssue, StatsGrid, type StatsGridMolecule, type StatusDetails, StepWizard, type StepWizardMolecule, Switch, SwitchAtom, type SwitchAtomType, Table, TableAtom, type TableAtomType, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsAtom, type TabsAtomType, TabsContent, TabsList, TabsTrigger, TagCloud, type TagCloudMolecule, TextAtom, type TextAtomType, type TextVariant, Textarea, TextareaAtom, type TimeSeriesChartMolecule, TimelineAtom, type TimelineAtomType, TimelineCard, type TimelineCardMolecule, type TimelineCardProps, type TimelineStep, type TimelineStepStatus, ToggleAtom, type ToggleAtomType, Tooltip, TooltipAtom, type TooltipAtomType, TooltipContent, TooltipProvider, TooltipTrigger, TopPostsGrid, type TopPostsGridMolecule, type TrendIndicatorMolecule, type UIAtom, type UIComponent, type UIMolecule, type UISchema, VideoAtom, type VideoAtomType, WebSearchJobCard, type WebSearchJobCardProps, type WebSearchJobOutput, type WebSearchResult, type WidgetTheme, WidgetThemeContext, cn, defaultFetchSelections, defaultPersistSelection, elementToQAField, formatQAMessage, generateFieldsFromData, generateFieldsFromPropDefinitions, isInputAtom, submitWidgetToAgent, th, useCreatorWidgetPolling, useWidgetTheme, withAlpha };
|
package/dist/index.d.ts
CHANGED
|
@@ -3168,15 +3168,23 @@ interface InsightFinding {
|
|
|
3168
3168
|
confidence?: string;
|
|
3169
3169
|
chart_ref?: string;
|
|
3170
3170
|
}
|
|
3171
|
+
/** An insight item may be a {label,value} object, a richer finding, or a plain string. */
|
|
3172
|
+
type InsightItemLike = InsightSummaryItem | InsightFinding | string;
|
|
3171
3173
|
interface InsightSummaryCardProps {
|
|
3172
3174
|
title: string;
|
|
3173
|
-
/**
|
|
3175
|
+
/** Summary line. Agents have used `summary`, `executive_summary`, `thesis`,
|
|
3176
|
+
* or `subtitle` — all accepted. */
|
|
3174
3177
|
summary?: string;
|
|
3175
3178
|
executive_summary?: string;
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
/**
|
|
3179
|
-
|
|
3179
|
+
thesis?: string;
|
|
3180
|
+
subtitle?: string;
|
|
3181
|
+
/** Item list. Agents have used `insights`, `key_findings`, `key_insights`,
|
|
3182
|
+
* `findings`, or `items`, with items as objects OR plain strings. */
|
|
3183
|
+
insights?: InsightItemLike[];
|
|
3184
|
+
key_findings?: InsightItemLike[];
|
|
3185
|
+
key_insights?: InsightItemLike[];
|
|
3186
|
+
findings?: InsightItemLike[];
|
|
3187
|
+
items?: InsightItemLike[];
|
|
3180
3188
|
/** Card-level confidence used as a fallback for items that omit their own. */
|
|
3181
3189
|
confidence?: string;
|
|
3182
3190
|
className?: string;
|
|
@@ -3506,6 +3514,14 @@ interface ResearchReportJobCardProps {
|
|
|
3506
3514
|
key_findings?: string[];
|
|
3507
3515
|
/** HTML report URL */
|
|
3508
3516
|
html_url?: string;
|
|
3517
|
+
/** How the report was generated: template (default) or legacy */
|
|
3518
|
+
generation_mode?: "template" | "legacy" | string;
|
|
3519
|
+
/** Built-in template id used to render the report */
|
|
3520
|
+
template_id?: string;
|
|
3521
|
+
/** Saved version id after user approval */
|
|
3522
|
+
template_version_id?: string;
|
|
3523
|
+
/** User review state for template-based reports */
|
|
3524
|
+
review_status?: "pending_review" | "approved" | "auto" | string;
|
|
3509
3525
|
/** Dynamic theme colors generated based on topic */
|
|
3510
3526
|
theme?: ReportTheme;
|
|
3511
3527
|
/** Error message if job failed */
|
|
@@ -3516,6 +3532,17 @@ interface ResearchReportJobCardProps {
|
|
|
3516
3532
|
pollUrl?: string;
|
|
3517
3533
|
/** Auth token for polling requests */
|
|
3518
3534
|
authToken?: string;
|
|
3535
|
+
/**
|
|
3536
|
+
* Shareable link copied when the user clicks Share.
|
|
3537
|
+
* Falls back to `/r/{job_id}` on the current origin when not provided.
|
|
3538
|
+
*/
|
|
3539
|
+
shareUrl?: string;
|
|
3540
|
+
/**
|
|
3541
|
+
* Approve endpoint (POST). Defaults to `/api/reports/{job_id}/approve`.
|
|
3542
|
+
*/
|
|
3543
|
+
approveUrl?: string;
|
|
3544
|
+
/** Regenerate endpoint (POST). Defaults to `/api/reports/{job_id}/regenerate`. */
|
|
3545
|
+
regenerateUrl?: string;
|
|
3519
3546
|
/** Additional CSS classes */
|
|
3520
3547
|
className?: string;
|
|
3521
3548
|
/** Callback when job completes */
|
|
@@ -3540,6 +3567,10 @@ interface ResearchReportJobOutput {
|
|
|
3540
3567
|
key_findings?: string[];
|
|
3541
3568
|
theme?: ReportTheme;
|
|
3542
3569
|
html_url?: string;
|
|
3570
|
+
generation_mode?: string;
|
|
3571
|
+
template_id?: string;
|
|
3572
|
+
template_version_id?: string;
|
|
3573
|
+
review_status?: string;
|
|
3543
3574
|
}
|
|
3544
3575
|
|
|
3545
3576
|
declare const ResearchReportJobCard: React__default.FC<ResearchReportJobCardProps>;
|
|
@@ -4138,4 +4169,4 @@ interface AnalyticsChartProps {
|
|
|
4138
4169
|
}
|
|
4139
4170
|
declare function AnalyticsChart({ config: configProp, chartId, apiBase, authToken, height, className, loading: loadingProp, error: errorProp, }: AnalyticsChartProps): react_jsx_runtime.JSX.Element;
|
|
4140
4171
|
|
|
4141
|
-
export { Accordion, AccordionAtom, type AccordionAtomType, AccordionContent, AccordionItem, AccordionTrigger, ActionButton, type ActionButtonAtom, type ActionButtonProps, type ActionPriority, ActionPriorityCard, type ActionPriorityCardMolecule, type ActionPriorityCardProps, type ActionPriorityItem, Alert, AlertAtom, type AlertAtomType, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogAtom, type AlertDialogAtomType, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnalyticsChart, type AnalyticsChartMolecule, type AnalyticsChartProps, type AnalyticsSummaryCardMolecule, ApprovalCard, type ApprovalCardMolecule, type ApprovalCardProps, type ApprovalDetail, type ApprovalStatus, type AreaChartMolecule, ArrowToggleAtom, type ArrowToggleAtomType, AspectRatio, AspectRatioAtom, type AspectRatioAtomType, AudienceDemographicsCard, type AudienceDemographicsCardMolecule, AudienceMetricCard, type AudienceMetricCardMolecule, AudiencePersonaCard, type AudiencePersonaCardMolecule, type AudiencePersonaCardProps, Avatar, AvatarAtom, type AvatarAtomType, AvatarFallback, AvatarImage, Badge, BadgeAtom, type BadgeAtomType, type BarChartMolecule, type BaseAnalyticsChartMolecule, type BaseAtom, type BaseMolecule, type BranchCI, BrandAffinityGroup, type BrandAffinityGroupMolecule, Breadcrumb, BreadcrumbAtom, type BreadcrumbAtomType, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BudgetAllocCard, type BudgetAllocCardProps, type BudgetAllocItem, Button, type ButtonAction, ButtonAtom, type ButtonAtomType, type ButtonSize$1 as ButtonSize, type ButtonVariant$1 as ButtonVariant, Calendar, CalendarAtom, type CalendarAtomType, type CalendarEventAttendee, CalendarEventCard, type CalendarEventCardProps, type CalendarEventStatus, CampaignBriefCard, type CampaignBriefCardMolecule, type CampaignBriefCardProps, CampaignConceptCard, type CampaignConceptCardProps, CampaignSeedCard, type CampaignSeedCardAtom, type CampaignSeedCardProps, Card, CardAtom, type CardAtomType, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselAtom, type CarouselAtomType, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChannelPlanCard, type ChannelPlanCardMolecule, type ChannelPlanCardProps, type ChannelPlanItem, ChartAtom, type ChartAtomType, type ChartDataPoint, Checkbox, CheckboxAtom, type CheckboxAtomType, ChecklistCard, type ChecklistCardMolecule, type ChecklistCardProps, type ChecklistItem, Collapsible, CollapsibleAtom, type CollapsibleAtomType, CollapsibleContent, CollapsibleTrigger, type CollectedField, type ColumnChartMolecule, Command, CommandAtom, type CommandAtomType, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ComparativeChartMolecule, type ComparisonAttribute, ComparisonCard, type ComparisonCardProps, type ComparisonOption, ConfirmationCard, type ConfirmationCardMolecule, type ConfirmationCardProps, ContentPreviewGallery, type ContentPreviewGalleryMolecule, ContextMenu, ContextMenuAtom, type ContextMenuAtomType, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger, CountrySelectDisplay, CountrySelectEdit, CreatorActionHeader, type CreatorActionHeaderMolecule, CreatorCompactView, type CreatorCompactViewProps, type CreatorDetailData, CreatorExpandedPanel, CreatorGridCard, type CreatorGridCardMolecule, CreatorImageList, type CreatorImageListProps, CreatorProfileSummary, type CreatorProfileSummaryMolecule, CreatorProgressBar, type CreatorProgressBarProps, CreatorSearch, type CreatorSearchProps, type CreatorVersionData, CreatorWidget, type CreatorWidgetAction, type CreatorWidgetMolecule, type CreatorWidgetProps, CreatorWidgetSkeleton, type CreatorWidgetStatus, DataGrid, type DataGridMolecule, DataSourceChecklistCard, type DataSourceChecklistCardMolecule, type DataSourceChecklistCardProps, type DataSourceItem, DataTableCard, type DataTableCardMolecule, type DataTableCardProps, type DataTableColumn, Dialog, DialogAtom, type DialogAtomType, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DonutChartMolecule, Drawer, DrawerAtom, type DrawerAtomType, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuAtom, type DropdownMenuAtomType, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, DynamicFormCard, type DynamicFormCardMolecule, type DynamicFormCardProps, EditableField, type EditableFieldProps, EmptyState, type EmptyStateMolecule, FeedbackRatingCard, type FeedbackRatingCardMolecule, type FeedbackRatingCardProps, type FetchCreatorDetailsParams, type FetchStatusParams, type FetchVersionsParams, FileUpload, type FileUploadMolecule, FilterBar, type FilterBarMolecule, Form, FormCard, type FormCardProps, FormControl, FormDescription, FormField, FormInputAtom, type FormInputAtomType, FormItem, FormLabel, FormMessage, FormSelectAtom, type FormSelectAtomType, FormTextareaAtom, type FormTextareaAtomType, type FunnelChartMolecule, type GapSize, GitHubConnectCard, type GitHubConnectCardProps, type GitHubConnectMolecule, GitHubIssueTrackerCard, type GitHubIssueTrackerCardProps, type GitHubIssueTrackerMolecule, GitHubRepoHealthCard, type GitHubRepoHealthCardProps, type GitHubRepoHealthMolecule, GitHubReposListCard, type GitHubReposListCardProps, GoalAlignmentCard, type GoalAlignmentCardMolecule, type GoalAlignmentCardProps, type GoalAlignmentItem, GoogleSheetsCard, type GoogleSheetsCardProps, GoogleSheetsConnectCard, type GoogleSheetsConnectCardProps, GoogleSheetsListCard, type GoogleSheetsListCardProps, GrowthChartCard, type GrowthChartCardMolecule, type HeatmapChartMolecule, HoverCard, HoverCardContent, HoverCardTrigger, IconAtom, type IconAtomType, type IconName, Input, InputAtom, type InputAtomType, type InputElementLike, InputOTP, InputOTPAtom, type InputOTPAtomType, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputType, InputWidget, type InputWidgetField, type InputWidgetFieldKind, type InputWidgetType, InsightDigestCard, type InsightDigestCardMolecule, type InsightDigestCardProps, type InsightDigestItem, type InsightFinding, InsightSummaryCard, type InsightSummaryCardMolecule, type InsightSummaryCardProps, type InsightSummaryItem, type JobProgress$2 as JobProgress, type KPIMetricCardMolecule, type KPIStatItem, KPIStatsCard, type KPIStatsCardMolecule, type KPIStatsCardProps, KbdAtom, type KbdAtomType, KeywordBundlesDisplay, KeywordBundlesEdit, Label, LabelAtom, type LabelAtomType, LayoutAtom, type LayoutAtomType, type LayoutDirection, type LineChartMolecule, LoadingOverlay, type LoadingOverlayMolecule, MCQCard, type MCQCardAtom, type MCQCardProps, type MCQOption, Menubar, MenubarCheckboxItem, MenubarContent, MenubarItem, MenubarLabel, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NextStepCard, type NextStepCardMolecule, type NextStepCardProps, type NextStepItem, NotificationList, type NotificationListMolecule, PXEngineRenderer, Pagination, PaginationAtom, type PaginationAtomType, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type PersonaSegment, type PieChartMolecule, PlatformIconGroup, type PlatformIconGroupMolecule, PlatformSelectDisplay, PlatformSelectEdit, PollCard, type PollCardMolecule, type PollCardProps, type PollOption, type PollingConfig, Popover, PopoverAtom, type PopoverAtomType, PopoverContent, PopoverTrigger, type PresentationFormats, PresentationJobCard, type PresentationJobCardProps, type PresentationJobOutput, type PriorityActionItem, PriorityActionsCard, type PriorityActionsCardMolecule, type PriorityActionsCardProps, Progress, ProgressAtom, type ProgressAtomType, type PullRequest, REGISTERED_COMPONENTS, RadioAtom, type RadioAtomType, RadioGroup, RadioGroupAtom, type RadioGroupAtomType, RadioGroupItem, RatingAtom, type RatingAtomType, RecommendationCard, type RecommendationCardMolecule, type RecommendationCardProps, type RepoItem, type ReportTheme, ResearchBriefCard, type ResearchBriefCardMolecule, type ResearchBriefCardProps, type ResearchBriefItem, type JobProgress$1 as ResearchJobProgress, ResearchReportJobCard, type ResearchReportJobCardProps, type ResearchReportJobOutput, ResizableAtom, type ResizableAtomType, ResizablePanel, ResizablePanelGroup, RiskSignalCard, type RiskSignalCardMolecule, type RiskSignalCardProps, type RiskSignalItem, type RunSseConfig, ScoreBreakdownCard, type ScoreBreakdownCardMolecule, type ScoreBreakdownCardProps, type ScoreBreakdownItem, ScrollArea, ScrollAreaAtom, type ScrollAreaAtomType, ScrollBar, SearchSpecCard, type SearchSpecCardAtom, type SearchSpecCardProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeparatorAtom, type SeparatorAtomType, Sheet, SheetAtom, type SheetAtomType, SheetClose, type SheetColumn, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetRow, type SheetTabItem, SheetTitle, SheetTrigger, Skeleton, SkeletonAtom, type SkeletonAtomType, Slider, SliderAtom, type SliderAtomType, type SocialPost, SocialPostCard, type SocialPostCardProps, type SocialPostMolecule, Spinner, SpinnerAtom, type SpinnerAtomType, type SpreadsheetItem, type StackedBarChartMolecule, type StackedColumnChartMolecule, type StaleIssue, StatsGrid, type StatsGridMolecule, type StatusDetails, StepWizard, type StepWizardMolecule, Switch, SwitchAtom, type SwitchAtomType, Table, TableAtom, type TableAtomType, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsAtom, type TabsAtomType, TabsContent, TabsList, TabsTrigger, TagCloud, type TagCloudMolecule, TextAtom, type TextAtomType, type TextVariant, Textarea, TextareaAtom, type TimeSeriesChartMolecule, TimelineAtom, type TimelineAtomType, TimelineCard, type TimelineCardMolecule, type TimelineCardProps, type TimelineStep, type TimelineStepStatus, ToggleAtom, type ToggleAtomType, Tooltip, TooltipAtom, type TooltipAtomType, TooltipContent, TooltipProvider, TooltipTrigger, TopPostsGrid, type TopPostsGridMolecule, type TrendIndicatorMolecule, type UIAtom, type UIComponent, type UIMolecule, type UISchema, VideoAtom, type VideoAtomType, WebSearchJobCard, type WebSearchJobCardProps, type WebSearchJobOutput, type WebSearchResult, type WidgetTheme, WidgetThemeContext, cn, defaultFetchSelections, defaultPersistSelection, elementToQAField, formatQAMessage, generateFieldsFromData, generateFieldsFromPropDefinitions, isInputAtom, submitWidgetToAgent, th, useCreatorWidgetPolling, useWidgetTheme, withAlpha };
|
|
4172
|
+
export { Accordion, AccordionAtom, type AccordionAtomType, AccordionContent, AccordionItem, AccordionTrigger, ActionButton, type ActionButtonAtom, type ActionButtonProps, type ActionPriority, ActionPriorityCard, type ActionPriorityCardMolecule, type ActionPriorityCardProps, type ActionPriorityItem, Alert, AlertAtom, type AlertAtomType, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogAtom, type AlertDialogAtomType, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnalyticsChart, type AnalyticsChartMolecule, type AnalyticsChartProps, type AnalyticsSummaryCardMolecule, ApprovalCard, type ApprovalCardMolecule, type ApprovalCardProps, type ApprovalDetail, type ApprovalStatus, type AreaChartMolecule, ArrowToggleAtom, type ArrowToggleAtomType, AspectRatio, AspectRatioAtom, type AspectRatioAtomType, AudienceDemographicsCard, type AudienceDemographicsCardMolecule, AudienceMetricCard, type AudienceMetricCardMolecule, AudiencePersonaCard, type AudiencePersonaCardMolecule, type AudiencePersonaCardProps, Avatar, AvatarAtom, type AvatarAtomType, AvatarFallback, AvatarImage, Badge, BadgeAtom, type BadgeAtomType, type BarChartMolecule, type BaseAnalyticsChartMolecule, type BaseAtom, type BaseMolecule, type BranchCI, BrandAffinityGroup, type BrandAffinityGroupMolecule, Breadcrumb, BreadcrumbAtom, type BreadcrumbAtomType, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BudgetAllocCard, type BudgetAllocCardProps, type BudgetAllocItem, Button, type ButtonAction, ButtonAtom, type ButtonAtomType, type ButtonSize$1 as ButtonSize, type ButtonVariant$1 as ButtonVariant, Calendar, CalendarAtom, type CalendarAtomType, type CalendarEventAttendee, CalendarEventCard, type CalendarEventCardProps, type CalendarEventStatus, CampaignBriefCard, type CampaignBriefCardMolecule, type CampaignBriefCardProps, CampaignConceptCard, type CampaignConceptCardProps, CampaignSeedCard, type CampaignSeedCardAtom, type CampaignSeedCardProps, Card, CardAtom, type CardAtomType, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselAtom, type CarouselAtomType, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChannelPlanCard, type ChannelPlanCardMolecule, type ChannelPlanCardProps, type ChannelPlanItem, ChartAtom, type ChartAtomType, type ChartDataPoint, Checkbox, CheckboxAtom, type CheckboxAtomType, ChecklistCard, type ChecklistCardMolecule, type ChecklistCardProps, type ChecklistItem, Collapsible, CollapsibleAtom, type CollapsibleAtomType, CollapsibleContent, CollapsibleTrigger, type CollectedField, type ColumnChartMolecule, Command, CommandAtom, type CommandAtomType, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ComparativeChartMolecule, type ComparisonAttribute, ComparisonCard, type ComparisonCardProps, type ComparisonOption, ConfirmationCard, type ConfirmationCardMolecule, type ConfirmationCardProps, ContentPreviewGallery, type ContentPreviewGalleryMolecule, ContextMenu, ContextMenuAtom, type ContextMenuAtomType, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger, CountrySelectDisplay, CountrySelectEdit, CreatorActionHeader, type CreatorActionHeaderMolecule, CreatorCompactView, type CreatorCompactViewProps, type CreatorDetailData, CreatorExpandedPanel, CreatorGridCard, type CreatorGridCardMolecule, CreatorImageList, type CreatorImageListProps, CreatorProfileSummary, type CreatorProfileSummaryMolecule, CreatorProgressBar, type CreatorProgressBarProps, CreatorSearch, type CreatorSearchProps, type CreatorVersionData, CreatorWidget, type CreatorWidgetAction, type CreatorWidgetMolecule, type CreatorWidgetProps, CreatorWidgetSkeleton, type CreatorWidgetStatus, DataGrid, type DataGridMolecule, DataSourceChecklistCard, type DataSourceChecklistCardMolecule, type DataSourceChecklistCardProps, type DataSourceItem, DataTableCard, type DataTableCardMolecule, type DataTableCardProps, type DataTableColumn, Dialog, DialogAtom, type DialogAtomType, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, type DonutChartMolecule, Drawer, DrawerAtom, type DrawerAtomType, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuAtom, type DropdownMenuAtomType, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, DynamicFormCard, type DynamicFormCardMolecule, type DynamicFormCardProps, EditableField, type EditableFieldProps, EmptyState, type EmptyStateMolecule, FeedbackRatingCard, type FeedbackRatingCardMolecule, type FeedbackRatingCardProps, type FetchCreatorDetailsParams, type FetchStatusParams, type FetchVersionsParams, FileUpload, type FileUploadMolecule, FilterBar, type FilterBarMolecule, Form, FormCard, type FormCardProps, FormControl, FormDescription, FormField, FormInputAtom, type FormInputAtomType, FormItem, FormLabel, FormMessage, FormSelectAtom, type FormSelectAtomType, FormTextareaAtom, type FormTextareaAtomType, type FunnelChartMolecule, type GapSize, GitHubConnectCard, type GitHubConnectCardProps, type GitHubConnectMolecule, GitHubIssueTrackerCard, type GitHubIssueTrackerCardProps, type GitHubIssueTrackerMolecule, GitHubRepoHealthCard, type GitHubRepoHealthCardProps, type GitHubRepoHealthMolecule, GitHubReposListCard, type GitHubReposListCardProps, GoalAlignmentCard, type GoalAlignmentCardMolecule, type GoalAlignmentCardProps, type GoalAlignmentItem, GoogleSheetsCard, type GoogleSheetsCardProps, GoogleSheetsConnectCard, type GoogleSheetsConnectCardProps, GoogleSheetsListCard, type GoogleSheetsListCardProps, GrowthChartCard, type GrowthChartCardMolecule, type HeatmapChartMolecule, HoverCard, HoverCardContent, HoverCardTrigger, IconAtom, type IconAtomType, type IconName, Input, InputAtom, type InputAtomType, type InputElementLike, InputOTP, InputOTPAtom, type InputOTPAtomType, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputType, InputWidget, type InputWidgetField, type InputWidgetFieldKind, type InputWidgetType, InsightDigestCard, type InsightDigestCardMolecule, type InsightDigestCardProps, type InsightDigestItem, type InsightFinding, type InsightItemLike, InsightSummaryCard, type InsightSummaryCardMolecule, type InsightSummaryCardProps, type InsightSummaryItem, type JobProgress$2 as JobProgress, type KPIMetricCardMolecule, type KPIStatItem, KPIStatsCard, type KPIStatsCardMolecule, type KPIStatsCardProps, KbdAtom, type KbdAtomType, KeywordBundlesDisplay, KeywordBundlesEdit, Label, LabelAtom, type LabelAtomType, LayoutAtom, type LayoutAtomType, type LayoutDirection, type LineChartMolecule, LoadingOverlay, type LoadingOverlayMolecule, MCQCard, type MCQCardAtom, type MCQCardProps, type MCQOption, Menubar, MenubarCheckboxItem, MenubarContent, MenubarItem, MenubarLabel, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NextStepCard, type NextStepCardMolecule, type NextStepCardProps, type NextStepItem, NotificationList, type NotificationListMolecule, PXEngineRenderer, Pagination, PaginationAtom, type PaginationAtomType, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type PersonaSegment, type PieChartMolecule, PlatformIconGroup, type PlatformIconGroupMolecule, PlatformSelectDisplay, PlatformSelectEdit, PollCard, type PollCardMolecule, type PollCardProps, type PollOption, type PollingConfig, Popover, PopoverAtom, type PopoverAtomType, PopoverContent, PopoverTrigger, type PresentationFormats, PresentationJobCard, type PresentationJobCardProps, type PresentationJobOutput, type PriorityActionItem, PriorityActionsCard, type PriorityActionsCardMolecule, type PriorityActionsCardProps, Progress, ProgressAtom, type ProgressAtomType, type PullRequest, REGISTERED_COMPONENTS, RadioAtom, type RadioAtomType, RadioGroup, RadioGroupAtom, type RadioGroupAtomType, RadioGroupItem, RatingAtom, type RatingAtomType, RecommendationCard, type RecommendationCardMolecule, type RecommendationCardProps, type RepoItem, type ReportTheme, ResearchBriefCard, type ResearchBriefCardMolecule, type ResearchBriefCardProps, type ResearchBriefItem, type JobProgress$1 as ResearchJobProgress, ResearchReportJobCard, type ResearchReportJobCardProps, type ResearchReportJobOutput, ResizableAtom, type ResizableAtomType, ResizablePanel, ResizablePanelGroup, RiskSignalCard, type RiskSignalCardMolecule, type RiskSignalCardProps, type RiskSignalItem, type RunSseConfig, ScoreBreakdownCard, type ScoreBreakdownCardMolecule, type ScoreBreakdownCardProps, type ScoreBreakdownItem, ScrollArea, ScrollAreaAtom, type ScrollAreaAtomType, ScrollBar, SearchSpecCard, type SearchSpecCardAtom, type SearchSpecCardProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeparatorAtom, type SeparatorAtomType, Sheet, SheetAtom, type SheetAtomType, SheetClose, type SheetColumn, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetRow, type SheetTabItem, SheetTitle, SheetTrigger, Skeleton, SkeletonAtom, type SkeletonAtomType, Slider, SliderAtom, type SliderAtomType, type SocialPost, SocialPostCard, type SocialPostCardProps, type SocialPostMolecule, Spinner, SpinnerAtom, type SpinnerAtomType, type SpreadsheetItem, type StackedBarChartMolecule, type StackedColumnChartMolecule, type StaleIssue, StatsGrid, type StatsGridMolecule, type StatusDetails, StepWizard, type StepWizardMolecule, Switch, SwitchAtom, type SwitchAtomType, Table, TableAtom, type TableAtomType, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsAtom, type TabsAtomType, TabsContent, TabsList, TabsTrigger, TagCloud, type TagCloudMolecule, TextAtom, type TextAtomType, type TextVariant, Textarea, TextareaAtom, type TimeSeriesChartMolecule, TimelineAtom, type TimelineAtomType, TimelineCard, type TimelineCardMolecule, type TimelineCardProps, type TimelineStep, type TimelineStepStatus, ToggleAtom, type ToggleAtomType, Tooltip, TooltipAtom, type TooltipAtomType, TooltipContent, TooltipProvider, TooltipTrigger, TopPostsGrid, type TopPostsGridMolecule, type TrendIndicatorMolecule, type UIAtom, type UIComponent, type UIMolecule, type UISchema, VideoAtom, type VideoAtomType, WebSearchJobCard, type WebSearchJobCardProps, type WebSearchJobOutput, type WebSearchResult, type WidgetTheme, WidgetThemeContext, cn, defaultFetchSelections, defaultPersistSelection, elementToQAField, formatQAMessage, generateFieldsFromData, generateFieldsFromPropDefinitions, isInputAtom, submitWidgetToAgent, th, useCreatorWidgetPolling, useWidgetTheme, withAlpha };
|
package/dist/index.mjs
CHANGED
|
@@ -38373,27 +38373,39 @@ function normalizeConfidence(c) {
|
|
|
38373
38373
|
if (v.startsWith("l")) return "Low";
|
|
38374
38374
|
return void 0;
|
|
38375
38375
|
}
|
|
38376
|
+
function coerceItem(it, cardConfidence) {
|
|
38377
|
+
if (typeof it === "string") {
|
|
38378
|
+
const idx = it.indexOf(":");
|
|
38379
|
+
if (idx > 0 && idx < 60) {
|
|
38380
|
+
return {
|
|
38381
|
+
label: it.slice(0, idx).trim(),
|
|
38382
|
+
value: it.slice(idx + 1).trim(),
|
|
38383
|
+
confidence: normalizeConfidence(cardConfidence)
|
|
38384
|
+
};
|
|
38385
|
+
}
|
|
38386
|
+
return { label: it, value: "", confidence: normalizeConfidence(cardConfidence) };
|
|
38387
|
+
}
|
|
38388
|
+
return {
|
|
38389
|
+
label: it?.label ?? it?.finding ?? it?.metric ?? it?.title ?? it?.insight ?? "",
|
|
38390
|
+
value: it?.value ?? it?.data_point ?? it?.detail ?? it?.description ?? "",
|
|
38391
|
+
confidence: normalizeConfidence(it?.confidence ?? cardConfidence)
|
|
38392
|
+
};
|
|
38393
|
+
}
|
|
38376
38394
|
function resolveItems(props) {
|
|
38377
38395
|
const cardConfidence = props.confidence;
|
|
38378
|
-
|
|
38379
|
-
|
|
38380
|
-
|
|
38381
|
-
|
|
38382
|
-
|
|
38383
|
-
|
|
38384
|
-
|
|
38385
|
-
if (
|
|
38386
|
-
|
|
38387
|
-
label: f?.finding ?? f?.label ?? "",
|
|
38388
|
-
value: f?.data_point ?? f?.value ?? "",
|
|
38389
|
-
confidence: normalizeConfidence(f?.confidence ?? cardConfidence)
|
|
38390
|
-
}));
|
|
38391
|
-
}
|
|
38392
|
-
return [];
|
|
38396
|
+
const source = [
|
|
38397
|
+
props.insights,
|
|
38398
|
+
props.key_findings,
|
|
38399
|
+
props.key_insights,
|
|
38400
|
+
props.findings,
|
|
38401
|
+
props.items
|
|
38402
|
+
].find((a) => Array.isArray(a) && a.length > 0);
|
|
38403
|
+
if (!source) return [];
|
|
38404
|
+
return source.map((it) => coerceItem(it, cardConfidence));
|
|
38393
38405
|
}
|
|
38394
38406
|
var InsightSummaryCard = (props) => {
|
|
38395
38407
|
const { title, className } = props;
|
|
38396
|
-
const summary = props.summary ?? props.executive_summary;
|
|
38408
|
+
const summary = props.summary ?? props.executive_summary ?? props.thesis ?? props.subtitle;
|
|
38397
38409
|
const items = resolveItems(props);
|
|
38398
38410
|
return /* @__PURE__ */ jsxs95(
|
|
38399
38411
|
"div",
|
|
@@ -38961,7 +38973,7 @@ var ExportModal = ({ formats, title, onClose }) => {
|
|
|
38961
38973
|
);
|
|
38962
38974
|
})
|
|
38963
38975
|
] }),
|
|
38964
|
-
/* @__PURE__ */ jsx147("p", { className: "text-xs text-zinc-600 mt-4 text-center", children: "Download links expire in
|
|
38976
|
+
/* @__PURE__ */ jsx147("p", { className: "text-xs text-zinc-600 mt-4 text-center", children: "Download links expire in 90 days" })
|
|
38965
38977
|
] })
|
|
38966
38978
|
] });
|
|
38967
38979
|
};
|
|
@@ -39531,6 +39543,19 @@ var ExpandIcon2 = () => /* @__PURE__ */ jsxs109("svg", { width: "14", height: "1
|
|
|
39531
39543
|
/* @__PURE__ */ jsx148("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
39532
39544
|
/* @__PURE__ */ jsx148("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
39533
39545
|
] });
|
|
39546
|
+
var ShareIcon2 = () => /* @__PURE__ */ jsxs109("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39547
|
+
/* @__PURE__ */ jsx148("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
|
|
39548
|
+
/* @__PURE__ */ jsx148("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
|
|
39549
|
+
] });
|
|
39550
|
+
var CheckIcon2 = () => /* @__PURE__ */ jsx148("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx148("polyline", { points: "20 6 9 17 4 12" }) });
|
|
39551
|
+
var RefreshIcon = () => /* @__PURE__ */ jsxs109("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39552
|
+
/* @__PURE__ */ jsx148("polyline", { points: "23 4 23 10 17 10" }),
|
|
39553
|
+
/* @__PURE__ */ jsx148("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })
|
|
39554
|
+
] });
|
|
39555
|
+
function formatTemplateLabel(templateId) {
|
|
39556
|
+
if (!templateId) return null;
|
|
39557
|
+
return templateId.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
39558
|
+
}
|
|
39534
39559
|
var FullscreenPreviewModal = ({ url, title, onClose }) => {
|
|
39535
39560
|
useEffect7(() => {
|
|
39536
39561
|
const onKey = (e) => {
|
|
@@ -39576,7 +39601,7 @@ var FullscreenPreviewModal = ({ url, title, onClose }) => {
|
|
|
39576
39601
|
};
|
|
39577
39602
|
var ResearchReportJobCard = (props) => {
|
|
39578
39603
|
const {
|
|
39579
|
-
job_id
|
|
39604
|
+
job_id,
|
|
39580
39605
|
title: initialTitle,
|
|
39581
39606
|
status: initialStatus,
|
|
39582
39607
|
topic: _initialTopic,
|
|
@@ -39587,11 +39612,18 @@ var ResearchReportJobCard = (props) => {
|
|
|
39587
39612
|
executive_summary: initialSummary,
|
|
39588
39613
|
key_findings: _initialFindings,
|
|
39589
39614
|
html_url: initialHtmlUrl,
|
|
39615
|
+
generation_mode: initialGenerationMode,
|
|
39616
|
+
template_id: initialTemplateId,
|
|
39617
|
+
template_version_id: initialTemplateVersionId,
|
|
39618
|
+
review_status: initialReviewStatus,
|
|
39590
39619
|
theme: initialTheme,
|
|
39591
39620
|
error: initialError,
|
|
39592
39621
|
progress: initialProgress,
|
|
39593
39622
|
pollUrl,
|
|
39594
39623
|
authToken,
|
|
39624
|
+
shareUrl,
|
|
39625
|
+
approveUrl,
|
|
39626
|
+
regenerateUrl,
|
|
39595
39627
|
className,
|
|
39596
39628
|
onComplete,
|
|
39597
39629
|
onFailed,
|
|
@@ -39606,11 +39638,23 @@ var ResearchReportJobCard = (props) => {
|
|
|
39606
39638
|
const [wordCount, setWordCount] = useState11(initialWordCount ?? 0);
|
|
39607
39639
|
const [summary, setSummary] = useState11(initialSummary || "");
|
|
39608
39640
|
const [htmlUrl, setHtmlUrl] = useState11(initialHtmlUrl || "");
|
|
39641
|
+
const [generationMode, setGenerationMode] = useState11(
|
|
39642
|
+
initialGenerationMode || (initialHtmlUrl ? "template" : "")
|
|
39643
|
+
);
|
|
39644
|
+
const [templateId, setTemplateId] = useState11(initialTemplateId || "");
|
|
39645
|
+
const [templateVersionId, setTemplateVersionId] = useState11(initialTemplateVersionId || "");
|
|
39646
|
+
const [reviewStatus, setReviewStatus] = useState11(
|
|
39647
|
+
initialReviewStatus || (initialHtmlUrl ? "pending_review" : "")
|
|
39648
|
+
);
|
|
39609
39649
|
const [theme, setTheme] = useState11(initialTheme || DEFAULT_THEME);
|
|
39610
39650
|
const [error, setError] = useState11(initialError);
|
|
39611
39651
|
const [progress, setProgress] = useState11(initialProgress);
|
|
39612
39652
|
const [showPreview, setShowPreview] = useState11(false);
|
|
39613
39653
|
const [previewScale, setPreviewScale] = useState11(1);
|
|
39654
|
+
const [copied, setCopied] = useState11(false);
|
|
39655
|
+
const [approving, setApproving] = useState11(false);
|
|
39656
|
+
const [regenerating, setRegenerating] = useState11(false);
|
|
39657
|
+
const [approveError, setApproveError] = useState11(null);
|
|
39614
39658
|
const previewRef = useRef6(null);
|
|
39615
39659
|
const intervalRef = useRef6(null);
|
|
39616
39660
|
const onCompleteRef = useRef6(onComplete);
|
|
@@ -39628,6 +39672,18 @@ var ResearchReportJobCard = (props) => {
|
|
|
39628
39672
|
useEffect7(() => {
|
|
39629
39673
|
if (initialHtmlUrl) setHtmlUrl(initialHtmlUrl);
|
|
39630
39674
|
}, [initialHtmlUrl]);
|
|
39675
|
+
useEffect7(() => {
|
|
39676
|
+
if (initialGenerationMode) setGenerationMode(initialGenerationMode);
|
|
39677
|
+
}, [initialGenerationMode]);
|
|
39678
|
+
useEffect7(() => {
|
|
39679
|
+
if (initialTemplateId) setTemplateId(initialTemplateId);
|
|
39680
|
+
}, [initialTemplateId]);
|
|
39681
|
+
useEffect7(() => {
|
|
39682
|
+
if (initialTemplateVersionId) setTemplateVersionId(initialTemplateVersionId);
|
|
39683
|
+
}, [initialTemplateVersionId]);
|
|
39684
|
+
useEffect7(() => {
|
|
39685
|
+
if (initialReviewStatus) setReviewStatus(initialReviewStatus);
|
|
39686
|
+
}, [initialReviewStatus]);
|
|
39631
39687
|
useEffect7(() => {
|
|
39632
39688
|
if (initialDepth) setDepth(initialDepth);
|
|
39633
39689
|
}, [initialDepth]);
|
|
@@ -39695,6 +39751,10 @@ var ResearchReportJobCard = (props) => {
|
|
|
39695
39751
|
setWordCount(output.word_count || 0);
|
|
39696
39752
|
setSummary(output.executive_summary || "");
|
|
39697
39753
|
setHtmlUrl(output.html_url || "");
|
|
39754
|
+
if (output.generation_mode) setGenerationMode(output.generation_mode);
|
|
39755
|
+
if (output.template_id) setTemplateId(output.template_id);
|
|
39756
|
+
if (output.template_version_id) setTemplateVersionId(output.template_version_id);
|
|
39757
|
+
if (output.review_status) setReviewStatus(output.review_status);
|
|
39698
39758
|
if (output.theme) {
|
|
39699
39759
|
setTheme(output.theme);
|
|
39700
39760
|
}
|
|
@@ -39876,6 +39936,120 @@ var ResearchReportJobCard = (props) => {
|
|
|
39876
39936
|
window.open(htmlUrl, "_blank", "noopener,noreferrer");
|
|
39877
39937
|
}
|
|
39878
39938
|
};
|
|
39939
|
+
const resolveShareLink = () => {
|
|
39940
|
+
if (shareUrl) return shareUrl;
|
|
39941
|
+
if (typeof window !== "undefined" && job_id) {
|
|
39942
|
+
return `${window.location.origin}/r/${job_id}`;
|
|
39943
|
+
}
|
|
39944
|
+
return htmlUrl;
|
|
39945
|
+
};
|
|
39946
|
+
const handleShare = async () => {
|
|
39947
|
+
const link = resolveShareLink();
|
|
39948
|
+
if (!link) return;
|
|
39949
|
+
try {
|
|
39950
|
+
await navigator.clipboard.writeText(link);
|
|
39951
|
+
setCopied(true);
|
|
39952
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
39953
|
+
} catch {
|
|
39954
|
+
window.open(link, "_blank", "noopener,noreferrer");
|
|
39955
|
+
}
|
|
39956
|
+
};
|
|
39957
|
+
const canApprove = generationMode === "template" && reviewStatus === "pending_review" && Boolean(job_id);
|
|
39958
|
+
const canRegenerate = generationMode === "template" && reviewStatus === "pending_review" && Boolean(job_id);
|
|
39959
|
+
const canShare = Boolean(hasHTML || job_id) && (generationMode !== "template" || reviewStatus !== "pending_review");
|
|
39960
|
+
const handleApprove = async () => {
|
|
39961
|
+
if (!job_id || approving) return;
|
|
39962
|
+
const endpoint = approveUrl || `/api/reports/${job_id}/approve`;
|
|
39963
|
+
setApproving(true);
|
|
39964
|
+
setApproveError(null);
|
|
39965
|
+
try {
|
|
39966
|
+
const headers = { "Content-Type": "application/json" };
|
|
39967
|
+
if (authToken) headers.Authorization = `Bearer ${authToken}`;
|
|
39968
|
+
const res = await fetch(endpoint, {
|
|
39969
|
+
method: "POST",
|
|
39970
|
+
headers,
|
|
39971
|
+
body: JSON.stringify({ label: title })
|
|
39972
|
+
});
|
|
39973
|
+
if (!res.ok) {
|
|
39974
|
+
const err = await res.json().catch(() => ({}));
|
|
39975
|
+
throw new Error(err.detail || err.error || `Approve failed (${res.status})`);
|
|
39976
|
+
}
|
|
39977
|
+
const data = await res.json();
|
|
39978
|
+
const newStatus = data.review_status || "approved";
|
|
39979
|
+
setReviewStatus(newStatus);
|
|
39980
|
+
if (data.template_version_id) setTemplateVersionId(data.template_version_id);
|
|
39981
|
+
if (data.template_id) setTemplateId(data.template_id);
|
|
39982
|
+
if (onCompleteRef.current) {
|
|
39983
|
+
onCompleteRef.current({
|
|
39984
|
+
title,
|
|
39985
|
+
depth,
|
|
39986
|
+
section_count: sectionCount,
|
|
39987
|
+
source_count: sourceCount,
|
|
39988
|
+
word_count: wordCount,
|
|
39989
|
+
executive_summary: summary,
|
|
39990
|
+
html_url: htmlUrl,
|
|
39991
|
+
generation_mode: generationMode,
|
|
39992
|
+
template_id: data.template_id || templateId,
|
|
39993
|
+
template_version_id: data.template_version_id || templateVersionId,
|
|
39994
|
+
review_status: newStatus,
|
|
39995
|
+
theme
|
|
39996
|
+
});
|
|
39997
|
+
}
|
|
39998
|
+
} catch (e) {
|
|
39999
|
+
setApproveError(e instanceof Error ? e.message : "Could not save report version");
|
|
40000
|
+
} finally {
|
|
40001
|
+
setApproving(false);
|
|
40002
|
+
}
|
|
40003
|
+
};
|
|
40004
|
+
const handleRegenerate = async () => {
|
|
40005
|
+
if (!job_id || regenerating) return;
|
|
40006
|
+
const endpoint = regenerateUrl || `/api/reports/${job_id}/regenerate`;
|
|
40007
|
+
setRegenerating(true);
|
|
40008
|
+
setApproveError(null);
|
|
40009
|
+
try {
|
|
40010
|
+
const headers = { "Content-Type": "application/json" };
|
|
40011
|
+
if (authToken) headers.Authorization = `Bearer ${authToken}`;
|
|
40012
|
+
const res = await fetch(endpoint, {
|
|
40013
|
+
method: "POST",
|
|
40014
|
+
headers,
|
|
40015
|
+
body: JSON.stringify({})
|
|
40016
|
+
});
|
|
40017
|
+
if (!res.ok) {
|
|
40018
|
+
const err = await res.json().catch(() => ({}));
|
|
40019
|
+
throw new Error(err.detail || err.error || `Regenerate failed (${res.status})`);
|
|
40020
|
+
}
|
|
40021
|
+
const data = await res.json();
|
|
40022
|
+
const out = data.output || data;
|
|
40023
|
+
if (out.html_url) setHtmlUrl(out.html_url);
|
|
40024
|
+
if (data.template_id || out.template_id) setTemplateId(data.template_id || out.template_id);
|
|
40025
|
+
setReviewStatus("pending_review");
|
|
40026
|
+
setTemplateVersionId("");
|
|
40027
|
+
if (out.section_count !== void 0) setSectionCount(out.section_count);
|
|
40028
|
+
if (out.title) setTitle(out.title);
|
|
40029
|
+
if (onCompleteRef.current) {
|
|
40030
|
+
onCompleteRef.current({
|
|
40031
|
+
title: out.title || title,
|
|
40032
|
+
depth,
|
|
40033
|
+
section_count: out.section_count ?? sectionCount,
|
|
40034
|
+
source_count: sourceCount,
|
|
40035
|
+
word_count: wordCount,
|
|
40036
|
+
executive_summary: summary,
|
|
40037
|
+
html_url: out.html_url || htmlUrl,
|
|
40038
|
+
generation_mode: "template",
|
|
40039
|
+
template_id: data.template_id || out.template_id || templateId,
|
|
40040
|
+
template_version_id: void 0,
|
|
40041
|
+
review_status: "pending_review",
|
|
40042
|
+
theme
|
|
40043
|
+
});
|
|
40044
|
+
}
|
|
40045
|
+
} catch (e) {
|
|
40046
|
+
setApproveError(e instanceof Error ? e.message : "Could not switch template");
|
|
40047
|
+
} finally {
|
|
40048
|
+
setRegenerating(false);
|
|
40049
|
+
}
|
|
40050
|
+
};
|
|
40051
|
+
const templateLabel = formatTemplateLabel(templateId);
|
|
40052
|
+
const isApproved = reviewStatus === "approved";
|
|
39879
40053
|
return /* @__PURE__ */ jsxs109(Fragment6, { children: [
|
|
39880
40054
|
/* @__PURE__ */ jsx148("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs109("div", { className: "bg-zinc-900 border border-zinc-800 rounded-2xl overflow-hidden", children: [
|
|
39881
40055
|
/* @__PURE__ */ jsx148(
|
|
@@ -39909,10 +40083,53 @@ var ResearchReportJobCard = (props) => {
|
|
|
39909
40083
|
depth && sectionCount > 0 && " \xB7 ",
|
|
39910
40084
|
sectionCount > 0 && `${sectionCount} sections`,
|
|
39911
40085
|
sourceCount > 0 && ` \xB7 ${sourceCount} sources`,
|
|
39912
|
-
wordCount > 0 && ` \xB7 ${formatWordCount(wordCount)} words
|
|
39913
|
-
|
|
40086
|
+
wordCount > 0 && ` \xB7 ${formatWordCount(wordCount)} words`,
|
|
40087
|
+
templateLabel && ` \xB7 ${templateLabel}`
|
|
40088
|
+
] }),
|
|
40089
|
+
generationMode === "template" && /* @__PURE__ */ jsx148("p", { className: "text-xs mt-1", children: isApproved ? /* @__PURE__ */ jsx148("span", { className: "text-emerald-400/90", children: "Approved \u2014 future reports use this format" }) : reviewStatus === "pending_review" ? /* @__PURE__ */ jsx148("span", { className: "text-amber-400/90", children: "Review this report, then approve to lock the layout" }) : null })
|
|
39914
40090
|
] }),
|
|
39915
|
-
/* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-1.5 flex-shrink-0", children: [
|
|
40091
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-1.5 flex-shrink-0 flex-wrap justify-end", children: [
|
|
40092
|
+
canRegenerate && /* @__PURE__ */ jsxs109(
|
|
40093
|
+
"button",
|
|
40094
|
+
{
|
|
40095
|
+
onClick: handleRegenerate,
|
|
40096
|
+
disabled: regenerating || approving,
|
|
40097
|
+
title: "Try another report template with the same data",
|
|
40098
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 rounded-lg border border-zinc-700 bg-zinc-800 hover:border-zinc-500 text-zinc-300 text-xs font-medium transition-colors disabled:opacity-50",
|
|
40099
|
+
children: [
|
|
40100
|
+
/* @__PURE__ */ jsx148(RefreshIcon, {}),
|
|
40101
|
+
/* @__PURE__ */ jsx148("span", { children: regenerating ? "Switching..." : "Regenerate" })
|
|
40102
|
+
]
|
|
40103
|
+
}
|
|
40104
|
+
),
|
|
40105
|
+
canApprove && /* @__PURE__ */ jsxs109(
|
|
40106
|
+
"button",
|
|
40107
|
+
{
|
|
40108
|
+
onClick: handleApprove,
|
|
40109
|
+
disabled: approving,
|
|
40110
|
+
title: "Approve and save this report format for future runs",
|
|
40111
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 rounded-lg border border-emerald-700/50 bg-emerald-950/40 hover:border-emerald-500 text-emerald-300 text-xs font-medium transition-colors disabled:opacity-50",
|
|
40112
|
+
children: [
|
|
40113
|
+
/* @__PURE__ */ jsx148(CheckIcon2, {}),
|
|
40114
|
+
/* @__PURE__ */ jsx148("span", { children: approving ? "Saving..." : "Approve" })
|
|
40115
|
+
]
|
|
40116
|
+
}
|
|
40117
|
+
),
|
|
40118
|
+
isApproved && /* @__PURE__ */ jsx148("span", { className: "flex items-center justify-center w-7 h-7 rounded-lg border border-emerald-500/40 bg-emerald-500/10 text-emerald-400", title: "Format saved", children: /* @__PURE__ */ jsx148(CheckIcon2, {}) }),
|
|
40119
|
+
/* @__PURE__ */ jsx148(
|
|
40120
|
+
"button",
|
|
40121
|
+
{
|
|
40122
|
+
onClick: handleShare,
|
|
40123
|
+
disabled: !canShare,
|
|
40124
|
+
title: !canShare && reviewStatus === "pending_review" ? "Approve the report to enable sharing" : copied ? "Copied!" : "Copy shareable link",
|
|
40125
|
+
className: cn(
|
|
40126
|
+
"w-7 h-7 rounded-lg border flex items-center justify-center transition-all",
|
|
40127
|
+
copied ? "border-green-500/40 bg-green-500/10 text-green-400" : "border-zinc-700 bg-zinc-800 text-zinc-400 hover:border-zinc-500 hover:text-zinc-200",
|
|
40128
|
+
"disabled:opacity-30 disabled:cursor-not-allowed"
|
|
40129
|
+
),
|
|
40130
|
+
children: copied ? /* @__PURE__ */ jsx148(CheckIcon2, {}) : /* @__PURE__ */ jsx148(ShareIcon2, {})
|
|
40131
|
+
}
|
|
40132
|
+
),
|
|
39916
40133
|
/* @__PURE__ */ jsxs109(
|
|
39917
40134
|
"button",
|
|
39918
40135
|
{
|
|
@@ -39943,6 +40160,7 @@ var ResearchReportJobCard = (props) => {
|
|
|
39943
40160
|
)
|
|
39944
40161
|
] })
|
|
39945
40162
|
] }),
|
|
40163
|
+
approveError && /* @__PURE__ */ jsx148("p", { className: "mt-3 text-xs text-red-400/90", children: approveError }),
|
|
39946
40164
|
hasHTML && !compact && /* @__PURE__ */ jsx148("div", { className: "mt-4", children: /* @__PURE__ */ jsxs109(
|
|
39947
40165
|
"div",
|
|
39948
40166
|
{
|
|
@@ -43416,7 +43634,7 @@ function PlatformMetricsBanner({
|
|
|
43416
43634
|
return /* @__PURE__ */ jsxs132(
|
|
43417
43635
|
"div",
|
|
43418
43636
|
{
|
|
43419
|
-
className: "\n grid grid-cols-1 gap-3 rounded-xl py-4 px-4 shadow-sm\n md:flex md:overflow-x-auto md:gap-6 md:rounded-l-xl md:py-4 md:px-4 md:items-center md:gap-0 md:px-0 md:ml-8\n ",
|
|
43637
|
+
className: "\r\n grid grid-cols-1 gap-3 rounded-xl py-4 px-4 shadow-sm\r\n md:flex md:overflow-x-auto md:gap-6 md:rounded-l-xl md:py-4 md:px-4 md:items-center md:gap-0 md:px-0 md:ml-8\r\n ",
|
|
43420
43638
|
style: { backgroundColor: bgColor },
|
|
43421
43639
|
children: [
|
|
43422
43640
|
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col items-center md:min-w-0", children: [
|