@industry-theme/principal-view-panels 0.1.29 → 0.1.31
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/TraceViewerPanel.d.ts +10 -0
- package/dist/panels/TraceViewerPanel.d.ts.map +1 -0
- package/dist/panels/TraceViewerPanel.stories.d.ts +55 -0
- package/dist/panels/TraceViewerPanel.stories.d.ts.map +1 -0
- package/dist/panels/trace-viewer/TraceLoader.d.ts +45 -0
- package/dist/panels/trace-viewer/TraceLoader.d.ts.map +1 -0
- package/dist/panels/trace-viewer/TraceStats.d.ts +17 -0
- package/dist/panels/trace-viewer/TraceStats.d.ts.map +1 -0
- package/dist/panels.bundle.js +4287 -3324
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PanelDefinition } from './types';
|
|
2
2
|
export { EventControllerPanel } from './panels/EventControllerPanel';
|
|
3
3
|
export type { EventControllerPanelProps, PlaybackState, PlaybackStatus } from './panels/EventControllerPanel';
|
|
4
|
+
export { TraceViewerPanel } from './panels/TraceViewerPanel';
|
|
4
5
|
export { PanelFileSystemAdapter } from './adapters/PanelFileSystemAdapter';
|
|
5
6
|
export type { FileTreeEntry, PanelFileSystemAdapterOptions } from './adapters/PanelFileSystemAdapter';
|
|
6
7
|
/**
|
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":"AAGA,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;AAG7D,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,EAiEnC,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
|
+
* Trace Viewer Panel
|
|
5
|
+
*
|
|
6
|
+
* Displays OpenTelemetry traces captured from test runs as canvas diagrams.
|
|
7
|
+
* Reads trace files from __traces__/ directories in the repository.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TraceViewerPanel: React.FC<PanelComponentProps>;
|
|
10
|
+
//# sourceMappingURL=TraceViewerPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceViewerPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TraceViewerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAkB/E;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAmd1D,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* TraceViewerPanel displays OpenTelemetry traces captured from test runs.
|
|
5
|
+
* It discovers trace canvas files from __traces__/ directories.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: {
|
|
8
|
+
title: string;
|
|
9
|
+
component: React.FC<import("@principal-ade/panel-framework-core").PanelComponentProps>;
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: string;
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
tags: string[];
|
|
19
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
20
|
+
context: import("@principal-ade/panel-framework-core").PanelContextValue;
|
|
21
|
+
actions: import("@principal-ade/panel-framework-core").PanelActions;
|
|
22
|
+
events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
|
|
23
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
/**
|
|
28
|
+
* Single trace - basic display with one trace file
|
|
29
|
+
*/
|
|
30
|
+
export declare const SingleTrace: Story;
|
|
31
|
+
/**
|
|
32
|
+
* Multiple traces - shows the trace selector dropdown
|
|
33
|
+
*/
|
|
34
|
+
export declare const MultipleTraces: Story;
|
|
35
|
+
/**
|
|
36
|
+
* Error trace - shows spans with ERROR status
|
|
37
|
+
*/
|
|
38
|
+
export declare const ErrorTrace: Story;
|
|
39
|
+
/**
|
|
40
|
+
* Loading state - file tree is being loaded
|
|
41
|
+
*/
|
|
42
|
+
export declare const Loading: Story;
|
|
43
|
+
/**
|
|
44
|
+
* Empty state - no trace files found
|
|
45
|
+
*/
|
|
46
|
+
export declare const EmptyState: Story;
|
|
47
|
+
/**
|
|
48
|
+
* Error state - failed to load trace
|
|
49
|
+
*/
|
|
50
|
+
export declare const ErrorState: Story;
|
|
51
|
+
/**
|
|
52
|
+
* Traces from .principal-views/__traces__/ location
|
|
53
|
+
*/
|
|
54
|
+
export declare const PrincipalViewsLocation: Story;
|
|
55
|
+
//# sourceMappingURL=TraceViewerPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceViewerPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/TraceViewerPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;GAGG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;CAsB+B,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAuOnC;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAsDzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAiE5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAqDxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KA4BrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAmCxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAqDxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAqDpC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
|
|
2
|
+
export interface TraceFile {
|
|
3
|
+
/** Unique identifier for this trace (derived from filename) */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Display name for this trace */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Full file path */
|
|
8
|
+
path: string;
|
|
9
|
+
/** Package name for monorepos (e.g., 'core' from 'packages/core/__traces__/') */
|
|
10
|
+
packageName?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TraceMetadata {
|
|
13
|
+
/** Trace name from canvas pv.name */
|
|
14
|
+
name: string;
|
|
15
|
+
/** Export timestamp from canvas pv.description */
|
|
16
|
+
exportedAt?: string;
|
|
17
|
+
/** Number of span nodes */
|
|
18
|
+
spanCount: number;
|
|
19
|
+
/** Number of service groups */
|
|
20
|
+
serviceCount: number;
|
|
21
|
+
/** List of service names */
|
|
22
|
+
serviceNames: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Utility for loading and parsing trace canvas files from __traces__/ folders
|
|
26
|
+
*/
|
|
27
|
+
export declare class TraceLoader {
|
|
28
|
+
/**
|
|
29
|
+
* Parse JSON canvas content
|
|
30
|
+
*/
|
|
31
|
+
static parseTraceCanvas(content: string): ExtendedCanvas;
|
|
32
|
+
/**
|
|
33
|
+
* Extract metadata from a trace canvas
|
|
34
|
+
*/
|
|
35
|
+
static getTraceMetadata(canvas: ExtendedCanvas): TraceMetadata;
|
|
36
|
+
/**
|
|
37
|
+
* Find all trace canvas files in the file tree
|
|
38
|
+
*/
|
|
39
|
+
static findTraceFiles(files: Array<{
|
|
40
|
+
path?: string;
|
|
41
|
+
relativePath?: string;
|
|
42
|
+
name?: string;
|
|
43
|
+
}>): TraceFile[];
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=TraceLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceLoader.d.ts","sourceRoot":"","sources":["../../../src/panels/trace-viewer/TraceLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,MAAM,WAAW,SAAS;IACxB,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AA0BD;;GAEG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc;IAQxD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,aAAa;IAuC9D;;OAEG;IACH,MAAM,CAAC,cAAc,CACnB,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GACpE,SAAS,EAAE;CAuDf"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TraceMetadata } from './TraceLoader';
|
|
3
|
+
interface TraceStatsProps {
|
|
4
|
+
metadata: TraceMetadata;
|
|
5
|
+
theme: {
|
|
6
|
+
colors: Record<string, string>;
|
|
7
|
+
fonts: Record<string, string>;
|
|
8
|
+
fontSizes: (string | number)[];
|
|
9
|
+
space: number[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Displays trace statistics in a compact footer bar
|
|
14
|
+
*/
|
|
15
|
+
export declare const TraceStats: React.FC<TraceStatsProps>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=TraceStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceStats.d.ts","sourceRoot":"","sources":["../../../src/panels/trace-viewer/TraceStats.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,UAAU,eAAe;IACvB,QAAQ,EAAE,aAAa,CAAC;IACxB,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9B,SAAS,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;QAC/B,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;CACH;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwChD,CAAC"}
|