@industry-theme/principal-view-panels 0.1.46 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/panels/ExecutionViewerPanel.d.ts +10 -0
- package/dist/panels/ExecutionViewerPanel.d.ts.map +1 -0
- package/dist/panels/ExecutionViewerPanel.stories.d.ts +61 -0
- package/dist/panels/ExecutionViewerPanel.stories.d.ts.map +1 -0
- package/dist/panels/execution-viewer/ExecutionLoader.d.ts +97 -0
- package/dist/panels/execution-viewer/ExecutionLoader.d.ts.map +1 -0
- package/dist/panels/execution-viewer/ExecutionStats.d.ts +11 -0
- package/dist/panels/execution-viewer/ExecutionStats.d.ts.map +1 -0
- package/dist/panels.bundle.js +853 -0
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { PanelDefinition } from './types';
|
|
|
2
2
|
export { EventControllerPanel } from './panels/EventControllerPanel';
|
|
3
3
|
export type { EventControllerPanelProps, PlaybackState, PlaybackStatus } from './panels/EventControllerPanel';
|
|
4
4
|
export { TraceViewerPanel } from './panels/TraceViewerPanel';
|
|
5
|
+
export { ExecutionViewerPanel } from './panels/ExecutionViewerPanel';
|
|
5
6
|
export { PanelFileSystemAdapter } from './adapters/PanelFileSystemAdapter';
|
|
6
7
|
export type { FileTreeEntry, PanelFileSystemAdapterOptions } from './adapters/PanelFileSystemAdapter';
|
|
7
8
|
/**
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAIlE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,YAAY,EAAE,yBAAyB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,YAAY,EAAE,aAAa,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAEtG;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,eAAe,EA+FnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,qBAGzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAG3B,CAAC;AAEF;;;GAGG;AACH,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from '@principal-ade/panel-framework-core';
|
|
3
|
+
/**
|
|
4
|
+
* Execution Viewer Panel
|
|
5
|
+
*
|
|
6
|
+
* Displays execution artifacts (test runs, traces) overlaid on their corresponding canvas diagrams.
|
|
7
|
+
* Reads execution files from __executions__/ directories and automatically links them to canvas files.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ExecutionViewerPanel: React.FC<PanelComponentProps>;
|
|
10
|
+
//# sourceMappingURL=ExecutionViewerPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutionViewerPanel.d.ts","sourceRoot":"","sources":["../../src/panels/ExecutionViewerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA4B/E;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0mB9D,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* ExecutionViewerPanel Component
|
|
5
|
+
*
|
|
6
|
+
* Visualizes execution artifacts (test runs) overlaid on canvas diagrams.
|
|
7
|
+
* It discovers execution artifact files from __executions__/ directories.
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Auto-discovery of execution artifacts from __executions__/ directories
|
|
11
|
+
* - Automatic linking to matching canvas files
|
|
12
|
+
* - Event playback with timeline controls
|
|
13
|
+
* - Side-by-side canvas and event visualization
|
|
14
|
+
* - Package badges for monorepo support
|
|
15
|
+
* - Metadata display (spans, events, framework, status)
|
|
16
|
+
*/
|
|
17
|
+
declare const meta: {
|
|
18
|
+
title: string;
|
|
19
|
+
component: React.FC<import("@principal-ade/panel-framework-core").PanelComponentProps>;
|
|
20
|
+
parameters: {
|
|
21
|
+
layout: string;
|
|
22
|
+
docs: {
|
|
23
|
+
description: {
|
|
24
|
+
component: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
tags: string[];
|
|
29
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
30
|
+
context: import("@principal-ade/panel-framework-core").PanelContextValue;
|
|
31
|
+
actions: import("@principal-ade/panel-framework-core").PanelActions;
|
|
32
|
+
events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
|
|
33
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
/**
|
|
38
|
+
* Basic execution viewer with single execution artifact
|
|
39
|
+
*/
|
|
40
|
+
export declare const SingleExecution: Story;
|
|
41
|
+
/**
|
|
42
|
+
* Multiple execution artifacts from different packages
|
|
43
|
+
*/
|
|
44
|
+
export declare const MultipleExecutions: Story;
|
|
45
|
+
/**
|
|
46
|
+
* Execution with error status
|
|
47
|
+
*/
|
|
48
|
+
export declare const ExecutionWithError: Story;
|
|
49
|
+
/**
|
|
50
|
+
* No execution artifacts found
|
|
51
|
+
*/
|
|
52
|
+
export declare const NoExecutions: Story;
|
|
53
|
+
/**
|
|
54
|
+
* Execution without matching canvas
|
|
55
|
+
*/
|
|
56
|
+
export declare const ExecutionWithoutCanvas: Story;
|
|
57
|
+
/**
|
|
58
|
+
* Legacy format (direct array without metadata)
|
|
59
|
+
*/
|
|
60
|
+
export declare const LegacyFormat: Story;
|
|
61
|
+
//# sourceMappingURL=ExecutionViewerPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutionViewerPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/ExecutionViewerPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;CAsBmC,CAAC;AAE9C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA2LnC;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAwB7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAoChC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KA2ChC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAkB1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAkBpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAwB1B,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export interface ExecutionFile {
|
|
2
|
+
/** Unique identifier for this execution (derived from filename) */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Display name for this execution */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Full file path */
|
|
7
|
+
path: string;
|
|
8
|
+
/** Canvas basename (without extension) that this execution is linked to */
|
|
9
|
+
canvasBasename: string;
|
|
10
|
+
/** Package name for monorepos (e.g., 'core' from 'packages/core/__executions__/') */
|
|
11
|
+
packageName?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ExecutionMetadata {
|
|
14
|
+
/** Execution name */
|
|
15
|
+
name: string;
|
|
16
|
+
/** Canvas name this execution is associated with */
|
|
17
|
+
canvasName?: string;
|
|
18
|
+
/** Export timestamp */
|
|
19
|
+
exportedAt?: string;
|
|
20
|
+
/** Source of execution (e.g., "test:event-validation") */
|
|
21
|
+
source?: string;
|
|
22
|
+
/** Test framework used */
|
|
23
|
+
framework?: string;
|
|
24
|
+
/** Execution status */
|
|
25
|
+
status?: 'success' | 'error' | 'OK';
|
|
26
|
+
/** Number of spans */
|
|
27
|
+
spanCount: number;
|
|
28
|
+
/** Number of events across all spans */
|
|
29
|
+
eventCount: number;
|
|
30
|
+
}
|
|
31
|
+
export interface ExecutionSpan {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
startTime: number;
|
|
35
|
+
endTime?: number;
|
|
36
|
+
duration?: number;
|
|
37
|
+
status?: string;
|
|
38
|
+
attributes?: Record<string, any>;
|
|
39
|
+
events: Array<{
|
|
40
|
+
time: number;
|
|
41
|
+
name: string;
|
|
42
|
+
attributes?: Record<string, any>;
|
|
43
|
+
}>;
|
|
44
|
+
}
|
|
45
|
+
export interface ExecutionArtifact {
|
|
46
|
+
metadata?: {
|
|
47
|
+
canvasName?: string;
|
|
48
|
+
exportedAt?: string;
|
|
49
|
+
source?: string;
|
|
50
|
+
framework?: string;
|
|
51
|
+
status?: 'success' | 'error';
|
|
52
|
+
};
|
|
53
|
+
spans?: ExecutionSpan[];
|
|
54
|
+
[key: number]: ExecutionSpan;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Utility for loading and parsing execution artifact files from __executions__/ folders
|
|
58
|
+
*/
|
|
59
|
+
export declare class ExecutionLoader {
|
|
60
|
+
/**
|
|
61
|
+
* Parse JSON execution artifact content
|
|
62
|
+
*/
|
|
63
|
+
static parseExecutionArtifact(content: string): ExecutionArtifact;
|
|
64
|
+
/**
|
|
65
|
+
* Get spans array from artifact (handles both formats)
|
|
66
|
+
*/
|
|
67
|
+
static getSpans(artifact: ExecutionArtifact): ExecutionSpan[];
|
|
68
|
+
/**
|
|
69
|
+
* Extract metadata from an execution artifact
|
|
70
|
+
*/
|
|
71
|
+
static getExecutionMetadata(artifact: ExecutionArtifact): ExecutionMetadata;
|
|
72
|
+
/**
|
|
73
|
+
* Find all execution artifact files in the file tree
|
|
74
|
+
*/
|
|
75
|
+
static findExecutionFiles(files: Array<{
|
|
76
|
+
path?: string;
|
|
77
|
+
relativePath?: string;
|
|
78
|
+
name?: string;
|
|
79
|
+
}>): ExecutionFile[];
|
|
80
|
+
/**
|
|
81
|
+
* Find execution artifact for a given canvas file path
|
|
82
|
+
*/
|
|
83
|
+
static findExecutionForCanvas(canvasPath: string, files: Array<{
|
|
84
|
+
path?: string;
|
|
85
|
+
relativePath?: string;
|
|
86
|
+
name?: string;
|
|
87
|
+
}>): ExecutionFile | null;
|
|
88
|
+
/**
|
|
89
|
+
* Find canvas file for a given execution artifact path
|
|
90
|
+
*/
|
|
91
|
+
static findCanvasForExecution(executionPath: string, files: Array<{
|
|
92
|
+
path?: string;
|
|
93
|
+
relativePath?: string;
|
|
94
|
+
name?: string;
|
|
95
|
+
}>): string | null;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=ExecutionLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutionLoader.d.ts","sourceRoot":"","sources":["../../../src/panels/execution-viewer/ExecutionLoader.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,cAAc,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uBAAuB;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;IACpC,sBAAsB;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC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AAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GACpE,MAAM,GAAG,IAAI;CAgBjB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExecutionMetadata } from './ExecutionLoader';
|
|
3
|
+
interface ExecutionStatsProps {
|
|
4
|
+
metadata: ExecutionMetadata;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Footer component displaying execution artifact metadata and statistics
|
|
8
|
+
*/
|
|
9
|
+
export declare const ExecutionStats: React.FC<ExecutionStatsProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ExecutionStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutionStats.d.ts","sourceRoot":"","sources":["../../../src/panels/execution-viewer/ExecutionStats.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAmHxD,CAAC"}
|