@mastra/playground-ui 4.0.0-alpha.7 → 4.0.0-alpha.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.
Files changed (63) hide show
  1. package/dist/domains/agents/agent/context/agent-context.d.ts +13 -0
  2. package/dist/domains/agents/index.d.ts +1 -0
  3. package/dist/domains/workflows/context/workflow-run-context.d.ts +2 -2
  4. package/dist/ds/components/Badge/Badge.d.ts +9 -0
  5. package/dist/ds/components/Badge/index.d.ts +1 -0
  6. package/dist/ds/components/Breadcrumb/Breadcrumb.d.ts +16 -0
  7. package/dist/ds/components/Breadcrumb/index.d.ts +1 -0
  8. package/dist/ds/components/Button/Button.d.ts +10 -0
  9. package/dist/ds/components/Button/index.d.ts +1 -0
  10. package/dist/ds/components/Header/Header.d.ts +9 -0
  11. package/dist/ds/components/Header/index.d.ts +1 -0
  12. package/dist/ds/components/Logo/MastraLogo.d.ts +3 -0
  13. package/dist/ds/components/Logo/index.d.ts +1 -0
  14. package/dist/ds/components/Table/Cells.d.ts +24 -0
  15. package/dist/ds/components/Table/Table.d.ts +29 -0
  16. package/dist/ds/components/Table/index.d.ts +2 -0
  17. package/dist/ds/components/Table/utils.d.ts +4 -0
  18. package/dist/ds/components/Txt/Txt.d.ts +9 -0
  19. package/dist/ds/components/Txt/index.d.ts +1 -0
  20. package/dist/ds/components/types.d.ts +4 -0
  21. package/dist/ds/icons/AgentIcon.d.ts +3 -0
  22. package/dist/ds/icons/AiIcon.d.ts +3 -0
  23. package/dist/ds/icons/ApiIcon.d.ts +3 -0
  24. package/dist/ds/icons/BranchIcon.d.ts +3 -0
  25. package/dist/ds/icons/CheckIcon.d.ts +3 -0
  26. package/dist/ds/icons/CommitIcon.d.ts +3 -0
  27. package/dist/ds/icons/CrossIcon.d.ts +3 -0
  28. package/dist/ds/icons/DbIcon.d.ts +3 -0
  29. package/dist/ds/icons/DebugIcon.d.ts +3 -0
  30. package/dist/ds/icons/DeploymentIcon.d.ts +3 -0
  31. package/dist/ds/icons/DividerIcon.d.ts +3 -0
  32. package/dist/ds/icons/DocsIcon.d.ts +3 -0
  33. package/dist/ds/icons/EnvIcon.d.ts +3 -0
  34. package/dist/ds/icons/FiltersIcon.d.ts +3 -0
  35. package/dist/ds/icons/HomeIcon.d.ts +3 -0
  36. package/dist/ds/icons/Icon.d.ts +7 -0
  37. package/dist/ds/icons/InfoIcon.d.ts +3 -0
  38. package/dist/ds/icons/JudgeIcon.d.ts +3 -0
  39. package/dist/ds/icons/LogsIcon.d.ts +3 -0
  40. package/dist/ds/icons/MemoryIcon.d.ts +3 -0
  41. package/dist/ds/icons/OpenAIIcon.d.ts +3 -0
  42. package/dist/ds/icons/PromptIcon.d.ts +3 -0
  43. package/dist/ds/icons/ScoreIcon.d.ts +3 -0
  44. package/dist/ds/icons/SettingsIcon.d.ts +3 -0
  45. package/dist/ds/icons/SlashIcon.d.ts +3 -0
  46. package/dist/ds/icons/ToolsIcon.d.ts +3 -0
  47. package/dist/ds/icons/TraceIcon.d.ts +3 -0
  48. package/dist/ds/icons/TsIcon.d.ts +3 -0
  49. package/dist/ds/icons/VariablesIcon.d.ts +3 -0
  50. package/dist/ds/icons/WorkflowIcon.d.ts +3 -0
  51. package/dist/ds/tokens/borders.d.ts +9 -0
  52. package/dist/ds/tokens/colors.d.ts +23 -0
  53. package/dist/ds/tokens/fonts.d.ts +14 -0
  54. package/dist/ds/tokens/index.d.ts +5 -0
  55. package/dist/ds/tokens/sizes.d.ts +10 -0
  56. package/dist/ds/tokens/spacings.d.ts +5 -0
  57. package/dist/hooks/use-workflows.d.ts +9 -2
  58. package/dist/index.d.ts +4 -0
  59. package/dist/index.es.js +202 -16
  60. package/dist/index.es.js.map +1 -1
  61. package/dist/services/mastra-runtime-provider.d.ts +1 -1
  62. package/dist/types.d.ts +12 -0
  63. package/package.json +3 -3
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from '../../../../../node_modules/@types/react';
2
+ import { ModelSettings } from '../../../../types';
3
+
4
+ type AgentContextType = {
5
+ modelSettings: ModelSettings;
6
+ setModelSettings: React.Dispatch<React.SetStateAction<ModelSettings>>;
7
+ resetModelSettings: () => void;
8
+ };
9
+ export declare const AgentContext: import('../../../../../node_modules/@types/react').Context<AgentContextType>;
10
+ export declare function AgentProvider({ children }: {
11
+ children: ReactNode;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -2,3 +2,4 @@ export * from './agent/agent-chat';
2
2
  export * from './agent/agent-evals';
3
3
  export * from './agent/agent-traces';
4
4
  export * from './agents-table';
5
+ export * from './agent/context/agent-context';
@@ -1,7 +1,7 @@
1
- import { WorkflowRunResult } from '@mastra/client-js';
1
+ import { ExtendedWorkflowRunResult } from '../../../hooks/use-workflows';
2
2
 
3
3
  type WorkflowRunContextType = {
4
- result: WorkflowRunResult | null;
4
+ result: ExtendedWorkflowRunResult | null;
5
5
  setResult: React.Dispatch<React.SetStateAction<any>>;
6
6
  payload: any;
7
7
  setPayload: React.Dispatch<React.SetStateAction<any>>;
@@ -0,0 +1,9 @@
1
+ import { default as React } from '../../../../node_modules/@types/react';
2
+
3
+ export interface BadgeProps {
4
+ icon?: React.ReactNode;
5
+ variant?: 'default' | 'success' | 'error' | 'info';
6
+ className?: string;
7
+ children?: React.ReactNode;
8
+ }
9
+ export declare const Badge: ({ icon, variant, className, children, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Badge';
@@ -0,0 +1,16 @@
1
+ import { default as React } from '../../../../node_modules/@types/react';
2
+
3
+ export interface BreadcrumbProps {
4
+ children?: React.ReactNode;
5
+ label?: string;
6
+ }
7
+ export declare const Breadcrumb: ({ children, label }: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element;
8
+ export interface CrumbProps {
9
+ isCurrent?: boolean;
10
+ as: React.ElementType;
11
+ className?: string;
12
+ href: string;
13
+ prefetch?: boolean | null;
14
+ children: React.ReactNode;
15
+ }
16
+ export declare const Crumb: ({ className, as, isCurrent, ...props }: CrumbProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Breadcrumb';
@@ -0,0 +1,10 @@
1
+ import { default as React } from '../../../../node_modules/@types/react';
2
+
3
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ as?: React.ElementType;
5
+ className?: string;
6
+ href?: string;
7
+ prefetch?: boolean | null;
8
+ children: React.ReactNode;
9
+ }
10
+ export declare const Button: ({ className, as, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Button';
@@ -0,0 +1,9 @@
1
+ import { default as React } from '../../../../node_modules/@types/react';
2
+
3
+ export interface HeaderProps {
4
+ children?: React.ReactNode;
5
+ }
6
+ export declare const Header: ({ children }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const HeaderTitle: ({ children }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const HeaderAction: ({ children }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const HeaderGroup: ({ children }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Header';
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../../node_modules/@types/react';
2
+
3
+ export declare const DarkLogo: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './MastraLogo';
@@ -0,0 +1,24 @@
1
+ import { default as React } from '../../../../node_modules/@types/react';
2
+
3
+ export interface CellProps {
4
+ className?: string;
5
+ children: React.ReactNode;
6
+ }
7
+ export declare const Cell: ({ className, children }: CellProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const TxtCell: ({ className, children }: CellProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const UnitCell: ({ className, children, unit }: CellProps & {
10
+ unit: string;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ export interface DateTimeCellProps {
13
+ className?: string;
14
+ dateTime: Date;
15
+ }
16
+ export declare const DateTimeCell: ({ className, dateTime }: DateTimeCellProps) => import("react/jsx-runtime").JSX.Element;
17
+ export interface EntryCellProps {
18
+ className?: string;
19
+ name: React.ReactNode;
20
+ description?: React.ReactNode;
21
+ icon: React.ReactNode;
22
+ meta?: React.ReactNode;
23
+ }
24
+ export declare const EntryCell: ({ className, name, description, icon, meta }: EntryCellProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { default as React } from '../../../../node_modules/@types/react';
2
+
3
+ export interface TableProps {
4
+ className?: string;
5
+ children: React.ReactNode;
6
+ size?: 'default' | 'small';
7
+ }
8
+ export declare const Table: ({ className, children, size }: TableProps) => import("react/jsx-runtime").JSX.Element;
9
+ export interface TheadProps {
10
+ className?: string;
11
+ children: React.ReactNode;
12
+ }
13
+ export declare const Thead: ({ className, children }: TheadProps) => import("react/jsx-runtime").JSX.Element;
14
+ export interface ThProps {
15
+ className?: string;
16
+ children: React.ReactNode;
17
+ }
18
+ export declare const Th: ({ className, children }: ThProps) => import("react/jsx-runtime").JSX.Element;
19
+ export interface TbodyProps {
20
+ className?: string;
21
+ children: React.ReactNode;
22
+ }
23
+ export declare const Tbody: ({ className, children }: TbodyProps) => import("react/jsx-runtime").JSX.Element;
24
+ export interface RowProps {
25
+ className?: string;
26
+ children: React.ReactNode;
27
+ selected?: boolean;
28
+ }
29
+ export declare const Row: ({ className, children, selected }: RowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './Table';
2
+ export * from './Cells';
@@ -0,0 +1,4 @@
1
+ export declare const formatDateCell: (date: Date) => {
2
+ day: string;
3
+ time: string;
4
+ };
@@ -0,0 +1,9 @@
1
+ import { default as React } from '../../../../node_modules/@types/react';
2
+ import { FontSizes } from '../../tokens';
3
+
4
+ export interface TxtProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
6
+ variant?: keyof typeof FontSizes;
7
+ font?: 'mono';
8
+ }
9
+ export declare const Txt: ({ as: Root, className, variant, font, ...props }: TxtProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Txt';
@@ -0,0 +1,4 @@
1
+ export type PolymorphicRef<C extends React.ElementType> = React.ComponentPropsWithRef<C>['ref'];
2
+ export type PolymorphicComponentProps<C extends React.ElementType, Props = {}> = Props & Omit<React.ComponentPropsWithoutRef<C>, keyof Props> & {
3
+ ref?: PolymorphicRef<C>;
4
+ };
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const AgentIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const AiIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const ApiIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const BranchIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const CheckIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const CommitIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const CrossIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const DbIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const DebugIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const DeploymentIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const DividerIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const DocsIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const EnvIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const FiltersIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const HomeIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export interface IconProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ children: React.ReactNode;
5
+ size?: 'default' | 'lg';
6
+ }
7
+ export declare const Icon: ({ children, className, size, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const InfoIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const JudgeIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const LogsIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const MemoryIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const OpenAIIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const PromptIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const ScoreIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const SettingsIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const SlashIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const ToolsIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const TraceIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const TsIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const VariablesIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { default as React } from '../../../node_modules/@types/react';
2
+
3
+ export declare const WorkflowIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export declare const BorderWidth: {
2
+ sm: string;
3
+ };
4
+ export declare const BorderRadius: {
5
+ none: string;
6
+ sm: string;
7
+ md: string;
8
+ lg: string;
9
+ };
@@ -0,0 +1,23 @@
1
+ export declare const Colors: {
2
+ surface1: string;
3
+ surface2: string;
4
+ surface3: string;
5
+ surface4: string;
6
+ surface5: string;
7
+ accent1: string;
8
+ accent2: string;
9
+ accent3: string;
10
+ accent4: string;
11
+ };
12
+ export declare const BorderColors: {
13
+ border1: string;
14
+ border2: string;
15
+ };
16
+ export declare const IconColors: {
17
+ icon1: string;
18
+ icon2: string;
19
+ icon3: string;
20
+ icon4: string;
21
+ icon5: string;
22
+ icon6: string;
23
+ };
@@ -0,0 +1,14 @@
1
+ export declare const FontSizes: {
2
+ 'header-md': string;
3
+ 'ui-lg': string;
4
+ 'ui-md': string;
5
+ 'ui-sm': string;
6
+ 'ui-xs': string;
7
+ };
8
+ export declare const LineHeights: {
9
+ 'header-md': string;
10
+ 'ui-lg': string;
11
+ 'ui-md': string;
12
+ 'ui-sm': string;
13
+ 'ui-xs': string;
14
+ };
@@ -0,0 +1,5 @@
1
+ export * from './borders';
2
+ export * from './colors';
3
+ export * from './fonts';
4
+ export * from './sizes';
5
+ export * from './spacings';
@@ -0,0 +1,10 @@
1
+ export declare const Sizes: {
2
+ 'icon-default': string;
3
+ 'icon-lg': string;
4
+ 'button-default': string;
5
+ 'header-default': string;
6
+ 'table-header': string;
7
+ 'table-row': string;
8
+ 'table-row-small': string;
9
+ 'badge-default': string;
10
+ };
@@ -0,0 +1,5 @@
1
+ export declare const Spacings: {
2
+ sm: string;
3
+ md: string;
4
+ lg: string;
5
+ };
@@ -1,6 +1,13 @@
1
1
  import { Workflow } from '@mastra/core/workflows';
2
- import { WorkflowRunResult } from '@mastra/client-js';
2
+ import { WorkflowRunResult as BaseWorkflowRunResult } from '@mastra/client-js';
3
3
 
4
+ export type ExtendedWorkflowRunResult = BaseWorkflowRunResult & {
5
+ sanitizedOutput?: string | null;
6
+ sanitizedError?: {
7
+ message: string;
8
+ stack?: string;
9
+ } | null;
10
+ };
4
11
  export declare const useWorkflow: (workflowId: string, baseUrl: string) => {
5
12
  workflow: Workflow<import('@mastra/core').Step<string, any, any, import('@mastra/core').StepExecutionContext<any, import('@mastra/core').WorkflowContext<any, import('@mastra/core').Step<string, any, any, any>[], Record<string, any>>>>[], string, any, any> | null;
6
13
  isLoading: boolean;
@@ -25,7 +32,7 @@ export declare const useWatchWorkflow: (baseUrl: string) => {
25
32
  runId: string;
26
33
  }) => Promise<void>;
27
34
  isWatchingWorkflow: boolean;
28
- watchResult: WorkflowRunResult | null;
35
+ watchResult: ExtendedWorkflowRunResult | null;
29
36
  };
30
37
  export declare const useResumeWorkflow: (baseUrl: string) => {
31
38
  resumeWorkflow: ({ workflowId, stepId, runId, context, }: {
package/dist/index.d.ts CHANGED
@@ -4,3 +4,7 @@ export * from './domains/networks/index';
4
4
  export * from './domains/workflows/index';
5
5
  export * from './domains/resizable-panel';
6
6
  export * from './components/dynamic-form/index';
7
+ export * from './types';
8
+ export * from './ds/components/Badge/index';
9
+ export * from './ds/components/Logo/index';
10
+ export * from './ds/components/Txt/index';