@flytedan/flytebot-design-system 0.78.1 → 0.80.0
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.cjs +546 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +222 -1
- package/dist/index.d.ts +222 -1
- package/dist/index.js +519 -142
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +3 -0
package/dist/index.d.cts
CHANGED
|
@@ -1296,6 +1296,9 @@ type DataTableColumn = DataTableColumnLabel & {
|
|
|
1296
1296
|
key: string;
|
|
1297
1297
|
/** Right-aligned tabular figures. Never center a number. */
|
|
1298
1298
|
numeric?: boolean;
|
|
1299
|
+
/** Keeps this column's values on one line, in the table cell and in the phone card's meta line, so a value
|
|
1300
|
+
* like "FOIA 2025-26" never breaks at its hyphen. A table too narrow for it scrolls sideways in its own wrapper. */
|
|
1301
|
+
noWrap?: boolean;
|
|
1299
1302
|
/** Set widths explicitly; auto layout shifts as data arrives. */
|
|
1300
1303
|
width?: string;
|
|
1301
1304
|
sortable?: boolean;
|
|
@@ -4730,6 +4733,67 @@ declare const TranscriptKit: {
|
|
|
4730
4733
|
groupMessages: typeof groupMessages;
|
|
4731
4734
|
};
|
|
4732
4735
|
|
|
4736
|
+
type QueryResultStatus = "queued" | "running" | "done" | "failed" | "canceled";
|
|
4737
|
+
declare const QUERY_EMPTY_MESSAGE = "No rows to show.";
|
|
4738
|
+
interface QueryResultCardProps {
|
|
4739
|
+
title: string;
|
|
4740
|
+
status: QueryResultStatus;
|
|
4741
|
+
/** ISO time the query started; a running query shows how long it has run, on a local clock ticking each second. */
|
|
4742
|
+
startedAt?: string | null;
|
|
4743
|
+
failureMessage?: string | null;
|
|
4744
|
+
/** Headline figures, already formatted. */
|
|
4745
|
+
facts?: Fact[];
|
|
4746
|
+
/** The preview's columns and rows. */
|
|
4747
|
+
columns?: DataTableColumn[];
|
|
4748
|
+
rows?: object[];
|
|
4749
|
+
/** The row field that identifies a row. */
|
|
4750
|
+
rowKey?: string;
|
|
4751
|
+
/** The card's own actions (an export button, say): rendered as given, so the card names no action of any app. */
|
|
4752
|
+
actions?: React.ReactNode;
|
|
4753
|
+
}
|
|
4754
|
+
/**
|
|
4755
|
+
* The live card of a background query an agent started, inside `PacketCard` (`AgentChatPanel`'s `packetRenderers`, with
|
|
4756
|
+
* `apply: false`: a query is never applied). The panel re-reads the thread on every poll while a turn runs, so the card
|
|
4757
|
+
* moves from queued to running to done or failed by itself. Presentational: pass the packet's fields.
|
|
4758
|
+
*/
|
|
4759
|
+
declare function QueryResultCard({ title, status, startedAt, failureMessage, facts, columns, rows, rowKey, actions, }: QueryResultCardProps): React.JSX.Element;
|
|
4760
|
+
|
|
4761
|
+
/** Where a background export is. */
|
|
4762
|
+
type ExportJobStatus = "PENDING" | "RUNNING" | "SUCCEEDED" | "FAILED";
|
|
4763
|
+
/** One background export, in the shape an app maps its own export rows to. The one shape the tray, the CSV card and the polling hook
|
|
4764
|
+
* all read, so a chat card and the tray never show two snapshots of the same export. */
|
|
4765
|
+
interface ExportJob {
|
|
4766
|
+
id: string;
|
|
4767
|
+
/** What the export was made from: the tray's card title. */
|
|
4768
|
+
title: string;
|
|
4769
|
+
/** What kind of export it is: the tray's card note. */
|
|
4770
|
+
note?: string;
|
|
4771
|
+
/** The name the downloaded file carries. */
|
|
4772
|
+
fileName: string;
|
|
4773
|
+
status: ExportJobStatus;
|
|
4774
|
+
rowCount: number | null;
|
|
4775
|
+
/** Set only once SUCCEEDED: when the download stops being available. */
|
|
4776
|
+
expiresAt: string | null;
|
|
4777
|
+
failureMessage: string | null;
|
|
4778
|
+
}
|
|
4779
|
+
declare function isLiveExport(job: ExportJob): boolean;
|
|
4780
|
+
declare function isExpiredExport(job: ExportJob, now: number): boolean;
|
|
4781
|
+
|
|
4782
|
+
declare const CSV_FAILED_FALLBACK = "The CSV could not be made.";
|
|
4783
|
+
declare const CSV_KEPT_NOTE = "Kept 24 hours";
|
|
4784
|
+
interface CsvCardProps {
|
|
4785
|
+
/** The export as the card should show it. */
|
|
4786
|
+
job: ExportJob;
|
|
4787
|
+
/** Takes the file. Download is on only while the export is ready; the button shows busy until this settles. */
|
|
4788
|
+
onDownload: (id: string) => Promise<void>;
|
|
4789
|
+
}
|
|
4790
|
+
/**
|
|
4791
|
+
* The live card of a CSV an agent made (or the person made from a query card), for `AgentChatPanel`'s `packetRenderers`
|
|
4792
|
+
* with `apply: false`: a file is downloaded, never applied. Presentational: the export's state is the `job` it is given,
|
|
4793
|
+
* and a ready file turns expired by itself at the moment it expires while the card is open.
|
|
4794
|
+
*/
|
|
4795
|
+
declare function CsvCard({ job, onDownload }: CsvCardProps): React.JSX.Element;
|
|
4796
|
+
|
|
4733
4797
|
/** Kept modest on purpose: this is a PREVIEW, not a document viewer. A file past this
|
|
4734
4798
|
* many characters still opens — it just shows its first slice, same as CodeBlock's own
|
|
4735
4799
|
* line fold for a long file. */
|
|
@@ -5602,4 +5666,161 @@ declare function usePublishCornerStackOffset(ref: React.RefObject<HTMLElement |
|
|
|
5602
5666
|
/** Marks the document while a side-panel sheet is open. */
|
|
5603
5667
|
declare function useSheetOpenMark(active: boolean): void;
|
|
5604
5668
|
|
|
5605
|
-
|
|
5669
|
+
/** How long one chat call may take before it fails visibly instead of leaving the conversation waiting for ever. */
|
|
5670
|
+
declare const CHAT_CALL_DEADLINE_MS = 30000;
|
|
5671
|
+
declare class CallDeadlineError extends Error {
|
|
5672
|
+
readonly call: string;
|
|
5673
|
+
readonly deadlineMs: number;
|
|
5674
|
+
constructor(call: string, deadlineMs: number);
|
|
5675
|
+
}
|
|
5676
|
+
/** Settles as `work` does, or rejects with a `CallDeadlineError` once `deadlineMs` has passed with no answer. The work
|
|
5677
|
+
* itself is not cancelled (an app's client may offer no way to); the caller just stops waiting. */
|
|
5678
|
+
declare function withDeadline<T>(call: string, deadlineMs: number, work: Promise<T>): Promise<T>;
|
|
5679
|
+
|
|
5680
|
+
/** The exact string the chat engine matches to show its "isn't reachable" state (never substring sniffing). */
|
|
5681
|
+
declare const CHAT_UNAVAILABLE_MESSAGE = "chat_unavailable";
|
|
5682
|
+
/** What a transport throws when it could not reach its api at all, so the adapter can tell an unreachable chat from a
|
|
5683
|
+
* server's own stable error code (which the panel matches by exact equality and the adapter never rewrites). */
|
|
5684
|
+
declare class ChatUnreachableError extends Error {
|
|
5685
|
+
constructor(message?: string);
|
|
5686
|
+
}
|
|
5687
|
+
interface ChatThreadRef {
|
|
5688
|
+
thread_id: string;
|
|
5689
|
+
}
|
|
5690
|
+
/** The page the chat is opened on, as the engine passes it when it resolves a thread. */
|
|
5691
|
+
interface ChatThreadContext {
|
|
5692
|
+
contextType: string;
|
|
5693
|
+
contextId: string;
|
|
5694
|
+
}
|
|
5695
|
+
/** A turn the app runs as a dispatch: start it, then the engine polls its status until it ends. */
|
|
5696
|
+
interface PollingTurns {
|
|
5697
|
+
/** Starts a turn (a dispatch, not a stream) and answers the job id the engine tracks. `attachments` are the files the
|
|
5698
|
+
* person added; a transport that cannot carry them must throw rather than drop them. */
|
|
5699
|
+
startTurn: (threadId: string, text: string, attachments?: Attachment[]) => Promise<{
|
|
5700
|
+
jobId: string;
|
|
5701
|
+
}>;
|
|
5702
|
+
/** The turn's status, or null when the server no longer knows the turn. */
|
|
5703
|
+
getTurn: (jobId: string) => Promise<JobStatus | null>;
|
|
5704
|
+
streamTurn?: never;
|
|
5705
|
+
}
|
|
5706
|
+
/** A turn the app runs as one live stream: the engine appends what `handlers` are given, and Stop aborts `signal`. */
|
|
5707
|
+
interface StreamingTurns {
|
|
5708
|
+
/** Runs the turn to its end. It resolves the turn's final result (no `job_id`: a streaming chat has no turn status
|
|
5709
|
+
* to poll) and throws `ChatUnreachableError` when the api cannot be reached. It carries no deadline: a live stream
|
|
5710
|
+
* may run as long as the turn does. */
|
|
5711
|
+
streamTurn: (threadId: string, text: string, handlers: StreamHandlers, signal: AbortSignal, attachments?: Attachment[]) => Promise<SendMessageResult>;
|
|
5712
|
+
startTurn?: never;
|
|
5713
|
+
getTurn?: never;
|
|
5714
|
+
}
|
|
5715
|
+
/**
|
|
5716
|
+
* What an app supplies to put a chat on the design system's panel: its own request client and its own mapping from its
|
|
5717
|
+
* wire onto the design system's generic `ChatMessage`, `JobStatus` and `ThreadSummary`. The design system names no route,
|
|
5718
|
+
* client or wire type; each member is the app's call, answering the generic shape. Its turns are either polled
|
|
5719
|
+
* (`startTurn` + `getTurn`) or streamed (`streamTurn`), never both.
|
|
5720
|
+
*/
|
|
5721
|
+
type ChatTransport = {
|
|
5722
|
+
/** The person's current thread. The server always answers one, so a failure means the api is unreachable. */
|
|
5723
|
+
resolveThread: (context: ChatThreadContext) => Promise<ChatThreadRef>;
|
|
5724
|
+
/** A new conversation: the person's newest thread when that one is still empty, else a fresh one. */
|
|
5725
|
+
createThread: () => Promise<ChatThreadRef>;
|
|
5726
|
+
/** The person's threads that hold a message, newest activity first, as the panel's history lists them. */
|
|
5727
|
+
listThreads: (signal: AbortSignal) => Promise<ThreadSummary[]>;
|
|
5728
|
+
getMessages: (threadId: string) => Promise<ChatMessage[]>;
|
|
5729
|
+
/** The Stop button of a polled turn: cancels it upstream. A streamed turn is stopped by aborting its signal. */
|
|
5730
|
+
cancelTurn?: (jobId: string) => Promise<void>;
|
|
5731
|
+
} & (PollingTurns | StreamingTurns);
|
|
5732
|
+
interface ChatAdapterOptions {
|
|
5733
|
+
/** Called once a turn has been accepted (a polled turn when its dispatch is accepted, a streamed one at its first
|
|
5734
|
+
* stream event), so the person's thread list can show a first message. */
|
|
5735
|
+
onTurnStarted?: () => void;
|
|
5736
|
+
deadlineMs?: number;
|
|
5737
|
+
}
|
|
5738
|
+
/** The `ChatAdapter` for `useChatEngine`, over an app's transport. It adds what every chat needs and no app should
|
|
5739
|
+
* re-write: a deadline on every call but a live stream, the exact "chat_unavailable" failure of an unreachable api, a
|
|
5740
|
+
* vanished turn read as failed, and the signal that a turn started. `useChatEngine` owns every state-machine rule
|
|
5741
|
+
* (optimistic send, polling, retry). */
|
|
5742
|
+
declare function createChatAdapter(transport: ChatTransport, { onTurnStarted, deadlineMs }?: ChatAdapterOptions): ChatAdapter;
|
|
5743
|
+
|
|
5744
|
+
declare const THREADS_LOAD_FAILED = "Your earlier conversations could not be loaded.";
|
|
5745
|
+
declare const NEW_THREAD_FAILED = "A new conversation could not be started.";
|
|
5746
|
+
interface ChatThreads {
|
|
5747
|
+
/** The person's threads that hold a message, newest activity first. */
|
|
5748
|
+
threads: ThreadSummary[];
|
|
5749
|
+
/** Reads the list again: after a New conversation, and after a turn is sent (so a first message shows up). */
|
|
5750
|
+
refresh: () => void;
|
|
5751
|
+
/** New conversation: asks the transport for a thread, hands its id to `onCreated` (to switch the panel to it) and
|
|
5752
|
+
* re-reads the list. A failure shows an error toast and calls nothing. */
|
|
5753
|
+
startNewThread: (onCreated: (threadId: string) => void) => Promise<void>;
|
|
5754
|
+
}
|
|
5755
|
+
interface UseChatThreadsOptions {
|
|
5756
|
+
deadlineMs?: number;
|
|
5757
|
+
}
|
|
5758
|
+
/** The person's chat threads for the panel's History, and its New conversation. The list is read when the panel opens and
|
|
5759
|
+
* on `refresh`. Needs a `ToastProvider`. The transport may be built inline each render: only its latest members are used. */
|
|
5760
|
+
declare function useChatThreads(transport: Pick<ChatTransport, "listThreads" | "createThread">, { deadlineMs }?: UseChatThreadsOptions): ChatThreads;
|
|
5761
|
+
|
|
5762
|
+
/** What a person is told about an export: its wire status, with a finished one past its expiry told apart. */
|
|
5763
|
+
type ExportState = "queued" | "preparing" | "ready" | "expired" | "failed";
|
|
5764
|
+
declare function exportStateOf(job: ExportJob, now: number): ExportState;
|
|
5765
|
+
/** The time an export is judged expired by: when it was drawn, moved on to the moment a ready file expires while it is open. */
|
|
5766
|
+
declare function useExpiryClock(job: ExportJob): number;
|
|
5767
|
+
/**
|
|
5768
|
+
* The export as a view of it should show, when it holds its own copy (`held`, a chat thread's) beside the shared jobs'
|
|
5769
|
+
* list (`exports`, `refresh`). While the held copy is live, the last copy the shared jobs listed wins once they have
|
|
5770
|
+
* listed it; a finished export never changes, so the held copy of it stands. A live export the jobs do not list yet has
|
|
5771
|
+
* them re-read once, and from then on their poll moves it to its end: the view adds no poll of its own.
|
|
5772
|
+
*/
|
|
5773
|
+
declare function useShownExport(held: ExportJob, exports: ExportJob[], refresh: () => void): ExportJob;
|
|
5774
|
+
|
|
5775
|
+
interface ExportDownloaderOptions {
|
|
5776
|
+
/** A fresh signed link for the export, or null when the route says it is not downloadable right now (expired, or its
|
|
5777
|
+
* status changed underneath the click). */
|
|
5778
|
+
mintUrl: (id: string) => Promise<string | null>;
|
|
5779
|
+
/** Where the browser goes to take the file. Its own `Content-Disposition` names it, so the page stays where it is. */
|
|
5780
|
+
navigate?: (url: string) => void;
|
|
5781
|
+
}
|
|
5782
|
+
/** The one-click download of a finished export, shared by the tray and the CSV card so the two never differ. The returned
|
|
5783
|
+
* function resolves once the click has been handled and never rejects: a link that is not available, or cannot be
|
|
5784
|
+
* minted (a network blip, a 500), leaves the page as it is, the next read of the export corrects what the person sees,
|
|
5785
|
+
* and the next click tries again. */
|
|
5786
|
+
declare function createExportDownloader({ mintUrl, navigate, }: ExportDownloaderOptions): (id: string) => Promise<void>;
|
|
5787
|
+
|
|
5788
|
+
/** While any export is PENDING/RUNNING: frequent enough that a person watching the tray sees it move, not so frequent it
|
|
5789
|
+
* hammers the server. */
|
|
5790
|
+
declare const EXPORT_POLL_INTERVAL_MS = 3000;
|
|
5791
|
+
/** Once nothing is live: still catches an export another tab or the job's own backstop resolves, without polling an
|
|
5792
|
+
* idle tray every few seconds for ever. */
|
|
5793
|
+
declare const EXPORT_IDLE_POLL_INTERVAL_MS = 30000;
|
|
5794
|
+
interface UseExportJobsOptions {
|
|
5795
|
+
/** The person's exports as the server lists them. It lists only what should show: the hook does no filtering, so a
|
|
5796
|
+
* dismissed or aged-out export leaves the tray because the server stopped listing it. */
|
|
5797
|
+
list: () => Promise<ExportJob[]>;
|
|
5798
|
+
/** Dismisses a finished export from the tray, server-side, so it is gone after a reload too. */
|
|
5799
|
+
acknowledge: (id: string) => Promise<unknown>;
|
|
5800
|
+
}
|
|
5801
|
+
interface UseExportJobsResult {
|
|
5802
|
+
exports: ExportJob[];
|
|
5803
|
+
/** Dismisses the export and re-reads the list. */
|
|
5804
|
+
ackExport: (id: string) => void;
|
|
5805
|
+
/** Reads the list now instead of at the next poll: an export started elsewhere shows at once. */
|
|
5806
|
+
refresh: () => void;
|
|
5807
|
+
}
|
|
5808
|
+
/** The person's own export jobs, polled while anything is live. Entirely server-persisted: every render derives from the
|
|
5809
|
+
* last list read, so a reload mid-export picks the same export back up from the next poll. Mount it once, above both the
|
|
5810
|
+
* control that starts an export and the tray that shows it, so they share one poll. */
|
|
5811
|
+
declare function useExportJobs({ list, acknowledge }: UseExportJobsOptions): UseExportJobsResult;
|
|
5812
|
+
|
|
5813
|
+
declare const EXPORT_KEPT_NOTE = "Kept for 24 hours";
|
|
5814
|
+
declare const EXPORT_FAILED_FALLBACK = "Unknown error.";
|
|
5815
|
+
/** An export as the tray's card shows it. `useExportJobs`' `list` returns only what should show, so a SUCCEEDED export is downloadable. */
|
|
5816
|
+
declare function exportToJob(job: ExportJob, onDownload: (id: string) => void): Job;
|
|
5817
|
+
interface ExportTrayProps {
|
|
5818
|
+
exports: ExportJob[];
|
|
5819
|
+
onDownload: (id: string) => void;
|
|
5820
|
+
onDismiss: (id: string) => void;
|
|
5821
|
+
}
|
|
5822
|
+
/** The person's background exports as a `JobTray` in the shared bottom-right corner stack. With no exports it renders
|
|
5823
|
+
* nothing: an empty card would hold the corner for no reason. */
|
|
5824
|
+
declare function ExportTray({ exports, onDownload, onDismiss }: ExportTrayProps): React.JSX.Element;
|
|
5825
|
+
|
|
5826
|
+
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, type AppShellSidePanel, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_CALL_DEADLINE_MS, CHAT_UNAVAILABLE, CHAT_UNAVAILABLE_MESSAGE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, CORNER_STACK_OFFSET_PROPERTY, CSV_FAILED_FALLBACK, CSV_KEPT_NOTE, Calendar, type CalendarProps, CallDeadlineError, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, type ChatAdapterOptions, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, type ChatThreadContext, type ChatThreadRef, type ChatThreads, ChatTranscript, type ChatTranscriptProps, type ChatTransport, ChatTurn, type ChatTurnProps, ChatUnreachableError, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, CsvCard, type CsvCardProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTableColumnLabel, type DataTablePhoneRole, type DataTableProps, type DataTableRowAction, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, EXPORT_FAILED_FALLBACK, EXPORT_IDLE_POLL_INTERVAL_MS, EXPORT_KEPT_NOTE, EXPORT_POLL_INTERVAL_MS, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, type ExportDownloaderOptions, type ExportJob, type ExportJobStatus, type ExportState, ExportTray, type ExportTrayProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, Fieldset, type FieldsetProps, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldFixed, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MarkdownSize, type MarkdownTone, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NEW_THREAD_FAILED, NumberInput, type NumberInputProps, OVERLAY_BREAKPOINT, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketDecision, type PacketDecisionAction, type PacketDecisionState, type PacketDecisionTone, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, type PollingTurns, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QUERY_EMPTY_MESSAGE, QueryKit, type QueryPaging, QueryResultCard, type QueryResultCardProps, type QueryResultStatus, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, ReservedSkeleton, type ReservedSkeletonProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SHEET_OPEN_ATTRIBUTE, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type StreamingTurns, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, THREADS_LOAD_FAILED, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, type UseChatThreadsOptions, type UseExportJobsOptions, type UseExportJobsResult, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createChatAdapter, createExportDownloader, createLocalStorageAppearanceStore, createVersionStore, eqFilter, exportStateOf, exportToJob, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isExpiredExport, isImage, isLiveExport, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useChatThreads, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useExpiryClock, useExportJobs, useFeatureStatus, useLayerZIndex, useOverlayLayout, usePopoverPosition, usePublishCornerStackOffset, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useSheetOpenMark, useShownExport, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, withDeadline, writeQueryToUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1296,6 +1296,9 @@ type DataTableColumn = DataTableColumnLabel & {
|
|
|
1296
1296
|
key: string;
|
|
1297
1297
|
/** Right-aligned tabular figures. Never center a number. */
|
|
1298
1298
|
numeric?: boolean;
|
|
1299
|
+
/** Keeps this column's values on one line, in the table cell and in the phone card's meta line, so a value
|
|
1300
|
+
* like "FOIA 2025-26" never breaks at its hyphen. A table too narrow for it scrolls sideways in its own wrapper. */
|
|
1301
|
+
noWrap?: boolean;
|
|
1299
1302
|
/** Set widths explicitly; auto layout shifts as data arrives. */
|
|
1300
1303
|
width?: string;
|
|
1301
1304
|
sortable?: boolean;
|
|
@@ -4730,6 +4733,67 @@ declare const TranscriptKit: {
|
|
|
4730
4733
|
groupMessages: typeof groupMessages;
|
|
4731
4734
|
};
|
|
4732
4735
|
|
|
4736
|
+
type QueryResultStatus = "queued" | "running" | "done" | "failed" | "canceled";
|
|
4737
|
+
declare const QUERY_EMPTY_MESSAGE = "No rows to show.";
|
|
4738
|
+
interface QueryResultCardProps {
|
|
4739
|
+
title: string;
|
|
4740
|
+
status: QueryResultStatus;
|
|
4741
|
+
/** ISO time the query started; a running query shows how long it has run, on a local clock ticking each second. */
|
|
4742
|
+
startedAt?: string | null;
|
|
4743
|
+
failureMessage?: string | null;
|
|
4744
|
+
/** Headline figures, already formatted. */
|
|
4745
|
+
facts?: Fact[];
|
|
4746
|
+
/** The preview's columns and rows. */
|
|
4747
|
+
columns?: DataTableColumn[];
|
|
4748
|
+
rows?: object[];
|
|
4749
|
+
/** The row field that identifies a row. */
|
|
4750
|
+
rowKey?: string;
|
|
4751
|
+
/** The card's own actions (an export button, say): rendered as given, so the card names no action of any app. */
|
|
4752
|
+
actions?: React.ReactNode;
|
|
4753
|
+
}
|
|
4754
|
+
/**
|
|
4755
|
+
* The live card of a background query an agent started, inside `PacketCard` (`AgentChatPanel`'s `packetRenderers`, with
|
|
4756
|
+
* `apply: false`: a query is never applied). The panel re-reads the thread on every poll while a turn runs, so the card
|
|
4757
|
+
* moves from queued to running to done or failed by itself. Presentational: pass the packet's fields.
|
|
4758
|
+
*/
|
|
4759
|
+
declare function QueryResultCard({ title, status, startedAt, failureMessage, facts, columns, rows, rowKey, actions, }: QueryResultCardProps): React.JSX.Element;
|
|
4760
|
+
|
|
4761
|
+
/** Where a background export is. */
|
|
4762
|
+
type ExportJobStatus = "PENDING" | "RUNNING" | "SUCCEEDED" | "FAILED";
|
|
4763
|
+
/** One background export, in the shape an app maps its own export rows to. The one shape the tray, the CSV card and the polling hook
|
|
4764
|
+
* all read, so a chat card and the tray never show two snapshots of the same export. */
|
|
4765
|
+
interface ExportJob {
|
|
4766
|
+
id: string;
|
|
4767
|
+
/** What the export was made from: the tray's card title. */
|
|
4768
|
+
title: string;
|
|
4769
|
+
/** What kind of export it is: the tray's card note. */
|
|
4770
|
+
note?: string;
|
|
4771
|
+
/** The name the downloaded file carries. */
|
|
4772
|
+
fileName: string;
|
|
4773
|
+
status: ExportJobStatus;
|
|
4774
|
+
rowCount: number | null;
|
|
4775
|
+
/** Set only once SUCCEEDED: when the download stops being available. */
|
|
4776
|
+
expiresAt: string | null;
|
|
4777
|
+
failureMessage: string | null;
|
|
4778
|
+
}
|
|
4779
|
+
declare function isLiveExport(job: ExportJob): boolean;
|
|
4780
|
+
declare function isExpiredExport(job: ExportJob, now: number): boolean;
|
|
4781
|
+
|
|
4782
|
+
declare const CSV_FAILED_FALLBACK = "The CSV could not be made.";
|
|
4783
|
+
declare const CSV_KEPT_NOTE = "Kept 24 hours";
|
|
4784
|
+
interface CsvCardProps {
|
|
4785
|
+
/** The export as the card should show it. */
|
|
4786
|
+
job: ExportJob;
|
|
4787
|
+
/** Takes the file. Download is on only while the export is ready; the button shows busy until this settles. */
|
|
4788
|
+
onDownload: (id: string) => Promise<void>;
|
|
4789
|
+
}
|
|
4790
|
+
/**
|
|
4791
|
+
* The live card of a CSV an agent made (or the person made from a query card), for `AgentChatPanel`'s `packetRenderers`
|
|
4792
|
+
* with `apply: false`: a file is downloaded, never applied. Presentational: the export's state is the `job` it is given,
|
|
4793
|
+
* and a ready file turns expired by itself at the moment it expires while the card is open.
|
|
4794
|
+
*/
|
|
4795
|
+
declare function CsvCard({ job, onDownload }: CsvCardProps): React.JSX.Element;
|
|
4796
|
+
|
|
4733
4797
|
/** Kept modest on purpose: this is a PREVIEW, not a document viewer. A file past this
|
|
4734
4798
|
* many characters still opens — it just shows its first slice, same as CodeBlock's own
|
|
4735
4799
|
* line fold for a long file. */
|
|
@@ -5602,4 +5666,161 @@ declare function usePublishCornerStackOffset(ref: React.RefObject<HTMLElement |
|
|
|
5602
5666
|
/** Marks the document while a side-panel sheet is open. */
|
|
5603
5667
|
declare function useSheetOpenMark(active: boolean): void;
|
|
5604
5668
|
|
|
5605
|
-
|
|
5669
|
+
/** How long one chat call may take before it fails visibly instead of leaving the conversation waiting for ever. */
|
|
5670
|
+
declare const CHAT_CALL_DEADLINE_MS = 30000;
|
|
5671
|
+
declare class CallDeadlineError extends Error {
|
|
5672
|
+
readonly call: string;
|
|
5673
|
+
readonly deadlineMs: number;
|
|
5674
|
+
constructor(call: string, deadlineMs: number);
|
|
5675
|
+
}
|
|
5676
|
+
/** Settles as `work` does, or rejects with a `CallDeadlineError` once `deadlineMs` has passed with no answer. The work
|
|
5677
|
+
* itself is not cancelled (an app's client may offer no way to); the caller just stops waiting. */
|
|
5678
|
+
declare function withDeadline<T>(call: string, deadlineMs: number, work: Promise<T>): Promise<T>;
|
|
5679
|
+
|
|
5680
|
+
/** The exact string the chat engine matches to show its "isn't reachable" state (never substring sniffing). */
|
|
5681
|
+
declare const CHAT_UNAVAILABLE_MESSAGE = "chat_unavailable";
|
|
5682
|
+
/** What a transport throws when it could not reach its api at all, so the adapter can tell an unreachable chat from a
|
|
5683
|
+
* server's own stable error code (which the panel matches by exact equality and the adapter never rewrites). */
|
|
5684
|
+
declare class ChatUnreachableError extends Error {
|
|
5685
|
+
constructor(message?: string);
|
|
5686
|
+
}
|
|
5687
|
+
interface ChatThreadRef {
|
|
5688
|
+
thread_id: string;
|
|
5689
|
+
}
|
|
5690
|
+
/** The page the chat is opened on, as the engine passes it when it resolves a thread. */
|
|
5691
|
+
interface ChatThreadContext {
|
|
5692
|
+
contextType: string;
|
|
5693
|
+
contextId: string;
|
|
5694
|
+
}
|
|
5695
|
+
/** A turn the app runs as a dispatch: start it, then the engine polls its status until it ends. */
|
|
5696
|
+
interface PollingTurns {
|
|
5697
|
+
/** Starts a turn (a dispatch, not a stream) and answers the job id the engine tracks. `attachments` are the files the
|
|
5698
|
+
* person added; a transport that cannot carry them must throw rather than drop them. */
|
|
5699
|
+
startTurn: (threadId: string, text: string, attachments?: Attachment[]) => Promise<{
|
|
5700
|
+
jobId: string;
|
|
5701
|
+
}>;
|
|
5702
|
+
/** The turn's status, or null when the server no longer knows the turn. */
|
|
5703
|
+
getTurn: (jobId: string) => Promise<JobStatus | null>;
|
|
5704
|
+
streamTurn?: never;
|
|
5705
|
+
}
|
|
5706
|
+
/** A turn the app runs as one live stream: the engine appends what `handlers` are given, and Stop aborts `signal`. */
|
|
5707
|
+
interface StreamingTurns {
|
|
5708
|
+
/** Runs the turn to its end. It resolves the turn's final result (no `job_id`: a streaming chat has no turn status
|
|
5709
|
+
* to poll) and throws `ChatUnreachableError` when the api cannot be reached. It carries no deadline: a live stream
|
|
5710
|
+
* may run as long as the turn does. */
|
|
5711
|
+
streamTurn: (threadId: string, text: string, handlers: StreamHandlers, signal: AbortSignal, attachments?: Attachment[]) => Promise<SendMessageResult>;
|
|
5712
|
+
startTurn?: never;
|
|
5713
|
+
getTurn?: never;
|
|
5714
|
+
}
|
|
5715
|
+
/**
|
|
5716
|
+
* What an app supplies to put a chat on the design system's panel: its own request client and its own mapping from its
|
|
5717
|
+
* wire onto the design system's generic `ChatMessage`, `JobStatus` and `ThreadSummary`. The design system names no route,
|
|
5718
|
+
* client or wire type; each member is the app's call, answering the generic shape. Its turns are either polled
|
|
5719
|
+
* (`startTurn` + `getTurn`) or streamed (`streamTurn`), never both.
|
|
5720
|
+
*/
|
|
5721
|
+
type ChatTransport = {
|
|
5722
|
+
/** The person's current thread. The server always answers one, so a failure means the api is unreachable. */
|
|
5723
|
+
resolveThread: (context: ChatThreadContext) => Promise<ChatThreadRef>;
|
|
5724
|
+
/** A new conversation: the person's newest thread when that one is still empty, else a fresh one. */
|
|
5725
|
+
createThread: () => Promise<ChatThreadRef>;
|
|
5726
|
+
/** The person's threads that hold a message, newest activity first, as the panel's history lists them. */
|
|
5727
|
+
listThreads: (signal: AbortSignal) => Promise<ThreadSummary[]>;
|
|
5728
|
+
getMessages: (threadId: string) => Promise<ChatMessage[]>;
|
|
5729
|
+
/** The Stop button of a polled turn: cancels it upstream. A streamed turn is stopped by aborting its signal. */
|
|
5730
|
+
cancelTurn?: (jobId: string) => Promise<void>;
|
|
5731
|
+
} & (PollingTurns | StreamingTurns);
|
|
5732
|
+
interface ChatAdapterOptions {
|
|
5733
|
+
/** Called once a turn has been accepted (a polled turn when its dispatch is accepted, a streamed one at its first
|
|
5734
|
+
* stream event), so the person's thread list can show a first message. */
|
|
5735
|
+
onTurnStarted?: () => void;
|
|
5736
|
+
deadlineMs?: number;
|
|
5737
|
+
}
|
|
5738
|
+
/** The `ChatAdapter` for `useChatEngine`, over an app's transport. It adds what every chat needs and no app should
|
|
5739
|
+
* re-write: a deadline on every call but a live stream, the exact "chat_unavailable" failure of an unreachable api, a
|
|
5740
|
+
* vanished turn read as failed, and the signal that a turn started. `useChatEngine` owns every state-machine rule
|
|
5741
|
+
* (optimistic send, polling, retry). */
|
|
5742
|
+
declare function createChatAdapter(transport: ChatTransport, { onTurnStarted, deadlineMs }?: ChatAdapterOptions): ChatAdapter;
|
|
5743
|
+
|
|
5744
|
+
declare const THREADS_LOAD_FAILED = "Your earlier conversations could not be loaded.";
|
|
5745
|
+
declare const NEW_THREAD_FAILED = "A new conversation could not be started.";
|
|
5746
|
+
interface ChatThreads {
|
|
5747
|
+
/** The person's threads that hold a message, newest activity first. */
|
|
5748
|
+
threads: ThreadSummary[];
|
|
5749
|
+
/** Reads the list again: after a New conversation, and after a turn is sent (so a first message shows up). */
|
|
5750
|
+
refresh: () => void;
|
|
5751
|
+
/** New conversation: asks the transport for a thread, hands its id to `onCreated` (to switch the panel to it) and
|
|
5752
|
+
* re-reads the list. A failure shows an error toast and calls nothing. */
|
|
5753
|
+
startNewThread: (onCreated: (threadId: string) => void) => Promise<void>;
|
|
5754
|
+
}
|
|
5755
|
+
interface UseChatThreadsOptions {
|
|
5756
|
+
deadlineMs?: number;
|
|
5757
|
+
}
|
|
5758
|
+
/** The person's chat threads for the panel's History, and its New conversation. The list is read when the panel opens and
|
|
5759
|
+
* on `refresh`. Needs a `ToastProvider`. The transport may be built inline each render: only its latest members are used. */
|
|
5760
|
+
declare function useChatThreads(transport: Pick<ChatTransport, "listThreads" | "createThread">, { deadlineMs }?: UseChatThreadsOptions): ChatThreads;
|
|
5761
|
+
|
|
5762
|
+
/** What a person is told about an export: its wire status, with a finished one past its expiry told apart. */
|
|
5763
|
+
type ExportState = "queued" | "preparing" | "ready" | "expired" | "failed";
|
|
5764
|
+
declare function exportStateOf(job: ExportJob, now: number): ExportState;
|
|
5765
|
+
/** The time an export is judged expired by: when it was drawn, moved on to the moment a ready file expires while it is open. */
|
|
5766
|
+
declare function useExpiryClock(job: ExportJob): number;
|
|
5767
|
+
/**
|
|
5768
|
+
* The export as a view of it should show, when it holds its own copy (`held`, a chat thread's) beside the shared jobs'
|
|
5769
|
+
* list (`exports`, `refresh`). While the held copy is live, the last copy the shared jobs listed wins once they have
|
|
5770
|
+
* listed it; a finished export never changes, so the held copy of it stands. A live export the jobs do not list yet has
|
|
5771
|
+
* them re-read once, and from then on their poll moves it to its end: the view adds no poll of its own.
|
|
5772
|
+
*/
|
|
5773
|
+
declare function useShownExport(held: ExportJob, exports: ExportJob[], refresh: () => void): ExportJob;
|
|
5774
|
+
|
|
5775
|
+
interface ExportDownloaderOptions {
|
|
5776
|
+
/** A fresh signed link for the export, or null when the route says it is not downloadable right now (expired, or its
|
|
5777
|
+
* status changed underneath the click). */
|
|
5778
|
+
mintUrl: (id: string) => Promise<string | null>;
|
|
5779
|
+
/** Where the browser goes to take the file. Its own `Content-Disposition` names it, so the page stays where it is. */
|
|
5780
|
+
navigate?: (url: string) => void;
|
|
5781
|
+
}
|
|
5782
|
+
/** The one-click download of a finished export, shared by the tray and the CSV card so the two never differ. The returned
|
|
5783
|
+
* function resolves once the click has been handled and never rejects: a link that is not available, or cannot be
|
|
5784
|
+
* minted (a network blip, a 500), leaves the page as it is, the next read of the export corrects what the person sees,
|
|
5785
|
+
* and the next click tries again. */
|
|
5786
|
+
declare function createExportDownloader({ mintUrl, navigate, }: ExportDownloaderOptions): (id: string) => Promise<void>;
|
|
5787
|
+
|
|
5788
|
+
/** While any export is PENDING/RUNNING: frequent enough that a person watching the tray sees it move, not so frequent it
|
|
5789
|
+
* hammers the server. */
|
|
5790
|
+
declare const EXPORT_POLL_INTERVAL_MS = 3000;
|
|
5791
|
+
/** Once nothing is live: still catches an export another tab or the job's own backstop resolves, without polling an
|
|
5792
|
+
* idle tray every few seconds for ever. */
|
|
5793
|
+
declare const EXPORT_IDLE_POLL_INTERVAL_MS = 30000;
|
|
5794
|
+
interface UseExportJobsOptions {
|
|
5795
|
+
/** The person's exports as the server lists them. It lists only what should show: the hook does no filtering, so a
|
|
5796
|
+
* dismissed or aged-out export leaves the tray because the server stopped listing it. */
|
|
5797
|
+
list: () => Promise<ExportJob[]>;
|
|
5798
|
+
/** Dismisses a finished export from the tray, server-side, so it is gone after a reload too. */
|
|
5799
|
+
acknowledge: (id: string) => Promise<unknown>;
|
|
5800
|
+
}
|
|
5801
|
+
interface UseExportJobsResult {
|
|
5802
|
+
exports: ExportJob[];
|
|
5803
|
+
/** Dismisses the export and re-reads the list. */
|
|
5804
|
+
ackExport: (id: string) => void;
|
|
5805
|
+
/** Reads the list now instead of at the next poll: an export started elsewhere shows at once. */
|
|
5806
|
+
refresh: () => void;
|
|
5807
|
+
}
|
|
5808
|
+
/** The person's own export jobs, polled while anything is live. Entirely server-persisted: every render derives from the
|
|
5809
|
+
* last list read, so a reload mid-export picks the same export back up from the next poll. Mount it once, above both the
|
|
5810
|
+
* control that starts an export and the tray that shows it, so they share one poll. */
|
|
5811
|
+
declare function useExportJobs({ list, acknowledge }: UseExportJobsOptions): UseExportJobsResult;
|
|
5812
|
+
|
|
5813
|
+
declare const EXPORT_KEPT_NOTE = "Kept for 24 hours";
|
|
5814
|
+
declare const EXPORT_FAILED_FALLBACK = "Unknown error.";
|
|
5815
|
+
/** An export as the tray's card shows it. `useExportJobs`' `list` returns only what should show, so a SUCCEEDED export is downloadable. */
|
|
5816
|
+
declare function exportToJob(job: ExportJob, onDownload: (id: string) => void): Job;
|
|
5817
|
+
interface ExportTrayProps {
|
|
5818
|
+
exports: ExportJob[];
|
|
5819
|
+
onDownload: (id: string) => void;
|
|
5820
|
+
onDismiss: (id: string) => void;
|
|
5821
|
+
}
|
|
5822
|
+
/** The person's background exports as a `JobTray` in the shared bottom-right corner stack. With no exports it renders
|
|
5823
|
+
* nothing: an empty card would hold the corner for no reason. */
|
|
5824
|
+
declare function ExportTray({ exports, onDownload, onDismiss }: ExportTrayProps): React.JSX.Element;
|
|
5825
|
+
|
|
5826
|
+
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, type AppShellSidePanel, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_CALL_DEADLINE_MS, CHAT_UNAVAILABLE, CHAT_UNAVAILABLE_MESSAGE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, CORNER_STACK_OFFSET_PROPERTY, CSV_FAILED_FALLBACK, CSV_KEPT_NOTE, Calendar, type CalendarProps, CallDeadlineError, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, type ChatAdapterOptions, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, type ChatThreadContext, type ChatThreadRef, type ChatThreads, ChatTranscript, type ChatTranscriptProps, type ChatTransport, ChatTurn, type ChatTurnProps, ChatUnreachableError, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, CsvCard, type CsvCardProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTableColumnLabel, type DataTablePhoneRole, type DataTableProps, type DataTableRowAction, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, EXPORT_FAILED_FALLBACK, EXPORT_IDLE_POLL_INTERVAL_MS, EXPORT_KEPT_NOTE, EXPORT_POLL_INTERVAL_MS, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, type ExportDownloaderOptions, type ExportJob, type ExportJobStatus, type ExportState, ExportTray, type ExportTrayProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, Fieldset, type FieldsetProps, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldFixed, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MarkdownSize, type MarkdownTone, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NEW_THREAD_FAILED, NumberInput, type NumberInputProps, OVERLAY_BREAKPOINT, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketDecision, type PacketDecisionAction, type PacketDecisionState, type PacketDecisionTone, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, type PollingTurns, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QUERY_EMPTY_MESSAGE, QueryKit, type QueryPaging, QueryResultCard, type QueryResultCardProps, type QueryResultStatus, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, ReservedSkeleton, type ReservedSkeletonProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SHEET_OPEN_ATTRIBUTE, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type StreamingTurns, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, THREADS_LOAD_FAILED, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, type UseChatThreadsOptions, type UseExportJobsOptions, type UseExportJobsResult, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createChatAdapter, createExportDownloader, createLocalStorageAppearanceStore, createVersionStore, eqFilter, exportStateOf, exportToJob, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isExpiredExport, isImage, isLiveExport, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useChatThreads, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useExpiryClock, useExportJobs, useFeatureStatus, useLayerZIndex, useOverlayLayout, usePopoverPosition, usePublishCornerStackOffset, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useSheetOpenMark, useShownExport, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, withDeadline, writeQueryToUrl };
|