@mastra/playground-ui 19.0.0-alpha.2 → 19.0.0-alpha.4

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/dist/index.cjs.js +1259 -19
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.es.js +1237 -22
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/domains/agents/components/agent-metadata/agent-metadata.d.ts +1 -0
  7. package/dist/src/domains/metrics/components/date-range-selector.d.ts +1 -0
  8. package/dist/src/domains/metrics/components/index.d.ts +28 -0
  9. package/dist/src/domains/metrics/components/latency-card.d.ts +1 -0
  10. package/dist/src/domains/metrics/components/metrics-dashboard.d.ts +1 -0
  11. package/dist/src/domains/metrics/components/metrics-kpi-cards.d.ts +4 -0
  12. package/dist/src/domains/metrics/components/metrics-utils.d.ts +14 -0
  13. package/dist/src/domains/metrics/components/model-usage-cost-card.d.ts +1 -0
  14. package/dist/src/domains/metrics/components/scores-card.d.ts +1 -0
  15. package/dist/src/domains/metrics/components/token-usage-by-agent-card.d.ts +1 -0
  16. package/dist/src/domains/metrics/components/traces-volume-card.d.ts +1 -0
  17. package/dist/src/domains/metrics/hooks/use-agent-runs-kpi-metrics.d.ts +10 -0
  18. package/dist/src/domains/metrics/hooks/use-avg-score-kpi-metrics.d.ts +10 -0
  19. package/dist/src/domains/metrics/hooks/use-latency-metrics.d.ts +11 -0
  20. package/dist/src/domains/metrics/hooks/use-metrics-filters.d.ts +9 -0
  21. package/dist/src/domains/metrics/hooks/use-metrics.d.ts +56 -0
  22. package/dist/src/domains/metrics/hooks/use-model-usage-cost-metrics.d.ts +8 -0
  23. package/dist/src/domains/metrics/hooks/use-scores-metrics.d.ts +22 -0
  24. package/dist/src/domains/metrics/hooks/use-token-usage-by-agent-metrics.d.ts +7 -0
  25. package/dist/src/domains/metrics/hooks/use-total-tokens-kpi-metrics.d.ts +6 -0
  26. package/dist/src/domains/metrics/hooks/use-trace-volume-metrics.d.ts +10 -0
  27. package/dist/src/domains/metrics/index.d.ts +1 -0
  28. package/dist/src/domains/workspace/hooks/use-workspace-skills.d.ts +5 -1
  29. package/dist/src/domains/workspace/types.d.ts +1 -1
  30. package/dist/src/ds/components/DashboardCard/dashboard-card.d.ts +6 -0
  31. package/dist/src/ds/components/DashboardCard/dashboard-card.stories.d.ts +8 -0
  32. package/dist/src/ds/components/DashboardCard/index.d.ts +1 -0
  33. package/dist/src/ds/components/EntityList/entity-list-no-match.d.ts +5 -0
  34. package/dist/src/ds/components/EntityList/entity-list.d.ts +2 -0
  35. package/dist/src/ds/components/HorizontalBars/horizontal-bars.d.ts +15 -0
  36. package/dist/src/ds/components/HorizontalBars/horizontal-bars.stories.d.ts +7 -0
  37. package/dist/src/ds/components/HorizontalBars/index.d.ts +1 -0
  38. package/dist/src/ds/components/MetricsCard/index.d.ts +2 -0
  39. package/dist/src/ds/components/MetricsCard/metrics-card-content.d.ts +5 -0
  40. package/dist/src/ds/components/MetricsCard/metrics-card-description.d.ts +4 -0
  41. package/dist/src/ds/components/MetricsCard/metrics-card-error.d.ts +4 -0
  42. package/dist/src/ds/components/MetricsCard/metrics-card-loading.d.ts +3 -0
  43. package/dist/src/ds/components/MetricsCard/metrics-card-no-data.d.ts +4 -0
  44. package/dist/src/ds/components/MetricsCard/metrics-card-root.d.ts +5 -0
  45. package/dist/src/ds/components/MetricsCard/metrics-card-summary.d.ts +5 -0
  46. package/dist/src/ds/components/MetricsCard/metrics-card-title-and-description.d.ts +15 -0
  47. package/dist/src/ds/components/MetricsCard/metrics-card-title.d.ts +4 -0
  48. package/dist/src/ds/components/MetricsCard/metrics-card-top-bar.d.ts +5 -0
  49. package/dist/src/ds/components/MetricsCard/metrics-card.d.ts +31 -0
  50. package/dist/src/ds/components/MetricsCard/metrics-card.stories.d.ts +11 -0
  51. package/dist/src/ds/components/MetricsDataTable/index.d.ts +1 -0
  52. package/dist/src/ds/components/MetricsDataTable/metrics-data-table.d.ts +13 -0
  53. package/dist/src/ds/components/MetricsDataTable/metrics-data-table.stories.d.ts +16 -0
  54. package/dist/src/ds/components/MetricsFlexGrid/index.d.ts +1 -0
  55. package/dist/src/ds/components/MetricsFlexGrid/metrics-flex-grid.d.ts +5 -0
  56. package/dist/src/ds/components/MetricsFlexGrid/metrics-flex-grid.stories.d.ts +7 -0
  57. package/dist/src/ds/components/MetricsKpiCard/index.d.ts +1 -0
  58. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card-change.d.ts +6 -0
  59. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card-error.d.ts +4 -0
  60. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card-label.d.ts +4 -0
  61. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card-loading.d.ts +3 -0
  62. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card-no-change.d.ts +4 -0
  63. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card-no-data.d.ts +4 -0
  64. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card-root.d.ts +5 -0
  65. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card-value.d.ts +4 -0
  66. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card.d.ts +17 -0
  67. package/dist/src/ds/components/MetricsKpiCard/metrics-kpi-card.stories.d.ts +10 -0
  68. package/dist/src/ds/components/MetricsLineChart/index.d.ts +2 -0
  69. package/dist/src/ds/components/MetricsLineChart/metrics-line-chart-tooltip.d.ts +10 -0
  70. package/dist/src/ds/components/MetricsLineChart/metrics-line-chart.d.ts +15 -0
  71. package/dist/src/ds/components/Tabs/tabs-list.d.ts +2 -1
  72. package/dist/src/index.d.ts +1 -0
  73. package/dist/src/lib/framework.d.ts +3 -3
  74. package/package.json +11 -10
