@mastra/playground-ui 6.0.0 → 6.1.0-alpha.0
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 +24 -0
- package/dist/index.cjs.js +10286 -8930
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10151 -8811
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/assistant-ui/attachments/attach-file-dialog.d.ts +5 -0
- package/dist/src/components/assistant-ui/attachments/attachment-preview-dialog.d.ts +2 -1
- package/dist/src/components/assistant-ui/context/agent-provider.d.ts +12 -0
- package/dist/src/components/assistant-ui/hooks/use-composer-add-attachment.d.ts +9 -0
- package/dist/src/components/assistant-ui/tools/badges/tool-badge.d.ts +6 -0
- package/dist/src/components/assistant-ui/tools/badges/workflow-badge.d.ts +11 -0
- package/dist/src/components/ui/elements/steps/index.d.ts +4 -0
- package/dist/src/components/ui/elements/steps/process-step-list-item.d.ts +9 -0
- package/dist/src/components/ui/elements/steps/process-step-list.d.ts +8 -0
- package/dist/src/components/ui/elements/steps/process-step-progress-bar.d.ts +4 -0
- package/dist/src/components/ui/elements/steps/shared.d.ts +8 -0
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata.d.ts +5 -3
- package/dist/src/domains/templates/index.d.ts +7 -0
- package/dist/src/domains/templates/shared.d.ts +7 -0
- package/dist/src/domains/templates/template-failure.d.ts +6 -0
- package/dist/src/domains/templates/template-form.d.ts +25 -0
- package/dist/src/domains/templates/template-info.d.ts +12 -0
- package/dist/src/domains/templates/template-installation.d.ts +8 -0
- package/dist/src/domains/templates/template-success.d.ts +9 -0
- package/dist/src/domains/templates/templates-list.d.ts +22 -0
- package/dist/src/domains/templates/templates-tools.d.ts +21 -0
- package/dist/src/domains/workflows/context/use-current-run.d.ts +0 -1
- package/dist/src/domains/workflows/workflow/workflow-condition-node.d.ts +1 -0
- package/dist/src/hooks/use-workflow-runs.d.ts +3 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/lib/file/constants.d.ts +1 -0
- package/dist/src/lib/file/contentTypeFromUrl.d.ts +1 -0
- package/package.json +3 -3
- /package/dist/src/lib/{file.d.ts → file/toBase64.d.ts} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
interface PdfEntryProps {
|
|
2
2
|
data: string;
|
|
3
|
+
url?: string;
|
|
3
4
|
}
|
|
4
|
-
export declare const PdfEntry: ({ data }: PdfEntryProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const PdfEntry: ({ data, url }: PdfEntryProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
interface PdfPreviewDialogProps {
|
|
6
7
|
data: string;
|
|
7
8
|
open: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GetAgentResponse } from '@mastra/client-js';
|
|
2
|
+
type AgentContextType = {
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
agentDetails: GetAgentResponse | null;
|
|
5
|
+
};
|
|
6
|
+
export interface AgentProviderProps {
|
|
7
|
+
agentId?: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function AgentProvider({ agentId, children }: AgentProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useAgent(): AgentContextType;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overrides https://github.com/assistant-ui/assistant-ui/blob/4832e53c1531ba931539caf38ca9bb123a5df032/packages/react/src/primitives/composer/ComposerAddAttachment.tsx
|
|
3
|
+
* to have a handler on the onChange event
|
|
4
|
+
*/
|
|
5
|
+
export declare const useComposerAddAttachment: ({ multiple, onChange, }?: {
|
|
6
|
+
/** allow selecting multiple files */
|
|
7
|
+
multiple?: boolean | undefined;
|
|
8
|
+
onChange?: (files: File[]) => void;
|
|
9
|
+
}) => (() => void) | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GetWorkflowResponse } from '@mastra/client-js';
|
|
2
|
+
import { WorkflowResult } from '@mastra/core';
|
|
3
|
+
export interface WorkflowBadgeProps {
|
|
4
|
+
workflow: GetWorkflowResponse;
|
|
5
|
+
workflowId: string;
|
|
6
|
+
result?: {
|
|
7
|
+
result: WorkflowResult<any, any>;
|
|
8
|
+
runId: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare const WorkflowBadge: ({ workflow, result, workflowId }: WorkflowBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ProcessStep } from './shared';
|
|
2
|
+
type ProcessStepListItemProps = {
|
|
3
|
+
stepId: string;
|
|
4
|
+
step: ProcessStep;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
position: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function ProcessStepListItem({ stepId, step, isActive, position }: ProcessStepListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProcessStep } from './shared';
|
|
2
|
+
type ProcessStepListProps = {
|
|
3
|
+
currentStep: ProcessStep | null;
|
|
4
|
+
steps: ProcessStep[];
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function ProcessStepList({ currentStep, steps, className }: ProcessStepListProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -6,7 +6,7 @@ export interface AgentMetadataProps {
|
|
|
6
6
|
promptSlot: ReactNode;
|
|
7
7
|
hasMemoryEnabled: boolean;
|
|
8
8
|
computeToolLink: (tool: GetToolResponse) => string;
|
|
9
|
-
computeWorkflowLink: (workflow: GetWorkflowResponse) => string;
|
|
9
|
+
computeWorkflowLink: (workflowId: string, workflow: GetWorkflowResponse) => string;
|
|
10
10
|
modelProviders: string[];
|
|
11
11
|
updateModel: AgentMetadataModelSwitcherProps['updateModel'];
|
|
12
12
|
}
|
|
@@ -20,7 +20,9 @@ export declare const AgentMetadataScorerList: ({ entityId }: {
|
|
|
20
20
|
entityId: string;
|
|
21
21
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export interface AgentMetadataWorkflowListProps {
|
|
23
|
-
workflows:
|
|
24
|
-
|
|
23
|
+
workflows: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
} & GetWorkflowResponse>;
|
|
26
|
+
computeWorkflowLink: (workflowId: string, workflow: GetWorkflowResponse) => string;
|
|
25
27
|
}
|
|
26
28
|
export declare const AgentMetadataWorkflowList: ({ workflows, computeWorkflowLink }: AgentMetadataWorkflowListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function getRepoName(githubUrl: string): string | undefined;
|
|
2
|
+
type ContainerProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function Container({ children, className }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type TemplateFormProps = {
|
|
2
|
+
providerOptions: {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}[];
|
|
6
|
+
selectedProvider: string;
|
|
7
|
+
onProviderChange: (value: string) => void;
|
|
8
|
+
variables: Record<string, string>;
|
|
9
|
+
setVariables: (variables: Record<string, string>) => void;
|
|
10
|
+
errors: string[];
|
|
11
|
+
setErrors: (errors: string[]) => void;
|
|
12
|
+
handleInstallTemplate: () => void;
|
|
13
|
+
handleVariableChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
isLoadingEnvVars?: boolean;
|
|
15
|
+
defaultModelProvider?: string;
|
|
16
|
+
defaultModelId?: string;
|
|
17
|
+
onModelUpdate?: (params: {
|
|
18
|
+
provider: string;
|
|
19
|
+
modelId: string;
|
|
20
|
+
}) => Promise<{
|
|
21
|
+
message: string;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
export declare function TemplateForm({ providerOptions, selectedProvider, onProviderChange, variables, errors, handleInstallTemplate, handleVariableChange, isLoadingEnvVars, defaultModelProvider, defaultModelId, onModelUpdate, }: TemplateFormProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { KeyValueListItemData } from '../../components/ui/elements';
|
|
2
|
+
type TemplateInfoProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
imageURL?: string;
|
|
6
|
+
githubUrl?: string;
|
|
7
|
+
infoData?: KeyValueListItemData[];
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
templateSlug?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function TemplateInfo({ title, description, imageURL, githubUrl, isLoading, infoData, templateSlug, }: TemplateInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type TemplateInstallationProps = {
|
|
2
|
+
name: string;
|
|
3
|
+
streamResult?: any;
|
|
4
|
+
runId?: string;
|
|
5
|
+
workflowInfo?: any;
|
|
6
|
+
};
|
|
7
|
+
export declare function TemplateInstallation({ name, streamResult, runId, workflowInfo }: TemplateInstallationProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { KeyValueListItemData } from '../../components/ui/elements';
|
|
2
|
+
type TemplateSuccessProps = {
|
|
3
|
+
name: string;
|
|
4
|
+
entities?: string[];
|
|
5
|
+
installedEntities?: KeyValueListItemData[];
|
|
6
|
+
linkComponent: any;
|
|
7
|
+
};
|
|
8
|
+
export declare function TemplateSuccess({ name, installedEntities, linkComponent }: TemplateSuccessProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type Template = {
|
|
2
|
+
slug: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
imageURL?: string;
|
|
6
|
+
githubUrl: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
agents?: string[];
|
|
9
|
+
tools?: string[];
|
|
10
|
+
networks?: string[];
|
|
11
|
+
workflows?: string[];
|
|
12
|
+
mcp?: string[];
|
|
13
|
+
supportedProviders: string[];
|
|
14
|
+
};
|
|
15
|
+
type TemplatesListProps = {
|
|
16
|
+
templates: Template[];
|
|
17
|
+
linkComponent?: React.ElementType;
|
|
18
|
+
className?: string;
|
|
19
|
+
isLoading?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare function TemplatesList({ templates, linkComponent, className, isLoading }: TemplatesListProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type TemplatesToolsProps = {
|
|
2
|
+
selectedTag: string;
|
|
3
|
+
onTagChange: (value: string) => void;
|
|
4
|
+
tagOptions: {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
selectedProvider: string;
|
|
9
|
+
providerOptions: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
onProviderChange: (value: string) => void;
|
|
14
|
+
searchTerm?: string;
|
|
15
|
+
onSearchChange?: (value: string) => void;
|
|
16
|
+
onReset?: () => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function TemplatesTools({ tagOptions, selectedTag, providerOptions, selectedProvider, onTagChange, onProviderChange, searchTerm, onSearchChange, onReset, className, isLoading, }: TemplatesToolsProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './domains/networks/index';
|
|
|
4
4
|
export * from './domains/scores/index';
|
|
5
5
|
export * from './domains/tools/index';
|
|
6
6
|
export * from './domains/workflows/index';
|
|
7
|
+
export * from './domains/templates/index';
|
|
7
8
|
export * from './domains/traces/index';
|
|
8
9
|
export * from './domains/resizable-panel';
|
|
9
10
|
export * from './components/dynamic-form/index';
|
|
@@ -12,6 +13,7 @@ export * from './components/ui/containers';
|
|
|
12
13
|
export * from './components/threads';
|
|
13
14
|
export * from './components/ui/entity-header';
|
|
14
15
|
export * from './components/ui/playground-tabs';
|
|
16
|
+
export * from './components/ui/elements';
|
|
15
17
|
export * from './types';
|
|
16
18
|
export * from './ds/components/Badge/index';
|
|
17
19
|
export * from './ds/components/Button/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EXTENSION_TO_MIME: Record<string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getFileContentType: (url: string) => Promise<string | undefined>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.0.0",
|
|
4
|
+
"version": "6.1.0-alpha.0",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"use-debounce": "^10.0.5",
|
|
100
100
|
"zod": "^4.1.5",
|
|
101
101
|
"zustand": "^5.0.7",
|
|
102
|
-
"@mastra/client-js": "^0.
|
|
102
|
+
"@mastra/client-js": "^0.12.0-alpha.0"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
105
|
"@mastra/core": ">=0.15.3-0 <0.16.0-0",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"vite": "^6.3.5",
|
|
128
128
|
"vite-plugin-dts": "^4.5.4",
|
|
129
129
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
130
|
-
"@mastra/core": "0.
|
|
130
|
+
"@mastra/core": "0.16.0-alpha.0"
|
|
131
131
|
},
|
|
132
132
|
"homepage": "https://mastra.ai",
|
|
133
133
|
"repository": {
|
|
File without changes
|