@you-agent-factory/factory-visualizers 0.0.0 → 0.0.2
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/factory-emulator-controls.d.ts +26 -0
- package/dist/factory-emulator-error-boundary.d.ts +26 -0
- package/dist/factory-emulator-view.d.ts +27 -0
- package/dist/factory-recording-topology-replay.d.ts +63 -0
- package/dist/factory-timeline-scrubber.d.ts +32 -0
- package/dist/factory-topology-active-work.d.ts +11 -0
- package/dist/factory-topology-chrome.d.ts +14 -0
- package/dist/factory-topology-flow-projection.d.ts +12 -0
- package/dist/factory-topology-replay-nodes.d.ts +32 -0
- package/dist/factory-topology-replay.d.ts +61 -0
- package/dist/factory-topology-state.d.ts +31 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1469 -0
- package/dist/styles.css +511 -0
- package/dist/visualizer-error.d.ts +27 -0
- package/dist/work-progress-visualizer.d.ts +19 -0
- package/package.json +5 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type FactoryEmulatorControlsProps as PlaybackControlsProps } from "@you-agent-factory/components";
|
|
2
|
+
import type { HTMLAttributes } from "react";
|
|
3
|
+
import { type FactoryEmulatorFailure } from "./factory-emulator-error-boundary";
|
|
4
|
+
import { type FactoryTimelineScrubberMessages, type FactoryTimelineScrubberState } from "./factory-timeline-scrubber";
|
|
5
|
+
import type { FactoryVisualizerError } from "./visualizer-error";
|
|
6
|
+
export interface FactoryEmulatorControlsProps extends Omit<HTMLAttributes<HTMLElement>, "children" | "onError">, Omit<PlaybackControlsProps, "onError" | "onPause" | "onPlay" | "onRestart" | "onStep"> {
|
|
7
|
+
formatTick: (tick: number) => string;
|
|
8
|
+
failure?: FactoryEmulatorFailure;
|
|
9
|
+
onFollowLatest: () => void;
|
|
10
|
+
onError?: (error: FactoryVisualizerError) => void;
|
|
11
|
+
onPause: () => void;
|
|
12
|
+
onPlay: () => void;
|
|
13
|
+
onRestart: () => void;
|
|
14
|
+
onSelectTick: (tick: number) => void;
|
|
15
|
+
onStep: () => void;
|
|
16
|
+
showPlaybackControls?: boolean;
|
|
17
|
+
showTimelineScrubber?: boolean;
|
|
18
|
+
timeline: FactoryEmulatorControlsTimeline;
|
|
19
|
+
}
|
|
20
|
+
export interface FactoryEmulatorControlsTimeline {
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
messages: FactoryTimelineScrubberMessages;
|
|
23
|
+
state: FactoryTimelineScrubberState;
|
|
24
|
+
}
|
|
25
|
+
/** Controlled controls that make the distinction between current and historical replay explicit. */
|
|
26
|
+
export declare function FactoryEmulatorControls({ className, failure, formatTick, onFollowLatest, onError, onPause, onPlay, onRestart, onSelectTick, onStep, showPlaybackControls, showTimelineScrubber, timeline, ...playbackProps }: FactoryEmulatorControlsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
2
|
+
import { type FactoryVisualizerError } from "./visualizer-error";
|
|
3
|
+
/** A host-provided, safe-to-display local failure and optional recovery action. */
|
|
4
|
+
export interface FactoryEmulatorFailure {
|
|
5
|
+
message: string;
|
|
6
|
+
recoveryAction?: {
|
|
7
|
+
label: string;
|
|
8
|
+
onRecover: () => void;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
interface FactoryEmulatorErrorBoundaryProps {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
failure?: FactoryEmulatorFailure;
|
|
14
|
+
onError?: (error: FactoryVisualizerError) => void;
|
|
15
|
+
regionLabel: string;
|
|
16
|
+
}
|
|
17
|
+
interface FactoryEmulatorErrorBoundaryState {
|
|
18
|
+
error?: FactoryVisualizerError;
|
|
19
|
+
}
|
|
20
|
+
export declare class FactoryEmulatorErrorBoundary extends Component<FactoryEmulatorErrorBoundaryProps, FactoryEmulatorErrorBoundaryState> {
|
|
21
|
+
state: FactoryEmulatorErrorBoundaryState;
|
|
22
|
+
static getDerivedStateFromError(): FactoryEmulatorErrorBoundaryState;
|
|
23
|
+
componentDidCatch(error: unknown, _errorInfo: ErrorInfo): void;
|
|
24
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { type FactoryEmulatorControlsProps } from "./factory-emulator-controls";
|
|
3
|
+
import { type FactoryEmulatorFailure } from "./factory-emulator-error-boundary";
|
|
4
|
+
import { type FactoryTopologyReplayProps } from "./factory-topology-replay";
|
|
5
|
+
import type { FactoryTopologyReplayError } from "./visualizer-error";
|
|
6
|
+
import { type WorkProgressVisualizerProps } from "./work-progress-visualizer";
|
|
7
|
+
export type FactoryEmulatorViewPreset = "compact" | "display-only" | "full";
|
|
8
|
+
export interface FactoryEmulatorViewVisibility {
|
|
9
|
+
playbackControls?: boolean;
|
|
10
|
+
runtimeStatus?: boolean;
|
|
11
|
+
speedControl?: boolean;
|
|
12
|
+
submission?: boolean;
|
|
13
|
+
timelineScrubber?: boolean;
|
|
14
|
+
workProgress?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface FactoryEmulatorViewProps extends Omit<HTMLAttributes<HTMLElement>, "children" | "onError"> {
|
|
17
|
+
controls: FactoryEmulatorControlsProps;
|
|
18
|
+
failure?: FactoryEmulatorFailure;
|
|
19
|
+
onError?: (error: FactoryTopologyReplayError) => void;
|
|
20
|
+
preset?: FactoryEmulatorViewPreset;
|
|
21
|
+
submission?: ReactNode;
|
|
22
|
+
topology: FactoryTopologyReplayProps;
|
|
23
|
+
visibility?: FactoryEmulatorViewVisibility;
|
|
24
|
+
workProgress: WorkProgressVisualizerProps;
|
|
25
|
+
}
|
|
26
|
+
/** A controlled Factory emulator layout. Presets select regions; hosts retain all state and behavior. */
|
|
27
|
+
export declare function FactoryEmulatorView({ className, controls, failure, onError, preset, submission, topology, visibility, workProgress, ...sectionProps }: FactoryEmulatorViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type FactoryRecording, type RecordingValidationIssue } from "@you-agent-factory/client";
|
|
2
|
+
import { type FactoryActivityProjection, type FactoryLoadProjection, type FactoryTopologyNode, type FactoryTopologyProjection, type FactoryWorkProgressProjection } from "@you-agent-factory/factory-replay";
|
|
3
|
+
import { type FactoryTimelineScrubberMessages } from "./factory-timeline-scrubber";
|
|
4
|
+
import { type FactoryTopologyReplayMessages } from "./factory-topology-replay";
|
|
5
|
+
import type { FactoryVisualizerError } from "./visualizer-error";
|
|
6
|
+
import { type WorkProgressVisualizerMessages } from "./work-progress-visualizer";
|
|
7
|
+
export interface FactoryRecordingValidationDiagnosticIssue {
|
|
8
|
+
category: RecordingValidationIssue["category"];
|
|
9
|
+
code: RecordingValidationIssue["code"];
|
|
10
|
+
path: readonly (number | string)[];
|
|
11
|
+
}
|
|
12
|
+
export interface FactoryRecordingValidationDiagnostic {
|
|
13
|
+
issues: readonly FactoryRecordingValidationDiagnosticIssue[];
|
|
14
|
+
kind: "recording-validation";
|
|
15
|
+
message: string;
|
|
16
|
+
recoverable: false;
|
|
17
|
+
}
|
|
18
|
+
export type FactoryRecordingTopologyReplayError = FactoryRecordingValidationDiagnostic | FactoryVisualizerError | import("./visualizer-error").FactoryVisualizationLayoutDiagnostic;
|
|
19
|
+
export interface FactoryRecordingTopologyReplayMessages {
|
|
20
|
+
progress: WorkProgressVisualizerMessages;
|
|
21
|
+
regionLabel: string;
|
|
22
|
+
selectedTick: (formattedTick: string) => string;
|
|
23
|
+
timeline: FactoryTimelineScrubberMessages;
|
|
24
|
+
topology: FactoryTopologyReplayMessages;
|
|
25
|
+
validationFailed: string;
|
|
26
|
+
}
|
|
27
|
+
export interface FactoryRecordingTopologyReplayProps {
|
|
28
|
+
defaultSelectedTick?: number;
|
|
29
|
+
formatNumber: (value: number) => string;
|
|
30
|
+
/** Presentation-only content validated by the controlled topology renderer. */
|
|
31
|
+
layout?: unknown;
|
|
32
|
+
messages: FactoryRecordingTopologyReplayMessages;
|
|
33
|
+
onError?: (error: FactoryRecordingTopologyReplayError) => void;
|
|
34
|
+
onSelectNode?: (node: FactoryTopologyNode) => void;
|
|
35
|
+
recording?: unknown;
|
|
36
|
+
selectedNodeId?: string;
|
|
37
|
+
state?: FactoryRecordingTopologyReplayState;
|
|
38
|
+
}
|
|
39
|
+
export type FactoryRecordingTopologyReplayState = {
|
|
40
|
+
error: FactoryVisualizerError;
|
|
41
|
+
status: "failed";
|
|
42
|
+
} | {
|
|
43
|
+
status: "loading";
|
|
44
|
+
} | {
|
|
45
|
+
recording: unknown;
|
|
46
|
+
status: "ready";
|
|
47
|
+
};
|
|
48
|
+
interface RecordingProjection {
|
|
49
|
+
activity: FactoryActivityProjection;
|
|
50
|
+
load: FactoryLoadProjection;
|
|
51
|
+
progress: FactoryWorkProgressProjection;
|
|
52
|
+
topology: FactoryTopologyProjection;
|
|
53
|
+
}
|
|
54
|
+
export interface RecordingProjectionCache {
|
|
55
|
+
events?: FactoryRecording["events"];
|
|
56
|
+
projections: Map<number, RecordingProjection>;
|
|
57
|
+
}
|
|
58
|
+
export declare const MAX_CACHED_RECORDING_PROJECTIONS = 32;
|
|
59
|
+
export declare function createRecordingProjectionCache(): RecordingProjectionCache;
|
|
60
|
+
/** Validate and replay one caller-owned recording through the controlled visualizers. */
|
|
61
|
+
export declare function FactoryRecordingTopologyReplay({ defaultSelectedTick, formatNumber, layout, messages, onError, onSelectNode, recording, selectedNodeId, state, }: FactoryRecordingTopologyReplayProps): import("react").JSX.Element;
|
|
62
|
+
export declare function projectRecordingAtTick(events: FactoryRecording["events"], tick: number, cache: RecordingProjectionCache): RecordingProjection;
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
export type FactoryTimelineMode = "current" | "history";
|
|
3
|
+
export type FactoryTimelineScrubberState = {
|
|
4
|
+
earliestTick: number;
|
|
5
|
+
latestTick: number;
|
|
6
|
+
mode: FactoryTimelineMode;
|
|
7
|
+
selectedTick: number;
|
|
8
|
+
status: "available";
|
|
9
|
+
} | {
|
|
10
|
+
status: "unavailable";
|
|
11
|
+
};
|
|
12
|
+
export interface FactoryTimelineScrubberMessages {
|
|
13
|
+
alreadyFollowingLatest: string;
|
|
14
|
+
disabled: string;
|
|
15
|
+
followLatest: string;
|
|
16
|
+
historyMode: string;
|
|
17
|
+
currentMode: string;
|
|
18
|
+
position: (formattedSelectedTick: string, formattedLatestTick: string) => string;
|
|
19
|
+
regionLabel: string;
|
|
20
|
+
sliderLabel: string;
|
|
21
|
+
title: string;
|
|
22
|
+
unavailable: string;
|
|
23
|
+
}
|
|
24
|
+
export interface FactoryTimelineScrubberProps extends Omit<HTMLAttributes<HTMLElement>, "children"> {
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
formatTick: (tick: number) => string;
|
|
27
|
+
messages: FactoryTimelineScrubberMessages;
|
|
28
|
+
onFollowLatest: () => void;
|
|
29
|
+
onSelectTick: (tick: number) => void;
|
|
30
|
+
state: FactoryTimelineScrubberState;
|
|
31
|
+
}
|
|
32
|
+
export declare function FactoryTimelineScrubber({ className, disabled, formatTick, messages, onFollowLatest, onSelectTick, state, ...sectionProps }: FactoryTimelineScrubberProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FactoryActivityProjection } from "@you-agent-factory/factory-replay";
|
|
2
|
+
export interface FactoryTopologyActiveWorkRow {
|
|
3
|
+
durationTicks: number;
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface FactoryTopologyActiveWorkSummary {
|
|
7
|
+
overflowCount: number;
|
|
8
|
+
rows: readonly FactoryTopologyActiveWorkRow[];
|
|
9
|
+
}
|
|
10
|
+
/** Derives bounded, read-only Work activity from the prepared projection. */
|
|
11
|
+
export declare function projectFactoryTopologyActiveWork(activity: FactoryActivityProjection): FactoryTopologyActiveWorkSummary;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Optional presentation regions for the public, read-only Factory topology. */
|
|
2
|
+
export type FactoryTopologyChromeRegion = "legend" | "background" | "viewportControls" | "visibilityControls";
|
|
3
|
+
export type FactoryTopologyChromePreset = "full" | "minimal" | "none";
|
|
4
|
+
export interface FactoryTopologyChromeConfiguration {
|
|
5
|
+
background?: boolean;
|
|
6
|
+
legend?: boolean;
|
|
7
|
+
preset?: FactoryTopologyChromePreset;
|
|
8
|
+
viewportControls?: boolean;
|
|
9
|
+
visibilityControls?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type ResolvedFactoryTopologyChrome = Readonly<Record<FactoryTopologyChromeRegion, boolean>>;
|
|
12
|
+
export declare const DEFAULT_FACTORY_TOPOLOGY_CHROME_PRESET: FactoryTopologyChromePreset;
|
|
13
|
+
/** Resolves presentation without receiving or changing replay projection data. */
|
|
14
|
+
export declare function resolveFactoryTopologyChrome(configuration?: FactoryTopologyChromeConfiguration): ResolvedFactoryTopologyChrome;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Edge, Node } from "@xyflow/react";
|
|
2
|
+
import type { FactoryVisualizationLayoutV1 } from "@you-agent-factory/client";
|
|
3
|
+
import type { FactoryTopologyNode } from "@you-agent-factory/factory-replay";
|
|
4
|
+
import type { FactoryTopologyReplayMessages, FactoryTopologyReplayProjection } from "./factory-topology-replay";
|
|
5
|
+
import type { AnnotationNodeData, TopologyNodeData } from "./factory-topology-replay-nodes";
|
|
6
|
+
export interface FactoryTopologyFlowProjection {
|
|
7
|
+
edges: Edge[];
|
|
8
|
+
nodes: Node<TopologyNodeData | AnnotationNodeData>[];
|
|
9
|
+
validEndpoints: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Convert immutable replay projections into disposable React Flow view data. */
|
|
12
|
+
export declare function projectFactoryTopologyFlow(projection: FactoryTopologyReplayProjection, messages: FactoryTopologyReplayMessages, selectedNodeId: string | undefined, onSelectNode: ((node: FactoryTopologyNode) => void) | undefined, prefersReducedMotion?: boolean, layout?: FactoryVisualizationLayoutV1): FactoryTopologyFlowProjection;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Node, NodeProps } from "@xyflow/react";
|
|
2
|
+
import type { FactoryVisualizationAnnotation, FactoryVisualizationNodeEmptyState } from "@you-agent-factory/client";
|
|
3
|
+
import type { FactoryTopologyNode } from "@you-agent-factory/factory-replay";
|
|
4
|
+
import type { FactoryTopologyReplayMessages } from "./factory-topology-replay";
|
|
5
|
+
export interface TopologyNodeData extends Record<string, unknown> {
|
|
6
|
+
activityCount: number;
|
|
7
|
+
emptyState?: FactoryVisualizationNodeEmptyState["content"];
|
|
8
|
+
messages: FactoryTopologyReplayMessages;
|
|
9
|
+
node: FactoryTopologyNode;
|
|
10
|
+
occupancy?: {
|
|
11
|
+
capacity?: number;
|
|
12
|
+
evidence: "known" | "unavailable";
|
|
13
|
+
occupied?: number;
|
|
14
|
+
};
|
|
15
|
+
onSelectNode?: (node: FactoryTopologyNode) => void;
|
|
16
|
+
selected: boolean;
|
|
17
|
+
workStateCount?: {
|
|
18
|
+
count?: number;
|
|
19
|
+
evidence: "known" | "unavailable";
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface AnnotationNodeData extends Record<string, unknown> {
|
|
23
|
+
annotation: FactoryVisualizationAnnotation;
|
|
24
|
+
messages: FactoryTopologyReplayMessages;
|
|
25
|
+
}
|
|
26
|
+
export declare const nodeTypes: {
|
|
27
|
+
factoryTopologyAnnotation: typeof FactoryTopologyAnnotationView;
|
|
28
|
+
factoryTopologyNode: typeof FactoryTopologyNodeView;
|
|
29
|
+
};
|
|
30
|
+
declare function FactoryTopologyAnnotationView({ data, }: NodeProps<Node<AnnotationNodeData>>): import("react").JSX.Element;
|
|
31
|
+
declare function FactoryTopologyNodeView({ data }: NodeProps<Node<TopologyNodeData>>): import("react").JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { FactoryActivityProjection, FactoryLoadProjection, FactoryTopologyNode, FactoryTopologyProjection } from "@you-agent-factory/factory-replay";
|
|
2
|
+
import { type FactoryTopologyChromeConfiguration } from "./factory-topology-chrome";
|
|
3
|
+
export type { FactoryTopologyFlowProjection } from "./factory-topology-flow-projection";
|
|
4
|
+
export { projectFactoryTopologyFlow } from "./factory-topology-flow-projection";
|
|
5
|
+
import type { FactoryTopologyReplayError } from "./visualizer-error";
|
|
6
|
+
export interface FactoryTopologyReplayProjection {
|
|
7
|
+
activity: FactoryActivityProjection;
|
|
8
|
+
load: FactoryLoadProjection;
|
|
9
|
+
topology: FactoryTopologyProjection;
|
|
10
|
+
}
|
|
11
|
+
export type FactoryTopologyReplayState = {
|
|
12
|
+
status: "empty";
|
|
13
|
+
} | {
|
|
14
|
+
status: "failed";
|
|
15
|
+
} | {
|
|
16
|
+
status: "loading";
|
|
17
|
+
} | {
|
|
18
|
+
projection: FactoryTopologyReplayProjection;
|
|
19
|
+
status: "ready";
|
|
20
|
+
};
|
|
21
|
+
export interface FactoryTopologyReplayMessages {
|
|
22
|
+
activeDispatches: (count: number) => string;
|
|
23
|
+
/** Optional fields retain compatibility for existing controlled consumers. */
|
|
24
|
+
activeWorkDuration?: (durationTicks: number) => string;
|
|
25
|
+
activeWorkOverflow?: (count: number) => string;
|
|
26
|
+
activeWorkRegionLabel?: string;
|
|
27
|
+
annotationsHidden: string;
|
|
28
|
+
annotationsVisible: string;
|
|
29
|
+
empty: string;
|
|
30
|
+
failed: string;
|
|
31
|
+
inactiveDispatches: string;
|
|
32
|
+
imageFailed: string;
|
|
33
|
+
imageLoading: string;
|
|
34
|
+
/** Optional labels retain compatibility for existing controlled consumers. */
|
|
35
|
+
legendActiveRoute?: string;
|
|
36
|
+
legendInactiveRoute?: string;
|
|
37
|
+
legendLabel?: string;
|
|
38
|
+
loading: string;
|
|
39
|
+
nodeLabel: (kind: FactoryTopologyNode["kind"], label: string) => string;
|
|
40
|
+
regionLabel: string;
|
|
41
|
+
resourceOccupancy: (occupied: number, capacity: number) => string;
|
|
42
|
+
resourceOccupancyUnavailable: string;
|
|
43
|
+
retry: string;
|
|
44
|
+
selectedNode: string;
|
|
45
|
+
viewportControlsLabel?: string;
|
|
46
|
+
workStateCount: (count: number) => string;
|
|
47
|
+
workStateCountUnavailable: string;
|
|
48
|
+
}
|
|
49
|
+
export interface FactoryTopologyReplayProps {
|
|
50
|
+
/** Presentation-only optional chrome; it never changes the prepared projection. */
|
|
51
|
+
chrome?: FactoryTopologyChromeConfiguration;
|
|
52
|
+
/** Presentation-only input validated against the prepared canonical topology. */
|
|
53
|
+
layout?: unknown;
|
|
54
|
+
messages: FactoryTopologyReplayMessages;
|
|
55
|
+
onError?: (error: FactoryTopologyReplayError) => void;
|
|
56
|
+
onRetry?: () => void;
|
|
57
|
+
onSelectNode?: (node: FactoryTopologyNode) => void;
|
|
58
|
+
selectedNodeId?: string;
|
|
59
|
+
state: FactoryTopologyReplayState;
|
|
60
|
+
}
|
|
61
|
+
export declare function FactoryTopologyReplay(props: FactoryTopologyReplayProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
2
|
+
import type { FactoryTopologyReplayMessages, FactoryTopologyReplayProps } from "./factory-topology-replay";
|
|
3
|
+
import { type FactoryTopologyReplayError, type FactoryVisualizerError, type FactoryVisualizerErrorKind } from "./visualizer-error";
|
|
4
|
+
export declare function FactoryTopologyStateRegion({ messages, onRetry, state, }: {
|
|
5
|
+
messages: FactoryTopologyReplayMessages;
|
|
6
|
+
onRetry?: () => void;
|
|
7
|
+
state: "empty" | "failed" | "loading";
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
interface FactoryTopologyErrorBoundaryProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
errorKind: Extract<FactoryVisualizerErrorKind, "react-flow" | "render">;
|
|
12
|
+
messages: FactoryTopologyReplayMessages;
|
|
13
|
+
onError?: (error: FactoryVisualizerError) => void;
|
|
14
|
+
onRetry?: () => void;
|
|
15
|
+
resetKeys: readonly unknown[];
|
|
16
|
+
withinRegion?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface FactoryTopologyErrorBoundaryState {
|
|
19
|
+
error?: FactoryVisualizerError;
|
|
20
|
+
}
|
|
21
|
+
export declare class FactoryTopologyErrorBoundary extends Component<FactoryTopologyErrorBoundaryProps, FactoryTopologyErrorBoundaryState> {
|
|
22
|
+
state: FactoryTopologyErrorBoundaryState;
|
|
23
|
+
private readonly reportedErrors;
|
|
24
|
+
static getDerivedStateFromError(): FactoryTopologyErrorBoundaryState;
|
|
25
|
+
componentDidCatch(error: unknown, _errorInfo: ErrorInfo): void;
|
|
26
|
+
componentDidUpdate(previousProps: FactoryTopologyErrorBoundaryProps): void;
|
|
27
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
28
|
+
private report;
|
|
29
|
+
}
|
|
30
|
+
export declare function useDistinctTopologyErrorReport(error: FactoryTopologyReplayError | undefined, onError: FactoryTopologyReplayProps["onError"]): void;
|
|
31
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { FactoryEmulatorControls, type FactoryEmulatorControlsProps, type FactoryEmulatorControlsTimeline, } from "./factory-emulator-controls.js";
|
|
2
|
+
export type { FactoryEmulatorFailure } from "./factory-emulator-error-boundary.js";
|
|
3
|
+
export { FactoryEmulatorView, type FactoryEmulatorViewPreset, type FactoryEmulatorViewProps, type FactoryEmulatorViewVisibility, } from "./factory-emulator-view.js";
|
|
4
|
+
export { FactoryRecordingTopologyReplay, type FactoryRecordingTopologyReplayError, type FactoryRecordingTopologyReplayMessages, type FactoryRecordingTopologyReplayProps, type FactoryRecordingTopologyReplayState, type FactoryRecordingValidationDiagnostic, type FactoryRecordingValidationDiagnosticIssue, } from "./factory-recording-topology-replay.js";
|
|
5
|
+
export { type FactoryTimelineMode, FactoryTimelineScrubber, type FactoryTimelineScrubberMessages, type FactoryTimelineScrubberProps, type FactoryTimelineScrubberState, } from "./factory-timeline-scrubber.js";
|
|
6
|
+
export { DEFAULT_FACTORY_TOPOLOGY_CHROME_PRESET, type FactoryTopologyChromeConfiguration, type FactoryTopologyChromePreset, type FactoryTopologyChromeRegion, type ResolvedFactoryTopologyChrome, resolveFactoryTopologyChrome, } from "./factory-topology-chrome.js";
|
|
7
|
+
export { type FactoryTopologyFlowProjection, FactoryTopologyReplay, type FactoryTopologyReplayMessages, type FactoryTopologyReplayProjection, type FactoryTopologyReplayProps, type FactoryTopologyReplayState, projectFactoryTopologyFlow, } from "./factory-topology-replay.js";
|
|
8
|
+
export type { FactoryTopologyReplayError, FactoryVisualizationLayoutDiagnostic, FactoryVisualizerError, FactoryVisualizerErrorCause, FactoryVisualizerErrorKind, } from "./visualizer-error.js";
|
|
9
|
+
export { type WorkProgressCategoryMessage, WorkProgressVisualizer, type WorkProgressVisualizerMessages, type WorkProgressVisualizerProps, } from "./work-progress-visualizer.js";
|