@mastra/playground-ui 7.0.0-beta.8 → 7.0.0-beta.9
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/CHANGELOG.md +20 -0
- package/dist/index.cjs.js +836 -422
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +837 -424
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/ui/elements/buttons/button.d.ts +1 -0
- package/dist/src/components/ui/elements/buttons/combined-buttons.d.ts +6 -0
- package/dist/src/components/ui/elements/buttons/index.d.ts +1 -0
- package/dist/src/components/ui/elements/form-fields/search-field.d.ts +4 -1
- package/dist/src/components/ui/elements/side-dialog/side-dialog-top.d.ts +1 -2
- package/dist/src/domains/configuration/components/playground-config-guard.d.ts +1 -0
- package/dist/src/domains/configuration/context/studio-config-context.d.ts +2 -1
- package/dist/src/domains/configuration/hooks/use-mastra-instance-status.d.ts +4 -0
- package/dist/src/domains/configuration/index.d.ts +1 -0
- package/dist/src/domains/observability/components/helpers.d.ts +1 -3
- package/dist/src/domains/observability/components/index.d.ts +1 -1
- package/dist/src/domains/observability/components/shared.d.ts +2 -5
- package/dist/src/domains/observability/components/span-dialog.d.ts +4 -2
- package/dist/src/domains/observability/components/span-scoring.d.ts +4 -1
- package/dist/src/domains/observability/components/span-tabs.d.ts +4 -2
- package/dist/src/domains/observability/components/span-type-icon.d.ts +6 -0
- package/dist/src/domains/observability/components/timeline-expand-col.d.ts +13 -0
- package/dist/src/domains/observability/components/timeline-name-col.d.ts +16 -0
- package/dist/src/domains/observability/components/timeline-structure-sign.d.ts +7 -0
- package/dist/src/domains/observability/components/timeline-timing-col.d.ts +12 -0
- package/dist/src/domains/observability/components/trace-dialog.d.ts +4 -1
- package/dist/src/domains/observability/components/trace-timeline-span.d.ts +6 -1
- package/dist/src/domains/observability/components/trace-timeline-tools.d.ts +12 -0
- package/dist/src/domains/observability/components/trace-timeline.d.ts +5 -1
- package/dist/src/domains/observability/types.d.ts +13 -0
- package/dist/src/domains/observability/utils/get-descendant-ids.d.ts +2 -0
- package/package.json +8 -8
- package/dist/src/domains/observability/components/trace-timeline-legend.d.ts +0 -6
|
@@ -3,5 +3,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
3
3
|
className?: string;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
variant?: 'primary' | 'outline' | 'ghost';
|
|
6
|
+
isFaded?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from '../../../../../node_modules/@types/react';
|
|
2
|
+
export interface CombinedButtonsProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const CombinedButtons: ({ className, children }: CombinedButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { InputFieldProps } from '..';
|
|
2
|
-
export
|
|
2
|
+
export type SearchFieldProps = InputFieldProps & {
|
|
3
|
+
onReset?: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function SearchField({ onReset, ...props }: SearchFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type SideDialogTopProps = {
|
|
2
2
|
children?: React.ReactNode;
|
|
3
|
-
withTopSeparator?: boolean;
|
|
4
3
|
className?: string;
|
|
5
4
|
};
|
|
6
|
-
export declare function SideDialogTop({ children,
|
|
5
|
+
export declare function SideDialogTop({ children, className }: SideDialogTopProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PlaygroundConfigGuard: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,5 +7,6 @@ export declare const StudioConfigContext: import('../../../../node_modules/@type
|
|
|
7
7
|
export declare const useStudioConfig: () => StudioConfigContextType;
|
|
8
8
|
export interface StudioConfigProviderProps {
|
|
9
9
|
children: React.ReactNode;
|
|
10
|
+
endpoint?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare const StudioConfigProvider: ({ children }: StudioConfigProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const StudioConfigProvider: ({ children, endpoint }: StudioConfigProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,10 +6,8 @@ export declare function useTraceInfo(trace: SpanRecord | undefined): {
|
|
|
6
6
|
}[];
|
|
7
7
|
type getSpanInfoProps = {
|
|
8
8
|
span: SpanRecord | undefined;
|
|
9
|
-
withTraceId?: boolean;
|
|
10
|
-
withSpanId?: boolean;
|
|
11
9
|
};
|
|
12
|
-
export declare function getSpanInfo({ span
|
|
10
|
+
export declare function getSpanInfo({ span }: getSpanInfoProps): {
|
|
13
11
|
key: string;
|
|
14
12
|
label: string;
|
|
15
13
|
value: string;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
+
import { UISpanStyle } from '../types';
|
|
1
2
|
export declare const spanTypePrefixes: string[];
|
|
2
|
-
export declare function getSpanTypeUi(type: string):
|
|
3
|
-
icon: React.ReactNode;
|
|
4
|
-
color: string;
|
|
5
|
-
label: string;
|
|
6
|
-
} | null;
|
|
3
|
+
export declare function getSpanTypeUi(type: string): UISpanStyle | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeyValueListItemData } from '../../../components/ui/elements';
|
|
2
2
|
import { SpanRecord } from '@mastra/core/storage';
|
|
3
|
-
import { ListScoresResponse } from '@mastra/client-js';
|
|
3
|
+
import { ListScoresResponse, GetScorerResponse } from '@mastra/client-js';
|
|
4
4
|
type SpanDialogProps = {
|
|
5
5
|
trace: SpanRecord;
|
|
6
6
|
span?: SpanRecord;
|
|
@@ -16,6 +16,8 @@ type SpanDialogProps = {
|
|
|
16
16
|
defaultActiveTab?: string;
|
|
17
17
|
initialScoreId?: string;
|
|
18
18
|
computeTraceLink: (traceId: string, spanId?: string) => string;
|
|
19
|
+
scorers?: Record<string, GetScorerResponse>;
|
|
20
|
+
isLoadingScorers?: boolean;
|
|
19
21
|
};
|
|
20
|
-
export declare function SpanDialog({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, isOpen, onClose, onNext, onPrevious, onViewToggle, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, }: SpanDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function SpanDialog({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, isOpen, onClose, onNext, onPrevious, onViewToggle, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, scorers, isLoadingScorers, }: SpanDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
export {};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { GetScorerResponse } from '@mastra/client-js';
|
|
1
2
|
export interface SpanScoringProps {
|
|
2
3
|
traceId?: string;
|
|
3
4
|
spanId?: string;
|
|
4
5
|
entityType?: string;
|
|
5
6
|
isTopLevelSpan?: boolean;
|
|
7
|
+
scorers?: Record<string, GetScorerResponse>;
|
|
8
|
+
isLoadingScorers?: boolean;
|
|
6
9
|
}
|
|
7
|
-
export declare const SpanScoring: ({ traceId, spanId, entityType, isTopLevelSpan }: SpanScoringProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const SpanScoring: ({ traceId, spanId, entityType, isTopLevelSpan, scorers, isLoadingScorers, }: SpanScoringProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyValueListItemData } from '../../../index';
|
|
2
|
-
import { ListScoresResponse } from '@mastra/client-js';
|
|
2
|
+
import { ListScoresResponse, GetScorerResponse } from '@mastra/client-js';
|
|
3
3
|
import { SpanRecord } from '@mastra/core/storage';
|
|
4
4
|
type SpanTabsProps = {
|
|
5
5
|
trace?: SpanRecord;
|
|
@@ -11,6 +11,8 @@ type SpanTabsProps = {
|
|
|
11
11
|
defaultActiveTab?: string;
|
|
12
12
|
initialScoreId?: string;
|
|
13
13
|
computeTraceLink: (traceId: string, spanId?: string) => string;
|
|
14
|
+
scorers?: Record<string, GetScorerResponse>;
|
|
15
|
+
isLoadingScorers?: boolean;
|
|
14
16
|
};
|
|
15
|
-
export declare function SpanTabs({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, }: SpanTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function SpanTabs({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, scorers, isLoadingScorers, }: SpanTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type TimelineExpandColProps = {
|
|
2
|
+
isSelected?: boolean;
|
|
3
|
+
isFaded?: boolean;
|
|
4
|
+
isExpanded?: boolean;
|
|
5
|
+
toggleChildren?: () => void;
|
|
6
|
+
expandAllDescendants?: () => void;
|
|
7
|
+
expandedSpanIds?: string[];
|
|
8
|
+
totalDescendants?: number;
|
|
9
|
+
allDescendantsExpanded?: boolean;
|
|
10
|
+
numOfChildren?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function TimelineExpandCol({ isSelected, isFaded, isExpanded, toggleChildren, expandAllDescendants, totalDescendants, allDescendantsExpanded, numOfChildren, }: TimelineExpandColProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UISpan, UISpanStyle } from '../types';
|
|
2
|
+
type TimelineNameColProps = {
|
|
3
|
+
span: UISpan;
|
|
4
|
+
spanUI?: UISpanStyle | null;
|
|
5
|
+
isFaded?: boolean;
|
|
6
|
+
depth?: number;
|
|
7
|
+
onSpanClick?: (id: string) => void;
|
|
8
|
+
selectedSpanId?: string;
|
|
9
|
+
isLastChild?: boolean;
|
|
10
|
+
hasChildren?: boolean;
|
|
11
|
+
isRootSpan?: boolean;
|
|
12
|
+
isExpanded?: boolean;
|
|
13
|
+
toggleChildren?: () => void;
|
|
14
|
+
};
|
|
15
|
+
export declare function TimelineNameCol({ span, spanUI, isFaded, depth, onSpanClick, selectedSpanId, isLastChild, hasChildren, isRootSpan, isExpanded, toggleChildren, }: TimelineNameColProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type TimelineStructureSignProps = {
|
|
2
|
+
isLastChild?: boolean;
|
|
3
|
+
hasChildren?: boolean;
|
|
4
|
+
expanded?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function TimelineStructureSign({ isLastChild, hasChildren, expanded, }: TimelineStructureSignProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UISpan } from '../types';
|
|
2
|
+
type TimelineTimingColProps = {
|
|
3
|
+
span: UISpan;
|
|
4
|
+
selectedSpanId?: string;
|
|
5
|
+
isFaded?: boolean;
|
|
6
|
+
overallLatency?: number;
|
|
7
|
+
overallStartTime?: string;
|
|
8
|
+
overallEndTime?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function TimelineTimingCol({ span, selectedSpanId, isFaded, overallLatency, overallStartTime, color, }: TimelineTimingColProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SpanRecord } from '@mastra/core/storage';
|
|
2
|
+
import { GetScorerResponse } from '@mastra/client-js';
|
|
2
3
|
type TraceDialogProps = {
|
|
3
4
|
traceSpans?: SpanRecord[];
|
|
4
5
|
traceId?: string;
|
|
@@ -14,6 +15,8 @@ type TraceDialogProps = {
|
|
|
14
15
|
initialSpanId?: string;
|
|
15
16
|
initialSpanTab?: string;
|
|
16
17
|
initialScoreId?: string;
|
|
18
|
+
scorers?: Record<string, GetScorerResponse>;
|
|
19
|
+
isLoadingScorers?: boolean;
|
|
17
20
|
};
|
|
18
|
-
export declare function TraceDialog({ traceId, traceSpans, traceDetails, isOpen, onClose, onNext, onPrevious, isLoadingSpans,
|
|
21
|
+
export declare function TraceDialog({ traceId, traceSpans, traceDetails, isOpen, onClose, onNext, onPrevious, isLoadingSpans, computeTraceLink, initialSpanId, initialSpanTab, initialScoreId, scorers, isLoadingScorers, }: TraceDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
export {};
|
|
@@ -8,6 +8,11 @@ type TraceTimelineSpanProps = {
|
|
|
8
8
|
overallLatency?: number;
|
|
9
9
|
overallStartTime?: string;
|
|
10
10
|
overallEndTime?: string;
|
|
11
|
+
fadedTypes?: string[];
|
|
12
|
+
searchPhrase?: string;
|
|
13
|
+
featuredSpanIds?: string[];
|
|
14
|
+
expandedSpanIds?: string[];
|
|
15
|
+
setExpandedSpanIds?: React.Dispatch<React.SetStateAction<string[]>>;
|
|
11
16
|
};
|
|
12
|
-
export declare function TraceTimelineSpan({ span, depth, onSpanClick, selectedSpanId, isLastChild, overallLatency, overallStartTime, overallEndTime, }: TraceTimelineSpanProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function TraceTimelineSpan({ span, depth, onSpanClick, selectedSpanId, isLastChild, overallLatency, overallStartTime, overallEndTime, fadedTypes, searchPhrase, featuredSpanIds, expandedSpanIds, setExpandedSpanIds, }: TraceTimelineSpanProps): import("react/jsx-runtime").JSX.Element;
|
|
13
18
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SpanRecord } from '@mastra/core/storage';
|
|
2
|
+
type TraceTimelineLegendProps = {
|
|
3
|
+
spans?: SpanRecord[];
|
|
4
|
+
fadedTypes?: string[];
|
|
5
|
+
onLegendClick?: (val: string) => void;
|
|
6
|
+
onLegendReset?: () => void;
|
|
7
|
+
searchPhrase?: string;
|
|
8
|
+
onSearchPhraseChange?: (val: string) => void;
|
|
9
|
+
traceId?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function TraceTimelineTools({ spans, fadedTypes, onLegendClick, onLegendReset, onSearchPhraseChange, traceId, }: TraceTimelineLegendProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -4,6 +4,10 @@ type TraceTimelineProps = {
|
|
|
4
4
|
onSpanClick: (id: string) => void;
|
|
5
5
|
selectedSpanId?: string;
|
|
6
6
|
isLoading?: boolean;
|
|
7
|
+
fadedTypes?: string[];
|
|
8
|
+
expandedSpanIds?: string[];
|
|
9
|
+
setExpandedSpanIds?: React.Dispatch<React.SetStateAction<string[]>>;
|
|
10
|
+
featuredSpanIds?: string[];
|
|
7
11
|
};
|
|
8
|
-
export declare function TraceTimeline({ hierarchicalSpans, onSpanClick, selectedSpanId, isLoading }: TraceTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function TraceTimeline({ hierarchicalSpans, onSpanClick, selectedSpanId, isLoading, fadedTypes, expandedSpanIds, setExpandedSpanIds, featuredSpanIds, }: TraceTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
9
13
|
export {};
|
|
@@ -6,4 +6,17 @@ export type UISpan = {
|
|
|
6
6
|
startTime: string;
|
|
7
7
|
endTime?: string;
|
|
8
8
|
spans?: UISpan[];
|
|
9
|
+
parentSpanId?: string | null;
|
|
9
10
|
};
|
|
11
|
+
export type UISpanStyle = {
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
color?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
bgColor?: string;
|
|
16
|
+
typePrefix: string;
|
|
17
|
+
};
|
|
18
|
+
export type UISpanState = {
|
|
19
|
+
spanId: string;
|
|
20
|
+
expanded: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type UISpanType = 'agent' | 'workflow' | 'tool' | 'model' | 'other';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.9",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
"react": ">=19.0.0",
|
|
112
112
|
"react-dom": ">=19.0.0",
|
|
113
113
|
"tailwindcss": "^3.0.0",
|
|
114
|
-
"@mastra/ai-sdk": "^1.0.0-beta.
|
|
115
|
-
"@mastra/client-js": "^1.0.0-beta.8",
|
|
114
|
+
"@mastra/ai-sdk": "^1.0.0-beta.7",
|
|
116
115
|
"@mastra/schema-compat": "1.0.0-beta.2",
|
|
117
|
-
"@mastra/react": "0.1.0-beta.
|
|
116
|
+
"@mastra/react": "0.1.0-beta.9",
|
|
117
|
+
"@mastra/client-js": "^1.0.0-beta.9"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"@storybook/addon-docs": "^9.1.16",
|
|
@@ -139,10 +139,10 @@
|
|
|
139
139
|
"vite-plugin-dts": "^4.5.4",
|
|
140
140
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
141
141
|
"vitest": "4.0.12",
|
|
142
|
-
"@mastra/ai-sdk": "^1.0.0-beta.
|
|
143
|
-
"@mastra/
|
|
144
|
-
"@mastra/
|
|
145
|
-
"@mastra/
|
|
142
|
+
"@mastra/ai-sdk": "^1.0.0-beta.7",
|
|
143
|
+
"@mastra/core": "1.0.0-beta.9",
|
|
144
|
+
"@mastra/client-js": "^1.0.0-beta.9",
|
|
145
|
+
"@mastra/react": "0.1.0-beta.9",
|
|
146
146
|
"@mastra/schema-compat": "1.0.0-beta.2"
|
|
147
147
|
},
|
|
148
148
|
"homepage": "https://mastra.ai",
|