@industry-theme/principal-view-panels 0.1.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/LICENSE +21 -0
- package/README.md +536 -0
- package/dist/adapters/PanelFileSystemAdapter.d.ts +82 -0
- package/dist/adapters/PanelFileSystemAdapter.d.ts.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/mocks/panelContext.d.ts +24 -0
- package/dist/mocks/panelContext.d.ts.map +1 -0
- package/dist/mocks/vvfConfigs.d.ts +32 -0
- package/dist/mocks/vvfConfigs.d.ts.map +1 -0
- package/dist/panels/ConfigLibraryBrowserPanel.d.ts +18 -0
- package/dist/panels/ConfigLibraryBrowserPanel.d.ts.map +1 -0
- package/dist/panels/ConfigLibraryBrowserPanel.stories.d.ts +42 -0
- package/dist/panels/ConfigLibraryBrowserPanel.stories.d.ts.map +1 -0
- package/dist/panels/ControlTowerIntegration.stories.d.ts +12 -0
- package/dist/panels/ControlTowerIntegration.stories.d.ts.map +1 -0
- package/dist/panels/EventControllerPanel.d.ts +32 -0
- package/dist/panels/EventControllerPanel.d.ts.map +1 -0
- package/dist/panels/EventControllerPanel.stories.d.ts +53 -0
- package/dist/panels/EventControllerPanel.stories.d.ts.map +1 -0
- package/dist/panels/EventRecorderPanel.d.ts +54 -0
- package/dist/panels/EventRecorderPanel.d.ts.map +1 -0
- package/dist/panels/EventRecorderPanel.stories.d.ts +12 -0
- package/dist/panels/EventRecorderPanel.stories.d.ts.map +1 -0
- package/dist/panels/EventRecordingIntegration.stories.d.ts +21 -0
- package/dist/panels/EventRecordingIntegration.stories.d.ts.map +1 -0
- package/dist/panels/PrincipalViewGraphPanel.d.ts +10 -0
- package/dist/panels/PrincipalViewGraphPanel.d.ts.map +1 -0
- package/dist/panels/PrincipalViewGraphPanel.stories.d.ts +77 -0
- package/dist/panels/PrincipalViewGraphPanel.stories.d.ts.map +1 -0
- package/dist/panels/principal-view/ConfigLoader.d.ts +43 -0
- package/dist/panels/principal-view/ConfigLoader.d.ts.map +1 -0
- package/dist/panels/principal-view/EmptyStateContent.d.ts +12 -0
- package/dist/panels/principal-view/EmptyStateContent.d.ts.map +1 -0
- package/dist/panels/principal-view/ErrorStateContent.d.ts +14 -0
- package/dist/panels/principal-view/ErrorStateContent.d.ts.map +1 -0
- package/dist/panels/principal-view/forceLayout.d.ts +38 -0
- package/dist/panels/principal-view/forceLayout.d.ts.map +1 -0
- package/dist/panels.bundle.js +53682 -0
- package/dist/panels.bundle.js.map +1 -0
- package/dist/tools/index.d.ts +32 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools.bundle.js +111 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
|
|
2
|
+
/**
|
|
3
|
+
* Mock canvas configurations for Storybook stories
|
|
4
|
+
*/
|
|
5
|
+
export declare const mockSimpleCanvas: ExtendedCanvas;
|
|
6
|
+
export declare const mockControlTowerCanvas: ExtendedCanvas;
|
|
7
|
+
export declare const mockComplexCanvas: ExtendedCanvas;
|
|
8
|
+
/**
|
|
9
|
+
* Mock canvas demonstrating pv.fill and pv.stroke color properties
|
|
10
|
+
* This shows the new color system where each node can have distinct fill and stroke colors
|
|
11
|
+
*/
|
|
12
|
+
export declare const mockNodeColorsCanvas: ExtendedCanvas;
|
|
13
|
+
/**
|
|
14
|
+
* Mock canvas with mixed color sources for testing priority
|
|
15
|
+
* Tests: pv.fill > node.color > default
|
|
16
|
+
* Each node uses a unique nodeType to ensure independent color testing
|
|
17
|
+
*/
|
|
18
|
+
export declare const mockColorPriorityCanvas: ExtendedCanvas;
|
|
19
|
+
export declare const mockSimpleCanvasJSON: string;
|
|
20
|
+
export declare const mockComplexCanvasJSON: string;
|
|
21
|
+
export declare const mockControlTowerCanvasJSON: string;
|
|
22
|
+
export declare const mockNodeColorsCanvasJSON: string;
|
|
23
|
+
export declare const mockColorPriorityCanvasJSON: string;
|
|
24
|
+
export declare const createMockFileTree: (config: "simple" | "complex" | "control-tower" | "node-colors" | "color-priority" | "none") => {
|
|
25
|
+
allFiles: {
|
|
26
|
+
path: string;
|
|
27
|
+
relativePath: string;
|
|
28
|
+
name: string;
|
|
29
|
+
content?: string;
|
|
30
|
+
}[];
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=vvfConfigs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vvfConfigs.d.ts","sourceRoot":"","sources":["../../src/mocks/vvfConfigs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE;;GAEG;AAEH,eAAO,MAAM,gBAAgB,EAAE,cA0F9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,cA8KpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cA+G/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,cA0JlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAwHrC,CAAC;AAGF,eAAO,MAAM,oBAAoB,QAA4C,CAAC;AAC9E,eAAO,MAAM,qBAAqB,QAA6C,CAAC;AAChF,eAAO,MAAM,0BAA0B,QAAkD,CAAC;AAC1F,eAAO,MAAM,wBAAwB,QAAgD,CAAC;AACtF,eAAO,MAAM,2BAA2B,QAAmD,CAAC;AAG5F,eAAO,MAAM,kBAAkB,GAAI,QAAQ,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,GAAG,MAAM;;cAChG,MAAM;sBAAgB,MAAM;cAAQ,MAAM;kBAAY,MAAM;;CAgDxF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from '@principal-ade/panel-framework-core';
|
|
3
|
+
/**
|
|
4
|
+
* Event payload for config selection
|
|
5
|
+
*/
|
|
6
|
+
export interface ConfigSelectedEventPayload {
|
|
7
|
+
configId: string;
|
|
8
|
+
configPath: string;
|
|
9
|
+
configName: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Config Library Browser Panel
|
|
13
|
+
*
|
|
14
|
+
* Lists available .canvas configurations and component library items.
|
|
15
|
+
* Clicking a config emits an event that the graph panel can listen to.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ConfigLibraryBrowserPanel: React.FC<PanelComponentProps>;
|
|
18
|
+
//# sourceMappingURL=ConfigLibraryBrowserPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigLibraryBrowserPanel.d.ts","sourceRoot":"","sources":["../../src/panels/ConfigLibraryBrowserPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAiD/E;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4jCnE,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
/**
|
|
3
|
+
* ConfigLibraryBrowserPanel displays available .canvas configurations
|
|
4
|
+
* and component library items from the .vgc/ folder.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: {
|
|
7
|
+
title: string;
|
|
8
|
+
component: import("react").FC<import("@principal-ade/panel-framework-core").PanelComponentProps>;
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
tags: string[];
|
|
18
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
19
|
+
context: import("@principal-ade/panel-framework-core").PanelContextValue;
|
|
20
|
+
actions: import("@principal-ade/panel-framework-core").PanelActions;
|
|
21
|
+
events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
|
|
22
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
/**
|
|
27
|
+
* Default story with multiple configs and a library
|
|
28
|
+
*/
|
|
29
|
+
export declare const WithConfigsAndLibrary: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Story with only configs, no library
|
|
32
|
+
*/
|
|
33
|
+
export declare const ConfigsOnly: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Empty state - no .vgc folder
|
|
36
|
+
*/
|
|
37
|
+
export declare const EmptyState: Story;
|
|
38
|
+
/**
|
|
39
|
+
* Loading state
|
|
40
|
+
*/
|
|
41
|
+
export declare const Loading: Story;
|
|
42
|
+
//# sourceMappingURL=ConfigLibraryBrowserPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigLibraryBrowserPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/ConfigLibraryBrowserPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAqK5D;;;GAGG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;CAsBwC,CAAC;AAEnD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,KA6CnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAyDzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KA0CxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KA8BrB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
|
+
/**
|
|
5
|
+
* Live integration test with real Control Tower Core configuration
|
|
6
|
+
*/
|
|
7
|
+
export declare const LiveIntegration: StoryObj;
|
|
8
|
+
/**
|
|
9
|
+
* Shows the stats and configuration being used
|
|
10
|
+
*/
|
|
11
|
+
export declare const ConfigurationView: StoryObj;
|
|
12
|
+
//# sourceMappingURL=ControlTowerIntegration.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlTowerIntegration.stories.d.ts","sourceRoot":"","sources":["../../src/panels/ControlTowerIntegration.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA+K5D,QAAA,MAAM,IAAI,EAAE,IASX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAyb7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,QA0I/B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GraphEvent } from '@principal-ai/principal-view-core';
|
|
3
|
+
export type PlaybackStatus = 'stopped' | 'playing' | 'paused';
|
|
4
|
+
export interface PlaybackState {
|
|
5
|
+
status: PlaybackStatus;
|
|
6
|
+
currentIndex: number;
|
|
7
|
+
totalEvents: number;
|
|
8
|
+
speed: number;
|
|
9
|
+
}
|
|
10
|
+
export interface EventControllerPanelProps {
|
|
11
|
+
/** Array of events to play through */
|
|
12
|
+
events: GraphEvent[];
|
|
13
|
+
/** Callback when events should be emitted to the graph */
|
|
14
|
+
onEventsEmit: (events: GraphEvent[]) => void;
|
|
15
|
+
/** Callback when playback state changes */
|
|
16
|
+
onPlaybackStateChange?: (state: PlaybackState) => void;
|
|
17
|
+
/** Default playback speed multiplier (default: 1) */
|
|
18
|
+
defaultSpeed?: number;
|
|
19
|
+
/** Whether to auto-play on mount (default: false) */
|
|
20
|
+
autoPlay?: boolean;
|
|
21
|
+
/** Whether to loop playback (default: false) */
|
|
22
|
+
loop?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* EventControllerPanel - Controls event playback and emits events to GraphRenderer
|
|
26
|
+
*
|
|
27
|
+
* This panel acts as the intermediary between stored events and the graph visualization.
|
|
28
|
+
* It provides playback controls (play, pause, stop, step, seek) and emits events
|
|
29
|
+
* that the GraphRenderer can consume for animations.
|
|
30
|
+
*/
|
|
31
|
+
export declare const EventControllerPanel: React.FC<EventControllerPanelProps>;
|
|
32
|
+
//# sourceMappingURL=EventControllerPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventControllerPanel.d.ts","sourceRoot":"","sources":["../../src/panels/EventControllerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAGpE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,sCAAsC;IACtC,MAAM,EAAE,UAAU,EAAE,CAAC;IAErB,0DAA0D;IAC1D,YAAY,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAE7C,2CAA2C;IAC3C,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAEvD,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,gDAAgD;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAID;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA+iBpE,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { GraphEvent } from '@principal-ai/principal-view-core';
|
|
4
|
+
/**
|
|
5
|
+
* EventControllerPanel controls event playback and emits events to GraphRenderer.
|
|
6
|
+
* This demonstrates the panel-to-panel communication pattern where the EventController
|
|
7
|
+
* stores events and plays them back, while GraphRenderer consumes them for animations.
|
|
8
|
+
*/
|
|
9
|
+
declare const meta: {
|
|
10
|
+
title: string;
|
|
11
|
+
component: React.FC<import("./EventControllerPanel").EventControllerPanelProps>;
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: string;
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
tags: string[];
|
|
21
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
22
|
+
events: GraphEvent[];
|
|
23
|
+
onEventsEmit: (events: GraphEvent[]) => void;
|
|
24
|
+
onPlaybackStateChange?: ((state: import("./EventControllerPanel").PlaybackState) => void) | undefined;
|
|
25
|
+
defaultSpeed?: number | undefined;
|
|
26
|
+
autoPlay?: boolean | undefined;
|
|
27
|
+
loop?: boolean | undefined;
|
|
28
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
32
|
+
/**
|
|
33
|
+
* Combined Panel Demo - Shows EventControllerPanel and GraphRenderer working together
|
|
34
|
+
* This is the main story demonstrating panel-to-panel communication
|
|
35
|
+
*/
|
|
36
|
+
export declare const CombinedPanelDemo: Story;
|
|
37
|
+
/**
|
|
38
|
+
* Standalone Event Controller - Shows the panel in isolation
|
|
39
|
+
*/
|
|
40
|
+
export declare const StandaloneController: Story;
|
|
41
|
+
/**
|
|
42
|
+
* Empty State - Shows controller with no events
|
|
43
|
+
*/
|
|
44
|
+
export declare const EmptyState: Story;
|
|
45
|
+
/**
|
|
46
|
+
* Many Events - Shows controller with a large number of events
|
|
47
|
+
*/
|
|
48
|
+
export declare const ManyEvents: Story;
|
|
49
|
+
/**
|
|
50
|
+
* Full Integration Demo - Complete demo with all features
|
|
51
|
+
*/
|
|
52
|
+
export declare const FullIntegrationDemo: Story;
|
|
53
|
+
//# sourceMappingURL=EventControllerPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventControllerPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/EventControllerPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAGpF;;;;GAIG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;CAsBmC,CAAC;AAE9C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAiNnC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAuC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAUlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAoBxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAmEjC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { EventSession, SessionStatus } from '@principal-ai/principal-view-core';
|
|
3
|
+
import type { GraphEvent } from '@principal-ai/principal-view-core';
|
|
4
|
+
/**
|
|
5
|
+
* Session summary for display
|
|
6
|
+
*/
|
|
7
|
+
export interface SessionSummary {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
status: SessionStatus;
|
|
11
|
+
eventCount: number;
|
|
12
|
+
startedAt: number;
|
|
13
|
+
endedAt?: number;
|
|
14
|
+
duration?: number;
|
|
15
|
+
result?: 'pass' | 'fail' | 'skip';
|
|
16
|
+
testFile?: string;
|
|
17
|
+
testName?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface EventRecorderPanelProps {
|
|
20
|
+
/** List of sessions to display */
|
|
21
|
+
sessions: EventSession[];
|
|
22
|
+
/** Currently active session ID (if recording) */
|
|
23
|
+
activeSessionId?: string;
|
|
24
|
+
/** Whether the recorder is currently recording */
|
|
25
|
+
isRecording?: boolean;
|
|
26
|
+
/** Callback when a session is selected for viewing */
|
|
27
|
+
onSessionSelect?: (sessionId: string) => void;
|
|
28
|
+
/** Callback when a session's events should be played */
|
|
29
|
+
onPlaySession?: (sessionId: string, events: GraphEvent[]) => void;
|
|
30
|
+
/** Callback when a session is deleted */
|
|
31
|
+
onDeleteSession?: (sessionId: string) => void;
|
|
32
|
+
/** Callback when a session is exported */
|
|
33
|
+
onExportSession?: (sessionId: string) => void;
|
|
34
|
+
/** Callback when a session is imported */
|
|
35
|
+
onImportSession?: (json: string) => void;
|
|
36
|
+
/** Callback to start a new recording session */
|
|
37
|
+
onStartRecording?: (name: string) => void;
|
|
38
|
+
/** Callback to stop the current recording */
|
|
39
|
+
onStopRecording?: () => void;
|
|
40
|
+
/** Currently selected session ID */
|
|
41
|
+
selectedSessionId?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* EventRecorderPanel - UI for managing event recording sessions
|
|
45
|
+
*
|
|
46
|
+
* This panel displays a list of recording sessions and allows users to:
|
|
47
|
+
* - View session details and events
|
|
48
|
+
* - Start/stop recording
|
|
49
|
+
* - Play back recorded sessions
|
|
50
|
+
* - Export/import sessions
|
|
51
|
+
* - Delete sessions
|
|
52
|
+
*/
|
|
53
|
+
export declare const EventRecorderPanel: React.FC<EventRecorderPanelProps>;
|
|
54
|
+
//# sourceMappingURL=EventRecorderPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventRecorderPanel.d.ts","sourceRoot":"","sources":["../../src/panels/EventRecorderPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAEzE,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EAEd,MAAM,mCAAmC,CAAC;AAiB3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,kCAAkC;IAClC,QAAQ,EAAE,YAAY,EAAE,CAAC;IAEzB,iDAAiD;IACjD,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,sDAAsD;IACtD,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9C,wDAAwD;IACxD,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAElE,yCAAyC;IACzC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9C,0CAA0C;IAC1C,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9C,0CAA0C;IAC1C,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAE1C,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAE7B,oCAAoC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAuCD;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAsoBhE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { EventRecorderPanel } from './EventRecorderPanel';
|
|
3
|
+
declare const meta: Meta<typeof EventRecorderPanel>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof EventRecorderPanel>;
|
|
6
|
+
export declare const Empty: Story;
|
|
7
|
+
export declare const WithSessions: Story;
|
|
8
|
+
export declare const Recording: Story;
|
|
9
|
+
export declare const Interactive: Story;
|
|
10
|
+
export declare const WideLayout: Story;
|
|
11
|
+
export declare const ManySessions: Story;
|
|
12
|
+
//# sourceMappingURL=EventRecorderPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventRecorderPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/EventRecorderPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI1D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAmBzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,kBAAkB,CAAC,CAAC;AA+DjD,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,KAoC1B,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,KAqIzB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,KA6BxB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,KAmB1B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
|
+
/**
|
|
5
|
+
* Full recording flow integration story
|
|
6
|
+
*
|
|
7
|
+
* Demonstrates:
|
|
8
|
+
* 1. Recording sessions with the EventRecorderService
|
|
9
|
+
* 2. Viewing sessions in the EventRecorderPanel
|
|
10
|
+
* 3. Playing back events in the EventControllerPanel
|
|
11
|
+
*/
|
|
12
|
+
export declare const FullRecordingFlow: StoryObj;
|
|
13
|
+
/**
|
|
14
|
+
* Side-by-side panels showing the workflow
|
|
15
|
+
*/
|
|
16
|
+
export declare const RecorderAndControllerPanels: StoryObj;
|
|
17
|
+
/**
|
|
18
|
+
* Demonstrates WebSocket message flow simulation
|
|
19
|
+
*/
|
|
20
|
+
export declare const WebSocketMessageFlow: StoryObj;
|
|
21
|
+
//# sourceMappingURL=EventRecordingIntegration.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventRecordingIntegration.stories.d.ts","sourceRoot":"","sources":["../../src/panels/EventRecordingIntegration.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAqE5D,QAAA,MAAM,IAAI,EAAE,IASX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,QA0S/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,QAgFzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAgKlC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from '@principal-ade/panel-framework-core';
|
|
3
|
+
/**
|
|
4
|
+
* Principal View Graph Panel
|
|
5
|
+
*
|
|
6
|
+
* Visualizes .canvas configuration files as interactive graph diagrams
|
|
7
|
+
* with full editing support for nodes, edges, and positions.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PrincipalViewGraphPanel: React.FC<PanelComponentProps>;
|
|
10
|
+
//# sourceMappingURL=PrincipalViewGraphPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrincipalViewGraphPanel.d.ts","sourceRoot":"","sources":["../../src/panels/PrincipalViewGraphPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAyC/E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyuBjE,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
/**
|
|
3
|
+
* PrincipalViewGraphPanel visualizes .canvas files as interactive graphs.
|
|
4
|
+
* It demonstrates graph rendering with ReactFlow and ExtendedCanvas format.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: {
|
|
7
|
+
title: string;
|
|
8
|
+
component: import("react").FC<import("@principal-ade/panel-framework-core").PanelComponentProps>;
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: string;
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
tags: string[];
|
|
18
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
19
|
+
context: import("@principal-ade/panel-framework-core").PanelContextValue;
|
|
20
|
+
actions: import("@principal-ade/panel-framework-core").PanelActions;
|
|
21
|
+
events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
|
|
22
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
/**
|
|
27
|
+
* Default story with simple configuration
|
|
28
|
+
* Shows a basic 3-node graph with API, database, and logger components
|
|
29
|
+
*/
|
|
30
|
+
export declare const SimpleConfiguration: Story;
|
|
31
|
+
/**
|
|
32
|
+
* Complex configuration with multiple components and states
|
|
33
|
+
* Shows the Repository Traffic Controller with lock manager, GitHub API, and database
|
|
34
|
+
*/
|
|
35
|
+
export declare const ComplexConfiguration: Story;
|
|
36
|
+
/**
|
|
37
|
+
* Control Tower configuration with manual layout
|
|
38
|
+
* Shows client-server architecture with explicit node positions
|
|
39
|
+
*/
|
|
40
|
+
export declare const ControlTowerConfiguration: Story;
|
|
41
|
+
/**
|
|
42
|
+
* Loading state - file tree is being loaded
|
|
43
|
+
*/
|
|
44
|
+
export declare const Loading: Story;
|
|
45
|
+
/**
|
|
46
|
+
* Empty state - no configuration file found in project
|
|
47
|
+
* Shows educational content and copyable template to get started
|
|
48
|
+
*/
|
|
49
|
+
export declare const EmptyState: Story;
|
|
50
|
+
/**
|
|
51
|
+
* Invalid JSON configuration
|
|
52
|
+
*/
|
|
53
|
+
export declare const InvalidJSON: Story;
|
|
54
|
+
/**
|
|
55
|
+
* File tree slice not available
|
|
56
|
+
*/
|
|
57
|
+
export declare const NoFileTreeSlice: Story;
|
|
58
|
+
/**
|
|
59
|
+
* Interactive example with custom repository
|
|
60
|
+
*/
|
|
61
|
+
export declare const CustomRepository: Story;
|
|
62
|
+
/**
|
|
63
|
+
* Node Colors Demo - demonstrates pv.fill and pv.stroke properties
|
|
64
|
+
* Shows how different node types can have distinct fill and stroke colors
|
|
65
|
+
*/
|
|
66
|
+
export declare const NodeColorsDemo: Story;
|
|
67
|
+
/**
|
|
68
|
+
* Color Priority Test - demonstrates color source priority
|
|
69
|
+
* Shows how pv.fill takes priority over node.color
|
|
70
|
+
* Priority: pv.fill > node.color > default
|
|
71
|
+
*/
|
|
72
|
+
export declare const ColorPriorityTest: Story;
|
|
73
|
+
/**
|
|
74
|
+
* Empty project with workspace scope only
|
|
75
|
+
*/
|
|
76
|
+
export declare const WorkspaceScope: Story;
|
|
77
|
+
//# sourceMappingURL=PrincipalViewGraphPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrincipalViewGraphPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/PrincipalViewGraphPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAO5D;;;GAGG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;CAsBsC,CAAC;AAEjD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KA0CjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KA0ClC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,KA0CvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KA4BrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KA4BxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAqDzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAiB7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAuD9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KA0C5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,KA0C/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAiD5B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ExtendedCanvas, ComponentLibrary } from '@principal-ai/principal-view-core';
|
|
2
|
+
export interface ConfigFile {
|
|
3
|
+
/** Unique identifier for this config (derived from filename) */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Display name for this config */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Full file path */
|
|
8
|
+
path: string;
|
|
9
|
+
/** Whether this is from a config folder or standalone */
|
|
10
|
+
source: 'folder' | 'standalone';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Utility for loading and parsing .canvas configuration files from .vgc/ folder
|
|
14
|
+
*/
|
|
15
|
+
export declare class ConfigLoader {
|
|
16
|
+
/**
|
|
17
|
+
* Parse JSON canvas content
|
|
18
|
+
*/
|
|
19
|
+
static parseCanvas(content: string): ExtendedCanvas;
|
|
20
|
+
/**
|
|
21
|
+
* Parse YAML library content
|
|
22
|
+
*/
|
|
23
|
+
static parseLibrary(content: string): ComponentLibrary;
|
|
24
|
+
/**
|
|
25
|
+
* Find the library.yaml file in the .vgc/ folder
|
|
26
|
+
* Returns the relative path if found, null otherwise
|
|
27
|
+
*/
|
|
28
|
+
static findLibraryPath(files: Array<{
|
|
29
|
+
path?: string;
|
|
30
|
+
relativePath?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
}>): string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Find all .canvas files in the .vgc/ folder
|
|
35
|
+
* Returns array of config files with metadata
|
|
36
|
+
*/
|
|
37
|
+
static findConfigs(files: Array<{
|
|
38
|
+
path?: string;
|
|
39
|
+
relativePath?: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
}>): ConfigFile[];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=ConfigLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigLoader.d.ts","sourceRoot":"","sources":["../../../src/panels/principal-view/ConfigLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAG1F,MAAM,WAAW,UAAU;IACzB,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,MAAM,EAAE,QAAQ,GAAG,YAAY,CAAC;CACjC;AAgBD;;GAEG;AACH,qBAAa,YAAY;IACvB;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc;IAQnD;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAQtD;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,MAAM,GAAG,IAAI;IAgB5G;;;OAGG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,UAAU,EAAE;CA6BxG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Theme } from '@principal-ade/industry-theme';
|
|
3
|
+
interface EmptyStateContentProps {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Empty state component for Principal View Graph Panel
|
|
8
|
+
* Displays when no .vgc/ folder with configuration files is found in the project
|
|
9
|
+
*/
|
|
10
|
+
export declare const EmptyStateContent: React.FC<EmptyStateContentProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=EmptyStateContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyStateContent.d.ts","sourceRoot":"","sources":["../../../src/panels/principal-view/EmptyStateContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoO9D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Theme } from '@principal-ade/industry-theme';
|
|
3
|
+
interface ErrorStateContentProps {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
error: string;
|
|
6
|
+
onRetry: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Error state component for Visual Validation Graph Panel
|
|
10
|
+
* Displays when configuration loading fails
|
|
11
|
+
*/
|
|
12
|
+
export declare const ErrorStateContent: React.FC<ErrorStateContentProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ErrorStateContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorStateContent.d.ts","sourceRoot":"","sources":["../../../src/panels/principal-view/ErrorStateContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAuC9D,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
|
|
2
|
+
export interface ForceLayoutOptions {
|
|
3
|
+
/** Strength of repulsion between nodes (-300 default, more negative = more spread) */
|
|
4
|
+
chargeStrength?: number;
|
|
5
|
+
/** Target distance between linked nodes (150 default) */
|
|
6
|
+
linkDistance?: number;
|
|
7
|
+
/** Collision radius multiplier based on node size (1.2 default) */
|
|
8
|
+
collisionMultiplier?: number;
|
|
9
|
+
/** Number of simulation iterations (300 default) */
|
|
10
|
+
iterations?: number;
|
|
11
|
+
/** Center X coordinate (auto-calculated if not provided) */
|
|
12
|
+
centerX?: number;
|
|
13
|
+
/** Center Y coordinate (auto-calculated if not provided) */
|
|
14
|
+
centerY?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Apply D3 force-directed layout to an ExtendedCanvas.
|
|
18
|
+
* Handles cycles naturally since force simulation doesn't assume hierarchy.
|
|
19
|
+
*/
|
|
20
|
+
export declare function applyForceLayout(canvas: ExtendedCanvas, options?: ForceLayoutOptions): ExtendedCanvas;
|
|
21
|
+
export interface SugiyamaLayoutOptions {
|
|
22
|
+
/** Direction of the layout: 'TB' (top-bottom), 'BT', 'LR' (left-right), 'RL' */
|
|
23
|
+
direction?: 'TB' | 'BT' | 'LR' | 'RL';
|
|
24
|
+
/** Horizontal spacing between nodes */
|
|
25
|
+
nodeSpacingX?: number;
|
|
26
|
+
/** Vertical spacing between layers */
|
|
27
|
+
nodeSpacingY?: number;
|
|
28
|
+
/** Starting X offset */
|
|
29
|
+
offsetX?: number;
|
|
30
|
+
/** Starting Y offset */
|
|
31
|
+
offsetY?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Apply Sugiyama (hierarchical/layered) layout to an ExtendedCanvas.
|
|
35
|
+
* Best for DAGs and directed graphs. Falls back to force layout if cycles exist.
|
|
36
|
+
*/
|
|
37
|
+
export declare function applySugiyamaLayout(canvas: ExtendedCanvas, options?: SugiyamaLayoutOptions): ExtendedCanvas;
|
|
38
|
+
//# sourceMappingURL=forceLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forceLayout.d.ts","sourceRoot":"","sources":["../../../src/panels/principal-view/forceLayout.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAaxE,MAAM,WAAW,kBAAkB;IACjC,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,kBAAuB,GAC/B,cAAc,CA+FhB;AAED,MAAM,WAAW,qBAAqB;IACpC,gFAAgF;IAChF,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACtC,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,qBAA0B,GAClC,cAAc,CA8HhB"}
|