@meridianlabs/inspect-scout-viewer 0.4.6 → 0.4.7
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/lib/App.d.ts +1 -0
- package/lib/AppRouter.d.ts +2 -0
- package/lib/api/api.d.ts +13 -1
- package/lib/app/components/ActivityBarLayout.d.ts +2 -0
- package/lib/app/components/Chip.d.ts +12 -0
- package/lib/app/components/ChipGroup.d.ts +7 -0
- package/lib/app/components/NextPreviousNav.d.ts +11 -0
- package/lib/app/components/ProjectBar.d.ts +7 -0
- package/lib/app/components/ScansNavbar.d.ts +1 -1
- package/lib/app/components/ValidationResult.d.ts +3 -0
- package/lib/app/hooks/useFilterConditions.d.ts +6 -0
- package/lib/app/project/ProjectPanel.d.ts +7 -0
- package/lib/app/project/SettingsContent.d.ts +7 -0
- package/lib/app/project/components/FormFields.d.ts +67 -0
- package/lib/app/project/configUtils.d.ts +30 -0
- package/lib/app/project/hooks/useNestedConfig.d.ts +28 -0
- package/lib/app/runScan/ActiveScanView.d.ts +6 -0
- package/lib/app/runScan/DefineScannerSection.d.ts +6 -0
- package/lib/app/runScan/RunScanPanel.d.ts +2 -0
- package/lib/app/scannerResult/result/ResultBody.d.ts +2 -2
- package/lib/app/scannerResult/result/ResultPanel.d.ts +3 -2
- package/lib/app/scans/ScansGrid.d.ts +2 -2
- package/lib/app/server/useActiveScan.d.ts +3 -0
- package/lib/app/server/useActiveScans.d.ts +3 -0
- package/lib/app/server/useAdjacentTranscriptIds.d.ts +10 -0
- package/lib/app/server/useCode.d.ts +4 -0
- package/lib/app/server/useConfig.d.ts +1 -0
- package/lib/app/server/useProjectConfig.d.ts +30 -0
- package/lib/app/server/useScan.d.ts +4 -0
- package/lib/app/server/useScanDataframe.d.ts +9 -0
- package/lib/app/server/useScanDataframeInput.d.ts +10 -0
- package/lib/app/server/useScans.d.ts +3 -0
- package/lib/app/server/{useServerScansInfinite.d.ts → useScansInfinite.d.ts} +1 -1
- package/lib/app/server/useServerTranscriptsInfinite.d.ts +9 -2
- package/lib/app/server/useStartScan.d.ts +3 -0
- package/lib/app/server/useTranscript.d.ts +9 -0
- package/lib/app/server/useTranscriptsColumnValues.d.ts +11 -0
- package/lib/app/transcript/TranscriptBody.d.ts +2 -1
- package/lib/app/transcript/TranscriptNav.d.ts +10 -0
- package/lib/app/transcripts/TranscriptColumnsButton.d.ts +6 -0
- package/lib/app/transcripts/TranscriptColumnsPopover.d.ts +7 -0
- package/lib/app/transcripts/TranscriptFilterBar.d.ts +7 -0
- package/lib/app/transcripts/TranscriptsGrid.d.ts +5 -0
- package/lib/app/transcripts/columnFilter/ColumnFilterButton.d.ts +6 -0
- package/lib/app/transcripts/columnFilter/ColumnFilterControl.d.ts +16 -0
- package/lib/app/transcripts/columnFilter/ColumnFilterEditor.d.ts +18 -0
- package/lib/app/transcripts/columnFilter/index.d.ts +7 -0
- package/lib/app/transcripts/columnFilter/useColumnFilter.d.ts +19 -0
- package/lib/app/transcripts/columnFilter/useColumnFilterPopover.d.ts +22 -0
- package/lib/app/transcripts/columnSizing/defaultStrategy.d.ts +2 -0
- package/lib/app/transcripts/columnSizing/fitContentStrategy.d.ts +2 -0
- package/lib/app/transcripts/columnSizing/index.d.ts +4 -0
- package/lib/app/transcripts/columnSizing/strategies.d.ts +10 -0
- package/lib/app/transcripts/columnSizing/types.d.ts +47 -0
- package/lib/app/transcripts/columnSizing/useColumnSizing.d.ts +34 -0
- package/lib/app/transcripts/columnSizing/utils.d.ts +14 -0
- package/lib/app/transcripts/columns.d.ts +30 -0
- package/lib/app/transcripts/constants.d.ts +35 -0
- package/lib/components/AutocompleteInput.d.ts +17 -0
- package/lib/components/Modal.d.ts +10 -0
- package/lib/components/ToolButton.d.ts +1 -1
- package/lib/components/ToolDropdownButton.d.ts +3 -0
- package/lib/components/icons.d.ts +3 -0
- package/lib/components/transcript/TranscriptViewNodes.d.ts +13 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +29357 -13421
- package/lib/index.js.map +1 -1
- package/lib/router/url.d.ts +2 -0
- package/lib/state/store.d.ts +13 -5
- package/lib/styles/index.css +1265 -263
- package/lib/types/api-types.d.ts +10 -1
- package/lib/types/generated.d.ts +817 -8
- package/lib/utils/react-query.d.ts +1 -0
- package/package.json +2 -1
- package/lib/app/components/ToolButton.d.ts +0 -8
- package/lib/app/server/useServerScan.d.ts +0 -3
- package/lib/app/server/useServerScanDataframe.d.ts +0 -3
- package/lib/app/server/useServerScanDataframeInput.d.ts +0 -3
- package/lib/app/server/useServerScans.d.ts +0 -3
- package/lib/app/server/useServerTranscript.d.ts +0 -3
- package/lib/app/transcripts/ColumnFilterControl.d.ts +0 -11
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SimpleCondition } from '../../../query/types';
|
|
2
|
+
import { FilterType } from '../../../state/store';
|
|
3
|
+
import { useColumnFilter } from './useColumnFilter';
|
|
4
|
+
export interface UseColumnFilterPopoverParams {
|
|
5
|
+
columnId: string;
|
|
6
|
+
filterType: FilterType;
|
|
7
|
+
condition: SimpleCondition | null;
|
|
8
|
+
onChange: (condition: SimpleCondition | null) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface UseColumnFilterPopoverReturn {
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
setIsOpen: (open: boolean) => void;
|
|
13
|
+
operator: ReturnType<typeof useColumnFilter>["operator"];
|
|
14
|
+
setOperator: ReturnType<typeof useColumnFilter>["setOperator"];
|
|
15
|
+
operatorOptions: ReturnType<typeof useColumnFilter>["operatorOptions"];
|
|
16
|
+
value: ReturnType<typeof useColumnFilter>["value"];
|
|
17
|
+
setValue: ReturnType<typeof useColumnFilter>["setValue"];
|
|
18
|
+
isValueDisabled: ReturnType<typeof useColumnFilter>["usesValue"];
|
|
19
|
+
commitAndClose: () => void;
|
|
20
|
+
cancelAndClose: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function useColumnFilterPopover({ columnId, filterType, condition, onChange, }: UseColumnFilterPopoverParams): UseColumnFilterPopoverReturn;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColumnSizingStrategyKey, SizingStrategy } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Registry of all available sizing strategies.
|
|
4
|
+
*/
|
|
5
|
+
export declare const sizingStrategies: Record<ColumnSizingStrategyKey, SizingStrategy>;
|
|
6
|
+
/**
|
|
7
|
+
* Get a sizing strategy by key.
|
|
8
|
+
* Falls back to default strategy if key is not found.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getSizingStrategy(key: ColumnSizingStrategyKey): SizingStrategy;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ColumnSizingState } from '@tanstack/react-table';
|
|
2
|
+
import { TranscriptInfo } from '../../../types/api-types';
|
|
3
|
+
import { TranscriptColumn } from '../columns';
|
|
4
|
+
/**
|
|
5
|
+
* Size constraints for a column.
|
|
6
|
+
*/
|
|
7
|
+
export interface ColumnSizeConstraints {
|
|
8
|
+
/** Default size in pixels */
|
|
9
|
+
size: number;
|
|
10
|
+
/** Minimum allowed size in pixels */
|
|
11
|
+
minSize: number;
|
|
12
|
+
/** Maximum allowed size in pixels */
|
|
13
|
+
maxSize: number;
|
|
14
|
+
}
|
|
15
|
+
/** Default minimum column size in pixels */
|
|
16
|
+
export declare const DEFAULT_MIN_SIZE = 40;
|
|
17
|
+
/** Default maximum column size in pixels */
|
|
18
|
+
export declare const DEFAULT_MAX_SIZE = 600;
|
|
19
|
+
/** Default column size in pixels when not specified */
|
|
20
|
+
export declare const DEFAULT_SIZE = 150;
|
|
21
|
+
/**
|
|
22
|
+
* Context provided to sizing strategies for computing column sizes.
|
|
23
|
+
*/
|
|
24
|
+
export interface SizingStrategyContext {
|
|
25
|
+
/** The table element for DOM measurements (may be null) */
|
|
26
|
+
tableElement: HTMLTableElement | null;
|
|
27
|
+
/** Column definitions */
|
|
28
|
+
columns: TranscriptColumn[];
|
|
29
|
+
/** Current data for content measurement */
|
|
30
|
+
data: TranscriptInfo[];
|
|
31
|
+
/** Pre-computed constraints for each column */
|
|
32
|
+
constraints: Map<string, ColumnSizeConstraints>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Interface for column sizing strategies.
|
|
36
|
+
* Each strategy computes column sizes differently.
|
|
37
|
+
*/
|
|
38
|
+
export interface SizingStrategy {
|
|
39
|
+
/** Compute sizes for all columns */
|
|
40
|
+
computeSizes(context: SizingStrategyContext): ColumnSizingState;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Available sizing strategy keys.
|
|
44
|
+
* - "default": Uses the column's defined `size` property
|
|
45
|
+
* - "fit-content": Measures content and sizes columns to fit within min/max constraints
|
|
46
|
+
*/
|
|
47
|
+
export type ColumnSizingStrategyKey = "default" | "fit-content";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ColumnSizingState, OnChangeFn } from '@tanstack/react-table';
|
|
2
|
+
import { TranscriptInfo } from '../../../types/api-types';
|
|
3
|
+
import { TranscriptColumn } from '../columns';
|
|
4
|
+
import { ColumnSizingStrategyKey } from './types';
|
|
5
|
+
interface UseColumnSizingOptions {
|
|
6
|
+
/** Column definitions */
|
|
7
|
+
columns: TranscriptColumn[];
|
|
8
|
+
/** Reference to the table element for DOM measurement */
|
|
9
|
+
tableRef: React.RefObject<HTMLTableElement | null>;
|
|
10
|
+
/** Current data for content measurement */
|
|
11
|
+
data: TranscriptInfo[];
|
|
12
|
+
}
|
|
13
|
+
interface UseColumnSizingResult {
|
|
14
|
+
/** Current column sizing state */
|
|
15
|
+
columnSizing: ColumnSizingState;
|
|
16
|
+
/** Handler for column sizing changes with min/max enforcement */
|
|
17
|
+
handleColumnSizingChange: OnChangeFn<ColumnSizingState>;
|
|
18
|
+
/** Current sizing strategy key */
|
|
19
|
+
sizingStrategy: ColumnSizingStrategyKey;
|
|
20
|
+
/** Set the sizing strategy */
|
|
21
|
+
setSizingStrategy: (strategy: ColumnSizingStrategyKey) => void;
|
|
22
|
+
/** Apply auto-sizing based on current strategy (preserves manually resized columns) */
|
|
23
|
+
applyAutoSizing: () => void;
|
|
24
|
+
/** Reset a single column to its auto-calculated size */
|
|
25
|
+
resetColumnSize: (columnId: string) => void;
|
|
26
|
+
/** Reset all column sizing and clear manual resize tracking */
|
|
27
|
+
clearColumnSizing: () => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Hook for managing column sizing with min/max constraints and auto-sizing.
|
|
31
|
+
* Manually resized columns are preserved during auto-sizing operations.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useColumnSizing({ columns, tableRef, data, }: UseColumnSizingOptions): UseColumnSizingResult;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TranscriptColumn } from '../columns';
|
|
2
|
+
import { ColumnSizeConstraints } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Extract size constraints from column definitions.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getColumnConstraints(columns: TranscriptColumn[]): Map<string, ColumnSizeConstraints>;
|
|
7
|
+
/**
|
|
8
|
+
* Clamp a size value to min/max constraints.
|
|
9
|
+
*/
|
|
10
|
+
export declare function clampSize(size: number, constraints: ColumnSizeConstraints): number;
|
|
11
|
+
/**
|
|
12
|
+
* Get the column ID from a column definition.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getColumnId(column: TranscriptColumn): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import { FilterType } from '../../state/store';
|
|
3
|
+
import { TranscriptInfo } from '../../types/api-types';
|
|
4
|
+
export type TranscriptColumn = ColumnDef<TranscriptInfo> & {
|
|
5
|
+
meta?: {
|
|
6
|
+
align?: "left" | "center" | "right";
|
|
7
|
+
filterable?: boolean;
|
|
8
|
+
filterType?: FilterType;
|
|
9
|
+
};
|
|
10
|
+
/** Returns string for tooltip display */
|
|
11
|
+
titleValue?: (value: unknown) => string;
|
|
12
|
+
/** Returns string representation for column width measurement. Return null to skip content measurement. */
|
|
13
|
+
textValue?: (value: unknown) => string | null;
|
|
14
|
+
/** Minimum column width in pixels */
|
|
15
|
+
minSize?: number;
|
|
16
|
+
/** Maximum column width in pixels */
|
|
17
|
+
maxSize?: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const DEFAULT_COLUMN_ORDER: Array<keyof TranscriptInfo>;
|
|
20
|
+
export declare const DEFAULT_VISIBLE_COLUMNS: Array<keyof TranscriptInfo>;
|
|
21
|
+
/**
|
|
22
|
+
* Get columns for the TranscriptsGrid.
|
|
23
|
+
* @param visibleColumnKeys - Optional list of column keys to display. If not provided, returns all columns in default order.
|
|
24
|
+
* @returns Array of column definitions in the order specified or default order.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getTranscriptColumns(visibleColumnKeys?: Array<keyof TranscriptInfo>): TranscriptColumn[];
|
|
27
|
+
/**
|
|
28
|
+
* Extract title value for tooltip from a cell.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getCellTitleValue(cell: any, columnDef: TranscriptColumn): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infinite Scroll Tuning
|
|
3
|
+
*
|
|
4
|
+
* Goal: user never hits bottom while waiting for next page.
|
|
5
|
+
*
|
|
6
|
+
* Formula: threshold >= scroll_speed × fetch_duration
|
|
7
|
+
*
|
|
8
|
+
* Assumptions:
|
|
9
|
+
* row_height = 29px
|
|
10
|
+
* fetch_duration = 300-1000ms (variable with fixed overhead)
|
|
11
|
+
* max_scroll_speed = 1500px/s (typical fast scroller)
|
|
12
|
+
*
|
|
13
|
+
* Check at typical speed (1500px/s):
|
|
14
|
+
* runway_time = 2000px / 1500px/s = 1333ms
|
|
15
|
+
* worst_case_fetch = 1000ms
|
|
16
|
+
* margin = 333ms ✓
|
|
17
|
+
*
|
|
18
|
+
* Check at extreme speed (5000px/s):
|
|
19
|
+
* runway_time = 2000px / 5000px/s = 400ms
|
|
20
|
+
* median_fetch = ~350ms
|
|
21
|
+
* margin = 50ms (tight but ok) ✓
|
|
22
|
+
*
|
|
23
|
+
* Why large pageSize? Fetch duration is mostly fixed overhead, so larger
|
|
24
|
+
* pages = fewer fetches = fewer stall opportunities. 500 rows gives ~9.7s
|
|
25
|
+
* of scrolling per page at 1500px/s.
|
|
26
|
+
*
|
|
27
|
+
* Note: If threshold > pageSize_px, the next page is prefetched immediately
|
|
28
|
+
* after the current page loads. This is fine for maximum smoothness.
|
|
29
|
+
*/
|
|
30
|
+
export declare const TRANSCRIPTS_INFINITE_SCROLL_CONFIG: {
|
|
31
|
+
/** Number of rows to fetch per page (500 rows = 14,500px at 29px/row) */
|
|
32
|
+
readonly pageSize: 500;
|
|
33
|
+
/** Distance from bottom (in px) at which to trigger fetch (~69 rows) */
|
|
34
|
+
readonly threshold: 2000;
|
|
35
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface AutocompleteInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
onCommit?: () => void;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
suggestions: Array<string | number | boolean | null>;
|
|
11
|
+
autoFocus?: boolean;
|
|
12
|
+
maxSuggestions?: number;
|
|
13
|
+
charactersBeforeSuggesting?: number;
|
|
14
|
+
maxSuggestionWidth?: number;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const AutocompleteInput: FC<AutocompleteInputProps>;
|
|
@@ -3,6 +3,9 @@ interface ToolDropdownButtonProps extends ButtonHTMLAttributes<HTMLButtonElement
|
|
|
3
3
|
label: string | ReactNode;
|
|
4
4
|
icon?: string;
|
|
5
5
|
items: Record<string, () => void>;
|
|
6
|
+
dropdownAlign?: "left" | "right";
|
|
7
|
+
dropdownClassName?: string | string[];
|
|
8
|
+
subtle?: boolean;
|
|
6
9
|
}
|
|
7
10
|
export declare const ToolDropdownButton: import('react').ForwardRefExoticComponent<ToolDropdownButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
8
11
|
export {};
|
|
@@ -95,6 +95,7 @@ export declare const ApplicationIcons: {
|
|
|
95
95
|
pendingTask: string;
|
|
96
96
|
pendingTaskSubtle: string;
|
|
97
97
|
play: string;
|
|
98
|
+
"play-circle": string;
|
|
98
99
|
previous: string;
|
|
99
100
|
refresh: string;
|
|
100
101
|
refuse: string;
|
|
@@ -126,6 +127,7 @@ export declare const ApplicationIcons: {
|
|
|
126
127
|
subtask: string;
|
|
127
128
|
success: string;
|
|
128
129
|
successSubtle: string;
|
|
130
|
+
threeDots: string;
|
|
129
131
|
transcript: string;
|
|
130
132
|
tree: {
|
|
131
133
|
open: string;
|
|
@@ -135,4 +137,5 @@ export declare const ApplicationIcons: {
|
|
|
135
137
|
usage: string;
|
|
136
138
|
wrap: string;
|
|
137
139
|
x: string;
|
|
140
|
+
xLarge: string;
|
|
138
141
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { EventNode, EventType } from './types';
|
|
3
|
+
interface TranscriptViewNodesProps {
|
|
4
|
+
id: string;
|
|
5
|
+
eventNodes: EventNode[];
|
|
6
|
+
defaultCollapsedIds: Record<string, boolean>;
|
|
7
|
+
nodeFilter?: (node: EventNode<EventType>[]) => EventNode<EventType>[];
|
|
8
|
+
scrollRef?: React.RefObject<HTMLDivElement | null>;
|
|
9
|
+
initialEventId?: string | null;
|
|
10
|
+
className?: string | string[];
|
|
11
|
+
}
|
|
12
|
+
export declare const TranscriptViewNodes: FC<TranscriptViewNodesProps>;
|
|
13
|
+
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { App } from './App';
|
|
2
2
|
export { apiScoutServer } from './api/api-scout-server';
|
|
3
|
+
export { apiScoutServerV1 } from './api/api-scout-server-v1';
|
|
4
|
+
export type { HeaderProvider } from './api/api-scout-server-v1';
|
|
3
5
|
export type { ScanApi } from './api/api.ts';
|
|
4
6
|
export { ApiProvider, StoreProvider, createStore } from './state/store';
|