react-semaphor 0.1.543 → 0.1.544
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/activity/index.js +73 -0
- package/dist/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +51 -50
- package/dist/chunks/{apply-dashboard-operations-CG9S7MGt.js → apply-dashboard-operations-Bz4n1Lq6.js} +44 -44
- package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-BNLkCDml.js} +288 -288
- package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-BTkrN3W4.js} +467 -462
- package/dist/chunks/dashboard-briefing-launcher-DQ_8O_e2.js +3725 -0
- package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-8RyBTQUO.js} +530 -525
- package/dist/chunks/dashboard-g5a4DKWq.js +14 -0
- package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-7qT9jmfL.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-OwqCbrVp.js → document-dashboard-inputs-BC6p-ESg.js} +4 -4
- package/dist/chunks/{document-sheet-utils-BTb3VZxV.js → document-sheet-utils-Duo9uLoH.js} +11 -11
- package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-BfJwnRIZ.js} +249 -248
- package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
- package/dist/chunks/{index-l5LclZvs.js → index-DkAyQvC6.js} +59 -58
- package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-CxJLkztA.js} +1 -1
- package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-DESvLiu9.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
- package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-CLiVi90c.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-Df7VpRVW.js} +195 -195
- package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-B-mQ--nV.js} +3 -3
- package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-DDAxk8us.js} +39892 -39380
- package/dist/chunks/{shelf-drop-preview-context-BGl_rxcW.js → shelf-drop-preview-context-BSRPwaED.js} +414 -371
- package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-CPfGAQ9X.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.js → use-create-flow-overlay-state-BxzFviM-.js} +67 -78
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +72 -72
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +226 -223
- package/dist/index.js +266 -271
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/activity.d.ts +2 -0
- package/dist/types/components/activity/activity-bell.d.ts +11 -0
- package/dist/types/components/activity/activity-instance.d.ts +50 -0
- package/dist/types/components/activity/activity-notices.d.ts +7 -0
- package/dist/types/components/activity/activity-provider.d.ts +21 -0
- package/dist/types/components/activity/activity-types.d.ts +177 -0
- package/dist/types/components/activity/index.d.ts +6 -0
- package/dist/types/components/activity/use-activity.d.ts +20 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/briefings/briefing-author.d.ts +14 -12
- package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
- package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
- package/dist/types/components/index.d.ts +1 -4
- package/dist/types/lib/activity-identity.d.ts +21 -0
- package/dist/types/lib/api/exports-api.d.ts +4 -4
- package/dist/types/lib/hooks/index.d.ts +1 -3
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
- package/dist/types/shared/activity/activity-contract.d.ts +84 -0
- package/dist/types/shared/activity/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
- package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
- package/package.json +5 -1
- package/dist/chunks/dashboard-B9mKTJoy.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
- package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
- package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
- package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
- package/dist/types/components/notifications/index.d.ts +0 -3
- package/dist/types/components/notifications/notification-bell.d.ts +0 -13
- package/dist/types/lib/exports/bounded-request.d.ts +0 -12
- package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
- package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
- package/dist/types/lib/stores/export-store.d.ts +0 -62
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { BriefingPreviewPlan, BriefingPreviewRun, BriefingRun } from '../../../lib/types/briefing-types.js';
|
|
2
|
-
import { EmailPreviewArtifact, SlackPreviewArtifact } from './run-model.js';
|
|
3
|
-
type PendingAction = 'save' | 'run' | 'plan' | 'preview' | 'pause' | 'resume' | 'delete' | 'cancelRun' | 'deleteRun' | null;
|
|
4
|
-
export declare function BriefingPlanReview({ previewPlan, previewRun, scopeLabel, }: {
|
|
5
|
-
previewPlan: BriefingPreviewPlan;
|
|
6
|
-
previewRun: BriefingPreviewRun | null;
|
|
7
|
-
scopeLabel?: string | null;
|
|
8
|
-
}): import("react").JSX.Element;
|
|
9
|
-
export declare function LatestRunSummary({ run, onViewOutput, onDeleteRun, onRetryRun, retryDisabled, retryDisabledReason, deletePending, }: {
|
|
10
|
-
run: BriefingRun;
|
|
11
|
-
onViewOutput: () => void;
|
|
12
|
-
onDeleteRun?: () => void;
|
|
13
|
-
onRetryRun?: () => void;
|
|
14
|
-
retryDisabled?: boolean;
|
|
15
|
-
retryDisabledReason?: string;
|
|
16
|
-
deletePending?: boolean;
|
|
17
|
-
}): import("react").JSX.Element;
|
|
18
|
-
export declare function RunProgressDetails({ run }: {
|
|
19
|
-
run: BriefingPreviewRun | BriefingRun;
|
|
20
|
-
}): import("react").JSX.Element;
|
|
21
|
-
export declare function RunExpectationBanner(): import("react").JSX.Element;
|
|
22
|
-
export declare function BackgroundRunPill({ run, onExpand, }: {
|
|
23
|
-
run: BriefingPreviewRun | BriefingRun;
|
|
24
|
-
onExpand: () => void;
|
|
25
|
-
}): import("react").JSX.Element;
|
|
26
|
-
export declare function RunCompletionBanner({ title, durationSeconds, status, onView, onDismiss, }: {
|
|
27
|
-
title: string;
|
|
28
|
-
durationSeconds: number | null;
|
|
29
|
-
status: 'success' | 'failed';
|
|
30
|
-
onView: () => void;
|
|
31
|
-
onDismiss: () => void;
|
|
32
|
-
}): import("react").JSX.Element;
|
|
33
|
-
export declare function StickyActivityBar({ pendingAction, previewRun, savedActiveRun, onShowDetails, onCancelPreviewRun, onCancelSavedRun, onMinimizeRun, detailsVisible, }: {
|
|
34
|
-
pendingAction: PendingAction;
|
|
35
|
-
previewRun: BriefingPreviewRun | null;
|
|
36
|
-
savedActiveRun: BriefingRun | null;
|
|
37
|
-
onShowDetails: () => void;
|
|
38
|
-
onCancelPreviewRun?: () => void;
|
|
39
|
-
onCancelSavedRun?: () => void;
|
|
40
|
-
onMinimizeRun?: () => void;
|
|
41
|
-
detailsVisible: boolean;
|
|
42
|
-
}): import("react").JSX.Element | null;
|
|
43
|
-
export declare function EmailPackagePreview({ preview, onExpand, reportMode, }: {
|
|
44
|
-
preview: EmailPreviewArtifact;
|
|
45
|
-
onExpand?: () => void;
|
|
46
|
-
reportMode?: boolean;
|
|
47
|
-
}): import("react").JSX.Element;
|
|
48
|
-
export declare function SlackMessagePreview({ preview, onExpand, trustLine, reactions, }: {
|
|
49
|
-
preview: SlackPreviewArtifact;
|
|
50
|
-
onExpand?: () => void;
|
|
51
|
-
/** Optional italic footer line ("Runs with X's permissions · …"). */
|
|
52
|
-
trustLine?: string;
|
|
53
|
-
/** Mock reaction counts for the preview surface. Real reactions come back
|
|
54
|
-
after send and are surfaced separately on the briefing detail. */
|
|
55
|
-
reactions?: Array<{
|
|
56
|
-
emoji: string;
|
|
57
|
-
count: number;
|
|
58
|
-
}>;
|
|
59
|
-
}): import("react").JSX.Element;
|
|
60
|
-
export declare function BriefingPreviewResult({ previewRun, onExpand, fullWidth, reportMode, }: {
|
|
61
|
-
previewRun: BriefingPreviewRun;
|
|
62
|
-
onExpand?: () => void;
|
|
63
|
-
fullWidth?: boolean;
|
|
64
|
-
reportMode?: boolean;
|
|
65
|
-
}): import("react").JSX.Element;
|
|
66
|
-
export declare function SavedRunResult({ run, onExpand, reportMode, onDeleteRun, onRetryRun, retryDisabled, retryDisabledReason, deletePending, }: {
|
|
67
|
-
run: BriefingRun;
|
|
68
|
-
onExpand?: () => void;
|
|
69
|
-
reportMode?: boolean;
|
|
70
|
-
onDeleteRun?: () => void;
|
|
71
|
-
onRetryRun?: () => void;
|
|
72
|
-
retryDisabled?: boolean;
|
|
73
|
-
retryDisabledReason?: string;
|
|
74
|
-
deletePending?: boolean;
|
|
75
|
-
}): import("react").JSX.Element;
|
|
76
|
-
export declare function LocalPreviewOutputCallout({ previewRun, isStale, onViewOutput, }: {
|
|
77
|
-
previewRun: BriefingPreviewRun;
|
|
78
|
-
isStale: boolean;
|
|
79
|
-
onViewOutput: () => void;
|
|
80
|
-
}): import("react").JSX.Element;
|
|
81
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
type PollableBriefingRun = {
|
|
2
|
-
id: string;
|
|
3
|
-
status: string;
|
|
4
|
-
error?: string | null;
|
|
5
|
-
};
|
|
6
|
-
type PollingStatus = 'idle' | 'polling' | 'terminal' | 'timed_out' | 'error';
|
|
7
|
-
type PollingInput = {
|
|
8
|
-
apiServiceUrl: string;
|
|
9
|
-
token: string;
|
|
10
|
-
runId: string;
|
|
11
|
-
};
|
|
12
|
-
type UseBriefingRunPollingOptions<Run extends PollableBriefingRun> = {
|
|
13
|
-
apiServiceUrl?: string;
|
|
14
|
-
token?: string;
|
|
15
|
-
intervalMs: number;
|
|
16
|
-
timeoutMs: number;
|
|
17
|
-
fetchRun: (input: PollingInput) => Promise<Run>;
|
|
18
|
-
onRun: (run: Run) => void;
|
|
19
|
-
onTerminalRun?: (run: Run) => void;
|
|
20
|
-
onError?: (error: unknown) => void;
|
|
21
|
-
onTimeout?: (runId: string) => void;
|
|
22
|
-
};
|
|
23
|
-
export declare function isTerminalBriefingRunStatus(status: string | undefined): boolean;
|
|
24
|
-
export declare function isActiveBriefingRunStatus(status: string | undefined): boolean;
|
|
25
|
-
export declare function useBriefingRunPolling<Run extends PollableBriefingRun>({ apiServiceUrl, token, intervalMs, timeoutMs, fetchRun, onRun, onTerminalRun, onError, onTimeout, }: UseBriefingRunPollingOptions<Run>): {
|
|
26
|
-
activeRunId: string | null;
|
|
27
|
-
isPolling: boolean;
|
|
28
|
-
resetTerminalRun: () => void;
|
|
29
|
-
startRun: (run: Run) => void;
|
|
30
|
-
startRunId: (runId: string) => void;
|
|
31
|
-
status: PollingStatus;
|
|
32
|
-
stop: () => void;
|
|
33
|
-
};
|
|
34
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { ActiveExport } from '../../lib/stores/export-store.js';
|
|
3
|
-
export type ExportDownloadOutcome = 'opened' | 'denied';
|
|
4
|
-
interface ExportNotificationItemProps {
|
|
5
|
-
/** The export data to display */
|
|
6
|
-
export: ActiveExport;
|
|
7
|
-
/** Called when user clicks dismiss/remove */
|
|
8
|
-
onRemove?: (id: string) => void;
|
|
9
|
-
/**
|
|
10
|
-
* Opens the file, resolving a fresh signed link first when the row holds
|
|
11
|
-
* none. Resolves 'denied' when the link could not be signed.
|
|
12
|
-
*/
|
|
13
|
-
onDownload?: (exp: ActiveExport) => Promise<ExportDownloadOutcome>;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* One background export. Visual reference: semaphor-app /design/export-tray.
|
|
17
|
-
*
|
|
18
|
-
* A row is a status dot, the title, one metadata line and one text action.
|
|
19
|
-
* At rest the metadata line shows only the time; rows and size disclose on
|
|
20
|
-
* hover or focus, in the same gesture that reveals Remove. A ready export
|
|
21
|
-
* always offers Download; the link is resolved on click when it is missing.
|
|
22
|
-
*/
|
|
23
|
-
export declare function ExportNotificationItem({ export: exp, onRemove, onDownload, }: ExportNotificationItemProps): React.JSX.Element;
|
|
24
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Notification bell icon with badge.
|
|
4
|
-
*
|
|
5
|
-
* Shows a badge when there are:
|
|
6
|
-
* - In-progress exports (shows count)
|
|
7
|
-
* - Completed exports that haven't been dismissed (shows dot)
|
|
8
|
-
*
|
|
9
|
-
* Clicking opens a popover with the full export notification list.
|
|
10
|
-
*/
|
|
11
|
-
export declare function NotificationBell({ variant, }: {
|
|
12
|
-
variant?: 'outline' | 'ghost';
|
|
13
|
-
}): React.JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One export status, list or download-link request never waits longer than
|
|
3
|
-
* this (hotspot H-06: every wait that decides something is bounded). A
|
|
4
|
-
* timed-out request counts as failed, and its fetch is aborted.
|
|
5
|
-
*/
|
|
6
|
-
export declare const EXPORT_STATUS_TIMEOUT_MS = 15000;
|
|
7
|
-
/**
|
|
8
|
-
* Rejects when `work` outlasts `EXPORT_STATUS_TIMEOUT_MS`, and aborts its
|
|
9
|
-
* request. `work` must pass `signal` to its fetch, or the timeout releases the
|
|
10
|
-
* caller while the request stays open (a static test checks every caller).
|
|
11
|
-
*/
|
|
12
|
-
export declare function boundedRequest<T>(work: (signal: AbortSignal) => Promise<T>): Promise<T>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { EXPORT_STATUS_TIMEOUT_MS } from '../exports/bounded-request.js';
|
|
2
|
-
/**
|
|
3
|
-
* The browser follows the server (MX-D9): it gives up on an export this long
|
|
4
|
-
* after the server's `deadlineAt`, by which the server has settled the export.
|
|
5
|
-
*/
|
|
6
|
-
export declare const EXPORT_POLL_GRACE_MS: number;
|
|
7
|
-
export { EXPORT_STATUS_TIMEOUT_MS };
|
|
8
|
-
/**
|
|
9
|
-
* Hook that manages smart polling for export status updates.
|
|
10
|
-
*
|
|
11
|
-
* Features:
|
|
12
|
-
* - Dynamic polling intervals (10s → 15s → 30s) based on export duration
|
|
13
|
-
* - Page Visibility API integration (pauses when tab is hidden)
|
|
14
|
-
* - Automatic download URL fetching when export completes
|
|
15
|
-
* - Only polls when there are in-progress exports
|
|
16
|
-
*
|
|
17
|
-
* @returns Object with polling state
|
|
18
|
-
*/
|
|
19
|
-
export declare function useExportPolling(): {
|
|
20
|
-
isPolling: boolean;
|
|
21
|
-
isTabVisible: boolean;
|
|
22
|
-
inProgressCount: number;
|
|
23
|
-
};
|
|
24
|
-
export declare const POLLING_INTERVALS: {
|
|
25
|
-
INITIAL: number;
|
|
26
|
-
MEDIUM: number;
|
|
27
|
-
LONG: number;
|
|
28
|
-
MEDIUM_THRESHOLD: number;
|
|
29
|
-
LONG_THRESHOLD: number;
|
|
30
|
-
EXPORT_POLL_GRACE_MS: number;
|
|
31
|
-
FALLBACK_POLLING_DURATION: number;
|
|
32
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook that recovers active exports when the app mounts or page refreshes.
|
|
3
|
-
*
|
|
4
|
-
* This ensures that:
|
|
5
|
-
* - Users don't lose track of their exports after a page refresh
|
|
6
|
-
* - The notification tray shows all in-progress exports
|
|
7
|
-
* - Polling resumes for any ongoing exports
|
|
8
|
-
*
|
|
9
|
-
* Should be called once at the app root level (e.g., in dashboard-plus.tsx).
|
|
10
|
-
*/
|
|
11
|
-
export declare function useExportRecovery(): void;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents an active or recently completed export job.
|
|
3
|
-
*/
|
|
4
|
-
export interface ActiveExport {
|
|
5
|
-
id: string;
|
|
6
|
-
status: 'pending' | 'processing' | 'chunking' | 'compacting' | 'completed' | 'failed' | 'cancelled';
|
|
7
|
-
progress: number | null;
|
|
8
|
-
title: string;
|
|
9
|
-
totalRows: number | null;
|
|
10
|
-
totalChunks: number | null;
|
|
11
|
-
rowsProcessed?: number;
|
|
12
|
-
completedChunks: number;
|
|
13
|
-
startedAt: Date;
|
|
14
|
-
lastUpdatedAt: Date;
|
|
15
|
-
completedAt?: Date;
|
|
16
|
-
downloadUrl?: string;
|
|
17
|
-
fileSize?: number;
|
|
18
|
-
error?: string;
|
|
19
|
-
expiresAt: Date;
|
|
20
|
-
/** Matrix exports: the server's phase, for the bell's stage text (M9, M10, M12). */
|
|
21
|
-
phase?: 'preparing' | 'acquiring' | 'finalizing' | 'completed';
|
|
22
|
-
/** When the server stops the export; polling gives up a grace period later (MX-D9). */
|
|
23
|
-
deadlineAt?: Date;
|
|
24
|
-
}
|
|
25
|
-
type ExportStoreState = {
|
|
26
|
-
/** Map of export ID to export data */
|
|
27
|
-
activeExports: Map<string, ActiveExport>;
|
|
28
|
-
};
|
|
29
|
-
type ExportStoreActions = {
|
|
30
|
-
/** Add a new export to the store */
|
|
31
|
-
addExport: (exportData: ActiveExport) => void;
|
|
32
|
-
/** Update an existing export */
|
|
33
|
-
updateExport: (id: string, updates: Partial<ActiveExport>) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Applies a server answer (poll, refresh). An answer never moves an export
|
|
36
|
-
* that is final here back to in progress: a newer answer already settled it.
|
|
37
|
-
*/
|
|
38
|
-
applyServerStatus: (id: string, updates: Partial<ActiveExport>) => void;
|
|
39
|
-
/** Adds a recovered export only if it is not tracked already (checked when adding). */
|
|
40
|
-
recoverExport: (exportData: ActiveExport) => void;
|
|
41
|
-
/** Remove an export from the store */
|
|
42
|
-
removeExport: (id: string) => void;
|
|
43
|
-
/** Get all in-progress exports */
|
|
44
|
-
getInProgressExports: () => ActiveExport[];
|
|
45
|
-
/** Get all exports as an array */
|
|
46
|
-
getAllExports: () => ActiveExport[];
|
|
47
|
-
/** Clear all completed/failed exports */
|
|
48
|
-
clearCompleted: () => void;
|
|
49
|
-
/** Check if there are any in-progress exports */
|
|
50
|
-
hasInProgressExports: () => boolean;
|
|
51
|
-
};
|
|
52
|
-
export type ExportStore = ExportStoreState & {
|
|
53
|
-
actions: ExportStoreActions;
|
|
54
|
-
};
|
|
55
|
-
export declare const useExportStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<ExportStore>, "setState"> & {
|
|
56
|
-
setState(nextStateOrUpdater: ExportStore | Partial<ExportStore> | ((state: import('immer').WritableDraft<ExportStore>) => void), shouldReplace?: false): void;
|
|
57
|
-
setState(nextStateOrUpdater: ExportStore | ((state: import('immer').WritableDraft<ExportStore>) => void), shouldReplace: true): void;
|
|
58
|
-
}>;
|
|
59
|
-
export declare const useExportActions: () => ExportStoreActions;
|
|
60
|
-
export declare const useActiveExports: () => Map<string, ActiveExport>;
|
|
61
|
-
export declare const useInProgressExportsCount: () => number;
|
|
62
|
-
export {};
|