@@ -31,6 +31,7 @@ export interface AgentMetadataSkillListProps {
31
31
  name: string;
32
32
  description: string;
33
33
  license?: string;
34
+ path: string;
34
35
  }>;
35
36
  agentId: string;
36
37
  workspaceId?: string;
@@ -0,0 +1 @@
1
+ export declare function DateRangeSelector(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ export { MetricsDashboard } from './metrics-dashboard';
2
+ export { MetricsProvider, useMetrics, isValidPreset } from '../hooks/use-metrics';
3
+ export type { DatePreset } from '../hooks/use-metrics';
4
+ export { useAgentRunsKpiMetrics } from '../hooks/use-agent-runs-kpi-metrics';
5
+ export { useTotalTokensKpiMetrics } from '../hooks/use-total-tokens-kpi-metrics';
6
+ export { useAvgScoreKpiMetrics } from '../hooks/use-avg-score-kpi-metrics';
7
+ export { useMetricsFilters } from '../hooks/use-metrics-filters';
8
+ export { DateRangeSelector } from './date-range-selector';
9
+ export { MetricsCard } from '../../../ds/components/MetricsCard';
10
+ export { MetricsDataTable } from '../../../ds/components/MetricsDataTable/metrics-data-table';
11
+ export { MetricsKpiCard } from '../../../ds/components/MetricsKpiCard';
12
+ export { ModelUsageCostCard } from './model-usage-cost-card';
13
+ export { useModelUsageCostMetrics } from '../hooks/use-model-usage-cost-metrics';
14
+ export type { ModelUsageRow } from '../hooks/use-model-usage-cost-metrics';
15
+ export { HorizontalBars } from '../../../ds/components/HorizontalBars';
16
+ export { TracesVolumeCard } from './traces-volume-card';
17
+ export { useTraceVolumeMetrics } from '../hooks/use-trace-volume-metrics';
18
+ export type { VolumeRow } from '../hooks/use-trace-volume-metrics';
19
+ export { LatencyCard } from './latency-card';
20
+ export { useLatencyMetrics } from '../hooks/use-latency-metrics';
21
+ export type { LatencyPoint } from '../hooks/use-latency-metrics';
22
+ export { ScoresCard } from './scores-card';
23
+ export { useScoresMetrics } from '../hooks/use-scores-metrics';
24
+ export type { ScorerSummary, ScoresOverTimePoint } from '../hooks/use-scores-metrics';
25
+ export { TokenUsageByAgentCard } from './token-usage-by-agent-card';
26
+ export { useTokenUsageByAgentMetrics } from '../hooks/use-token-usage-by-agent-metrics';
27
+ export type { TokenUsageByAgentRow } from '../hooks/use-token-usage-by-agent-metrics';
28
+ export { formatCompact, CHART_COLORS } from './metrics-utils';
@@ -0,0 +1 @@
1
+ export declare function LatencyCard(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function MetricsDashboard(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ export declare function AgentRunsKpiCard(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function ModelCostKpiCard(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function TotalTokensKpiCard(): import("react/jsx-runtime").JSX.Element;
4
+ export declare function AvgScoreKpiCard(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export declare function formatCompact(n: number): string;
2
+ export declare const CHART_COLORS: {
3
+ readonly green: "#22c55e";
4
+ readonly orange: "#fb923c";
5
+ readonly pink: "#f472b6";
6
+ readonly purple: "#8b5cf6";
7
+ readonly blue: "#4f83f1";
8
+ readonly blueDark: "#2b5cd9";
9
+ readonly blueLight: "#6b8fe5";
10
+ readonly red: "#f87171";
11
+ readonly greenDark: "#15613a";
12
+ readonly redDark: "#991b1b";
13
+ readonly yellow: "#facc15";
14
+ };
@@ -0,0 +1 @@
1
+ export declare function ModelUsageCostCard(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ScoresCard(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function TokenUsageByAgentCard(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function TracesVolumeCard(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ /** Total Agent Runs — count of agent duration metric observations */
2
+ export declare function useAgentRunsKpiMetrics(): import('@tanstack/react-query').UseQueryResult<{
3
+ value: number | null;
4
+ estimatedCost?: number | null | undefined;
5
+ costUnit?: string | null | undefined;
6
+ previousValue?: number | null | undefined;
7
+ previousEstimatedCost?: number | null | undefined;
8
+ changePercent?: number | null | undefined;
9
+ costChangePercent?: number | null | undefined;
10
+ }, Error>;
@@ -0,0 +1,10 @@
1
+ /** Avg Score — average score from the old scores storage */
2
+ export declare function useAvgScoreKpiMetrics(): import('@tanstack/react-query').UseQueryResult<{
3
+ value: null;
4
+ previousValue: null;
5
+ changePercent: null;
6
+ } | {
7
+ value: number;
8
+ previousValue: null;
9
+ changePercent: null;
10
+ }, Error>;
@@ -0,0 +1,11 @@
1
+ export interface LatencyPoint {
2
+ [key: string]: unknown;
3
+ time: string;
4
+ p50: number;
5
+ p95: number;
6
+ }
7
+ export declare function useLatencyMetrics(): import('@tanstack/react-query').UseQueryResult<{
8
+ agentData: LatencyPoint[];
9
+ workflowData: LatencyPoint[];
10
+ toolData: LatencyPoint[];
11
+ }, Error>;
@@ -0,0 +1,9 @@
1
+ import { DatePreset, DateRange } from './use-metrics';
2
+ export declare function useMetricsFilters(): {
3
+ datePreset: DatePreset;
4
+ customRange: DateRange | undefined;
5
+ timestamp: {
6
+ start: Date;
7
+ end: Date;
8
+ };
9
+ };
@@ -0,0 +1,56 @@
1
+ import { ReactNode } from '../../../../node_modules/@types/react';
2
+ declare const DATE_PRESETS: readonly [{
3
+ readonly label: "Last 24 hours";
4
+ readonly value: "24h";
5
+ }, {
6
+ readonly label: "Last 3 days";
7
+ readonly value: "3d";
8
+ }, {
9
+ readonly label: "Last 7 days";
10
+ readonly value: "7d";
11
+ }, {
12
+ readonly label: "Last 14 days";
13
+ readonly value: "14d";
14
+ }, {
15
+ readonly label: "Last 30 days";
16
+ readonly value: "30d";
17
+ }];
18
+ export type DatePreset = (typeof DATE_PRESETS)[number]['value'] | 'custom';
19
+ export { DATE_PRESETS };
20
+ export declare function isValidPreset(value: string | null | undefined): value is DatePreset;
21
+ export type DateRange = {
22
+ from?: Date;
23
+ to?: Date;
24
+ };
25
+ export type Comparator = 'is' | 'is not';
26
+ export type FilterGroup = {
27
+ id: string;
28
+ field: string;
29
+ comparator: Comparator;
30
+ values: string[];
31
+ };
32
+ export declare const MetricsContext: import('../../../../node_modules/@types/react').Context<{
33
+ datePreset: DatePreset;
34
+ setDatePreset: (v: DatePreset) => void;
35
+ customRange: DateRange | undefined;
36
+ setCustomRange: (v: DateRange | undefined) => void;
37
+ dateRangeLabel: string;
38
+ filterGroups: FilterGroup[];
39
+ setFilterGroups: React.Dispatch<React.SetStateAction<FilterGroup[]>>;
40
+ multiplier: number;
41
+ }>;
42
+ export declare function useMetrics(): {
43
+ datePreset: DatePreset;
44
+ setDatePreset: (v: DatePreset) => void;
45
+ customRange: DateRange | undefined;
46
+ setCustomRange: (v: DateRange | undefined) => void;
47
+ dateRangeLabel: string;
48
+ filterGroups: FilterGroup[];
49
+ setFilterGroups: React.Dispatch<React.SetStateAction<FilterGroup[]>>;
50
+ multiplier: number;
51
+ };
52
+ export declare function MetricsProvider({ children, initialPreset, onPresetChange, }: {
53
+ children: ReactNode;
54
+ initialPreset?: DatePreset;
55
+ onPresetChange?: (preset: DatePreset) => void;
56
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export interface ModelUsageRow {
2
+ model: string;
3
+ input: string;
4
+ output: string;
5
+ cacheRead: string;
6
+ cacheWrite: string;
7
+ }
8
+ export declare function useModelUsageCostMetrics(): import('@tanstack/react-query').UseQueryResult<ModelUsageRow[], Error>;
@@ -0,0 +1,22 @@
1
+ export interface ScorerSummary {
2
+ scorer: string;
3
+ avg: number;
4
+ min: number;
5
+ max: number;
6
+ count: number;
7
+ }
8
+ export interface ScoresOverTimePoint {
9
+ time: string;
10
+ [scorer: string]: string | number;
11
+ }
12
+ export declare function useScoresMetrics(): import('@tanstack/react-query').UseQueryResult<{
13
+ summaryData: never[];
14
+ overTimeData: never[];
15
+ scorerNames: never[];
16
+ avgScore: null;
17
+ } | {
18
+ summaryData: ScorerSummary[];
19
+ overTimeData: ScoresOverTimePoint[];
20
+ scorerNames: string[];
21
+ avgScore: number;
22
+ }, Error>;
@@ -0,0 +1,7 @@
1
+ export interface TokenUsageByAgentRow {
2
+ name: string;
3
+ total: number;
4
+ input: number;
5
+ output: number;
6
+ }
7
+ export declare function useTokenUsageByAgentMetrics(): import('@tanstack/react-query').UseQueryResult<TokenUsageByAgentRow[], Error>;
@@ -0,0 +1,6 @@
1
+ /** Total Tokens — sum of all input + output tokens */
2
+ export declare function useTotalTokensKpiMetrics(): import('@tanstack/react-query').UseQueryResult<{
3
+ value: number | null;
4
+ previousValue: number | null;
5
+ changePercent: number | null;
6
+ }, Error>;
@@ -0,0 +1,10 @@
1
+ export interface VolumeRow {
2
+ name: string;
3
+ completed: number;
4
+ errors: number;
5
+ }
6
+ export declare function useTraceVolumeMetrics(): import('@tanstack/react-query').UseQueryResult<{
7
+ agentData: VolumeRow[];
8
+ workflowData: VolumeRow[];
9
+ toolData: VolumeRow[];
10
+ }, Error>;
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -11,6 +11,7 @@ export declare const useWorkspaceSkills: (options?: {
11
11
  export declare const useWorkspaceSkill: (skillName: string, options?: {
12
12
  enabled?: boolean;
13
13
  workspaceId?: string;
14
+ path?: string;
14
15
  }) => import('@tanstack/react-query').UseQueryResult<Skill, unknown>;
15
16
  /**
16
17
  * Hook to list references for a skill via workspace
@@ -18,6 +19,7 @@ export declare const useWorkspaceSkill: (skillName: string, options?: {
18
19
  export declare const useWorkspaceSkillReferences: (skillName: string, options?: {
19
20
  enabled?: boolean;
20
21
  workspaceId?: string;
22
+ path?: string;
21
23
  }) => import('@tanstack/react-query').UseQueryResult<ListReferencesResponse, unknown>;
22
24
  /**
23
25
  * Hook to get a specific reference file content via workspace
@@ -25,6 +27,7 @@ export declare const useWorkspaceSkillReferences: (skillName: string, options?:
25
27
  export declare const useWorkspaceSkillReference: (skillName: string, referencePath: string, options?: {
26
28
  enabled?: boolean;
27
29
  workspaceId?: string;
30
+ path?: string;
28
31
  }) => import('@tanstack/react-query').UseQueryResult<GetReferenceResponse, unknown>;
29
32
  /**
30
33
  * Hook to search across skills via workspace
@@ -33,10 +36,11 @@ export declare const useSearchWorkspaceSkills: () => import('@tanstack/react-que
33
36
  /**
34
37
  * Hook to get a specific skill from an agent's workspace
35
38
  * @param agentId - The agent ID (used for query key)
36
- * @param skillName - The skill name to fetch
39
+ * @param skillPath - The skill path to fetch
37
40
  * @param options - Options including workspaceId and enabled flag
38
41
  */
39
42
  export declare const useAgentSkill: (agentId: string, skillName: string, options?: {
40
43
  enabled?: boolean;
41
44
  workspaceId?: string;
45
+ path?: string;
42
46
  }) => import('@tanstack/react-query').UseQueryResult<Skill, unknown>;
@@ -142,7 +142,6 @@ export interface SkillMetadata {
142
142
  skillsShSource?: SkillsShSource;
143
143
  }
144
144
  export interface Skill extends SkillMetadata {
145
- path: string;
146
145
  instructions: string;
147
146
  source: SkillSource;
148
147
  references: string[];
@@ -155,6 +154,7 @@ export interface ListSkillsResponse {
155
154
  }
156
155
  export interface SkillSearchResult {
157
156
  skillName: string;
157
+ skillPath: string;
158
158
  source: string;
159
159
  content: string;
160
160
  score: number;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from '../../../../node_modules/@types/react';
2
+ export type DashboardCardProps = {
3
+ children: ReactNode;
4
+ className?: string;
5
+ };
6
+ export declare function DashboardCard({ children, className }: DashboardCardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { DashboardCard } from './dashboard-card';
3
+ declare const meta: Meta<typeof DashboardCard>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DashboardCard>;
6
+ export declare const Default: Story;
7
+ export declare const WithCustomClass: Story;
8
+ export declare const MultipleCards: Story;
@@ -0,0 +1 @@
1
+ export { DashboardCard, type DashboardCardProps } from './dashboard-card';
@@ -0,0 +1,5 @@
1
+ export type EntityListNoMatchProps = {
2
+ message?: string;
3
+ className?: string;
4
+ };
5
+ export declare function EntityListNoMatch({ message, className }: EntityListNoMatchProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { EntityListCell, EntityListTextCell, EntityListNameCell, EntityListDescriptionCell } from './entity-list-cells';
2
+ import { EntityListNoMatch } from './entity-list-no-match';
2
3
  import { EntityListRoot } from './entity-list-root';
3
4
  import { EntityListRowLink } from './entity-list-row-link';
4
5
  import { EntityListRows } from './entity-list-rows';
@@ -15,4 +16,5 @@ export declare const EntityList: typeof EntityListRoot & {
15
16
  TextCell: typeof EntityListTextCell;
16
17
  NameCell: typeof EntityListNameCell;
17
18
  DescriptionCell: typeof EntityListDescriptionCell;
19
+ NoMatch: typeof EntityListNoMatch;
18
20
  };
@@ -0,0 +1,15 @@
1
+ type Segment = {
2
+ label: string;
3
+ color: string;
4
+ };
5
+ export declare function HorizontalBars({ data, segments, maxVal, fmt, className, }: {
6
+ data: Array<{
7
+ name: string;
8
+ values: number[];
9
+ }>;
10
+ segments: Segment[];
11
+ maxVal: number;
12
+ fmt: (v: number) => string;
13
+ className?: string;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { HorizontalBars } from './horizontal-bars';
3
+ declare const meta: Meta<typeof HorizontalBars>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof HorizontalBars>;
6
+ export declare const Default: Story;
7
+ export declare const Stacked: Story;
@@ -0,0 +1 @@
1
+ export { HorizontalBars } from './horizontal-bars';
@@ -0,0 +1,2 @@
1
+ export { MetricsCard } from './metrics-card';
2
+ export { MetricsKpiCard } from '../MetricsKpiCard';
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from '../../../../node_modules/@types/react';
2
+ export declare function MetricsCardContent({ children, className }: {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function MetricsCardDescription({ children, className }: {
2
+ children: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function MetricsCardError({ message, className, }: {
2
+ message?: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function MetricsCardLoading({ className }: {
2
+ className?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function MetricsCardNoData({ message, className }: {
2
+ message?: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from '../../../../node_modules/@types/react';
2
+ export declare function MetricsCardRoot({ children, className }: {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare function MetricsCardSummary({ value, label, className }: {
2
+ value: string;
3
+ label?: string;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from '../../../../node_modules/@types/react';
2
+ type PropsWithTitleDescription = {
3
+ title: string;
4
+ description?: string;
5
+ children?: never;
6
+ className?: string;
7
+ };
8
+ type PropsWithChildren = {
9
+ title?: never;
10
+ description?: never;
11
+ children: ReactNode;
12
+ className?: string;
13
+ };
14
+ export declare function MetricsCardTitleAndDescription(props: PropsWithTitleDescription | PropsWithChildren): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function MetricsCardTitle({ children, className }: {
2
+ children: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from '../../../../node_modules/@types/react';
2
+ export declare function MetricsCardTopBar({ children, className }: {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { MetricsCardContent } from './metrics-card-content';
2
+ import { MetricsCardDescription } from './metrics-card-description';
3
+ import { MetricsCardError } from './metrics-card-error';
4
+ import { MetricsCardLoading } from './metrics-card-loading';
5
+ import { MetricsCardNoData } from './metrics-card-no-data';
6
+ import { MetricsCardRoot } from './metrics-card-root';
7
+ import { MetricsCardSummary } from './metrics-card-summary';
8
+ import { MetricsCardTitle } from './metrics-card-title';
9
+ import { MetricsCardTitleAndDescription } from './metrics-card-title-and-description';
10
+ import { MetricsCardTopBar } from './metrics-card-top-bar';
11
+ export declare const MetricsCard: typeof MetricsCardRoot & {
12
+ Root: typeof MetricsCardRoot;
13
+ Kpi: typeof import('../MetricsKpiCard/metrics-kpi-card-root').MetricsKpiCardRoot & {
14
+ Label: typeof import('../MetricsKpiCard/metrics-kpi-card-label').MetricsKpiCardLabel;
15
+ Value: typeof import('../MetricsKpiCard/metrics-kpi-card-value').MetricsKpiCardValue;
16
+ Change: typeof import('../MetricsKpiCard/metrics-kpi-card-change').MetricsKpiCardChange;
17
+ NoChange: typeof import('../MetricsKpiCard/metrics-kpi-card-no-change').MetricsKpiCardNoChange;
18
+ NoData: typeof import('../MetricsKpiCard/metrics-kpi-card-no-data').MetricsKpiCardNoData;
19
+ Error: typeof import('../MetricsKpiCard/metrics-kpi-card-error').MetricsKpiCardError;
20
+ Loading: typeof import('../MetricsKpiCard/metrics-kpi-card-loading').MetricsKpiCardLoading;
21
+ };
22
+ TopBar: typeof MetricsCardTopBar;
23
+ TitleAndDescription: typeof MetricsCardTitleAndDescription;
24
+ Title: typeof MetricsCardTitle;
25
+ Description: typeof MetricsCardDescription;
26
+ Summary: typeof MetricsCardSummary;
27
+ Loading: typeof MetricsCardLoading;
28
+ Error: typeof MetricsCardError;
29
+ Content: typeof MetricsCardContent;
30
+ NoData: typeof MetricsCardNoData;
31
+ };
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { MetricsCard } from './metrics-card';
3
+ declare const meta: Meta<typeof MetricsCard>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MetricsCard>;
6
+ export declare const Default: Story;
7
+ export declare const Loading: Story;
8
+ export declare const Error: Story;
9
+ export declare const NoData: Story;
10
+ export declare const WithSummary: Story;
11
+ export declare const TitleOnly: Story;
@@ -0,0 +1 @@
1
+ export { MetricsDataTable } from './metrics-data-table';
@@ -0,0 +1,13 @@
1
+ type Column<T> = {
2
+ label: string;
3
+ value: (row: T) => string | number;
4
+ highlight?: boolean;
5
+ };
6
+ export declare function MetricsDataTable<T extends {
7
+ key: string;
8
+ }>({ columns, data, className, }: {
9
+ columns: Column<T>[];
10
+ data: T[];
11
+ className?: string;
12
+ }): import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
@@ -0,0 +1,16 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { MetricsDataTable } from './metrics-data-table';
3
+ type ModelRow = {
4
+ key: string;
5
+ model: string;
6
+ input: number;
7
+ output: number;
8
+ cacheRead: number;
9
+ cacheWrite: number;
10
+ };
11
+ declare const meta: Meta<typeof MetricsDataTable<ModelRow>>;
12
+ export default meta;
13
+ type Story = StoryObj<typeof MetricsDataTable<ModelRow>>;
14
+ export declare const Default: Story;
15
+ export declare const ManyRows: Story;
16
+ export declare const Empty: Story;
@@ -0,0 +1 @@
1
+ export { MetricsFlexGrid } from './metrics-flex-grid';
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from '../../../../node_modules/@types/react';
2
+ export declare function MetricsFlexGrid({ children, className }: {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { MetricsFlexGrid } from './metrics-flex-grid';
3
+ declare const meta: Meta<typeof MetricsFlexGrid>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MetricsFlexGrid>;
6
+ export declare const Default: Story;
7
+ export declare const TwoItems: Story;
@@ -0,0 +1 @@
1
+ export { MetricsKpiCard } from './metrics-kpi-card';
@@ -0,0 +1,6 @@
1
+ export declare function MetricsKpiCardChange({ changePct, prevValue, lowerIsBetter, className, }: {
2
+ changePct: number;
3
+ prevValue?: string;
4
+ lowerIsBetter?: boolean;
5
+ className?: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function MetricsKpiCardError({ message, className, }: {
2
+ message?: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function MetricsKpiCardLabel({ children, className }: {
2
+ children: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function MetricsKpiCardLoading({ className }: {
2
+ className?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function MetricsKpiCardNoChange({ message, className, }: {
2
+ message?: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function MetricsKpiCardNoData({ message, className }: {
2
+ message?: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from '../../../../node_modules/@types/react';
2
+ export declare function MetricsKpiCardRoot({ children, className }: {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function MetricsKpiCardValue({ children, className }: {
2
+ children: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { MetricsKpiCardChange } from './metrics-kpi-card-change';
2
+ import { MetricsKpiCardError } from './metrics-kpi-card-error';
3
+ import { MetricsKpiCardLabel } from './metrics-kpi-card-label';
4
+ import { MetricsKpiCardLoading } from './metrics-kpi-card-loading';
5
+ import { MetricsKpiCardNoChange } from './metrics-kpi-card-no-change';
6
+ import { MetricsKpiCardNoData } from './metrics-kpi-card-no-data';
7
+ import { MetricsKpiCardRoot } from './metrics-kpi-card-root';
8
+ import { MetricsKpiCardValue } from './metrics-kpi-card-value';
9
+ export declare const MetricsKpiCard: typeof MetricsKpiCardRoot & {
10
+ Label: typeof MetricsKpiCardLabel;
11
+ Value: typeof MetricsKpiCardValue;
12
+ Change: typeof MetricsKpiCardChange;
13
+ NoChange: typeof MetricsKpiCardNoChange;
14
+ NoData: typeof MetricsKpiCardNoData;
15
+ Error: typeof MetricsKpiCardError;
16
+ Loading: typeof MetricsKpiCardLoading;
17
+ };