@mastra/playground-ui 5.1.7-alpha.0 → 5.1.7-alpha.2
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/colors-CBG_Mm7P.js.map +1 -1
- package/dist/colors-Du4i-E0i.cjs.map +1 -1
- package/dist/index.cjs.js +2169 -1511
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2170 -1513
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/assistant-ui/network-threads.d.ts +12 -0
- package/dist/src/domains/networks/index.d.ts +1 -0
- package/dist/src/domains/networks/v-next/network-chat.d.ts +10 -0
- package/dist/src/domains/networks/v-next/step-dropdown.d.ts +1 -0
- package/dist/src/domains/networks/v-next/wrapped-assistant-message.d.ts +6 -0
- package/dist/src/domains/workflows/workflow/workflow-graph-inner.d.ts +1 -1
- package/dist/src/domains/workflows/workflow/workflow-graph.d.ts +1 -1
- package/dist/src/hooks/use-workflow-runs.d.ts +4 -0
- package/dist/src/hooks/use-workflows.d.ts +5 -1
- package/dist/src/lib/formatting.d.ts +1 -0
- package/dist/src/services/vnext-message-provider.d.ts +11 -0
- package/dist/src/services/vnext-network-chat-provider.d.ts +19 -0
- package/dist/src/services/vnext-network-runtime-provider.d.ts +10 -0
- package/dist/src/types.d.ts +4 -0
- package/dist/tokens.cjs.js.map +1 -1
- package/dist/tokens.es.js.map +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ToolCallContentPartComponent } from '@assistant-ui/react';
|
|
2
|
+
|
|
3
|
+
export interface ThreadProps {
|
|
4
|
+
ToolFallback?: ToolCallContentPartComponent;
|
|
5
|
+
networkName?: string;
|
|
6
|
+
hasMemory?: boolean;
|
|
7
|
+
showFileSupport?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const NetworkThread: ({ ToolFallback, networkName, hasMemory, showFileSupport }: ThreadProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export interface ThreadWelcomeProps {
|
|
11
|
+
networkName?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Message } from '../../../types';
|
|
2
|
+
|
|
3
|
+
export declare const VNextNetworkChat: ({ networkId, networkName, threadId, initialMessages, memory, refreshThreadList, }: {
|
|
4
|
+
networkId: string;
|
|
5
|
+
networkName: string;
|
|
6
|
+
threadId: string;
|
|
7
|
+
initialMessages?: Message[];
|
|
8
|
+
memory?: boolean;
|
|
9
|
+
refreshThreadList?: () => void;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StepDropdown: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LegacyWorkflowRunResult, WorkflowWatchResult } from '@mastra/client-js';
|
|
1
|
+
import { LegacyWorkflowRunResult, WorkflowWatchResult, GetWorkflowResponse } from '@mastra/client-js';
|
|
2
2
|
import { LegacyWorkflow } from '@mastra/core/workflows/legacy';
|
|
3
3
|
|
|
4
4
|
export type ExtendedLegacyWorkflowRunResult = LegacyWorkflowRunResult & {
|
|
@@ -15,6 +15,10 @@ export type ExtendedWorkflowWatchResult = WorkflowWatchResult & {
|
|
|
15
15
|
stack?: string;
|
|
16
16
|
} | null;
|
|
17
17
|
};
|
|
18
|
+
export declare const useWorkflow: (workflowId: string) => {
|
|
19
|
+
workflow: GetWorkflowResponse | null;
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
};
|
|
18
22
|
export declare const useLegacyWorkflow: (workflowId: string) => {
|
|
19
23
|
legacyWorkflow: LegacyWorkflow<import('@mastra/core/workflows/legacy').LegacyStep<string, any, any, import('@mastra/core/workflows/legacy').StepExecutionContext<any, import('@mastra/core/workflows/legacy').WorkflowContext<any, import('@mastra/core/workflows/legacy').LegacyStep<string, any, any, any>[], Record<string, any>>>>[], string, any, any> | null;
|
|
20
24
|
isLoading: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatJSON: (code: string) => Promise<string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, ReactNode } from '../../node_modules/@types/react';
|
|
2
|
+
import { ThreadMessageLike } from '@assistant-ui/react';
|
|
3
|
+
|
|
4
|
+
export declare const MessagesProvider: ({ children }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const useMessages: () => {
|
|
8
|
+
messages: ThreadMessageLike[];
|
|
9
|
+
setMessages: React.Dispatch<React.SetStateAction<ThreadMessageLike[]>>;
|
|
10
|
+
appendToLastMessage: (partial: string) => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React, ReactNode } from '../../node_modules/@types/react';
|
|
2
|
+
|
|
3
|
+
type StateValue = {
|
|
4
|
+
executionSteps: Array<string>;
|
|
5
|
+
steps: Record<string, any>;
|
|
6
|
+
runId?: string;
|
|
7
|
+
};
|
|
8
|
+
type State = Record<string, StateValue>;
|
|
9
|
+
type VNextNetworkChatContextType = {
|
|
10
|
+
state: State;
|
|
11
|
+
handleStep: (uuid: string, record: Record<string, any>) => void;
|
|
12
|
+
setState: React.Dispatch<React.SetStateAction<State>>;
|
|
13
|
+
};
|
|
14
|
+
export declare const VNextNetworkChatProvider: ({ children, networkId }: {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
networkId: string;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const useVNextNetworkChat: () => VNextNetworkChatContextType;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from '../../node_modules/@types/react';
|
|
2
|
+
import { ChatProps } from '../types';
|
|
3
|
+
|
|
4
|
+
type VNextMastraNetworkRuntimeProviderProps = Omit<ChatProps, 'agentId' | 'agentName' | 'modelSettings'> & {
|
|
5
|
+
networkId: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function VNextMastraNetworkRuntimeProvider({ children, networkId, memory, threadId, refreshThreadList, initialMessages, }: Readonly<{
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}> & VNextMastraNetworkRuntimeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
package/dist/src/types.d.ts
CHANGED
package/dist/tokens.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.cjs.js","sources":["../src/ds/tokens/borders.ts","../src/ds/tokens/fonts.ts","../src/ds/tokens/sizes.ts","../src/ds/tokens/spacings.ts"],"sourcesContent":["export const BorderWidth = {\n sm: '0.5px',\n};\n\nexport const BorderRadius = {\n none: '0px',\n sm: '2px',\n md: '4px',\n lg: '6px',\n};\n","export const FontSizes = {\n 'header-md': '1rem', // 16px\n 'ui-lg': '0.813rem', // 13px\n 'ui-md': '0.75rem', // 12px\n 'ui-sm': '0.688rem', // 11px\n 'ui-xs': '0.625rem', // 10px\n};\n\nexport const LineHeights = {\n 'header-md': '125%',\n 'ui-lg': '153.846%',\n 'ui-md': '166.667%',\n 'ui-sm': '181.818%',\n 'ui-xs': '200%',\n};\n","export const Sizes = {\n 'icon-default': '16px',\n 'icon-lg': '20px',\n 'icon-sm': '12px',\n 'button-md': '24px',\n 'button-lg': '40px',\n 'header-default': '40px',\n 'table-header': '28px',\n 'table-row': '44px',\n 'table-row-small': '32px',\n 'badge-default': '20px',\n 'avatar-default': '24px',\n};\n","export const Spacings = {\n sm: '2px',\n md: '4px',\n lg: '8px',\n};\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"tokens.cjs.js","sources":["../src/ds/tokens/borders.ts","../src/ds/tokens/fonts.ts","../src/ds/tokens/sizes.ts","../src/ds/tokens/spacings.ts"],"sourcesContent":["export const BorderWidth = {\n sm: '0.5px',\n};\n\nexport const BorderRadius = {\n none: '0px',\n sm: '2px',\n md: '4px',\n lg: '6px',\n};\n","export const FontSizes = {\n 'header-md': '1rem', // 16px\n 'ui-lg': '0.813rem', // 13px\n 'ui-md': '0.75rem', // 12px\n 'ui-sm': '0.688rem', // 11px\n 'ui-xs': '0.625rem', // 10px\n};\n\nexport const LineHeights = {\n 'header-md': '125%',\n 'ui-lg': '153.846%',\n 'ui-md': '166.667%',\n 'ui-sm': '181.818%',\n 'ui-xs': '200%',\n};\n","export const Sizes = {\n 'icon-default': '16px',\n 'icon-lg': '20px',\n 'icon-sm': '12px',\n 'button-md': '24px',\n 'button-lg': '40px',\n 'header-default': '40px',\n 'table-header': '28px',\n 'table-row': '44px',\n 'table-row-small': '32px',\n 'badge-default': '20px',\n 'avatar-default': '24px',\n};\n","export const Spacings = {\n sm: '2px',\n md: '4px',\n lg: '8px',\n};\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,WAAA,GAAc;AAAA,EACzB,EAAA,EAAI;AACN;AAEO,MAAM,YAAA,GAAe;AAAA,EAC1B,IAAA,EAAM,KAAA;AAAA,EACN,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI;AACN;;ACTO,MAAM,SAAA,GAAY;AAAA,EACvB,WAAA,EAAa,MAAA;AAAA;AAAA,EACb,OAAA,EAAS,UAAA;AAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA;AAAA,EACT,OAAA,EAAS,UAAA;AAAA;AAAA,EACT,OAAA,EAAS;AAAA;AACX;AAEO,MAAM,WAAA,GAAc;AAAA,EACzB,WAAA,EAAa,MAAA;AAAA,EACb,OAAA,EAAS,UAAA;AAAA,EACT,OAAA,EAAS,UAAA;AAAA,EACT,OAAA,EAAS,UAAA;AAAA,EACT,OAAA,EAAS;AACX;;ACdO,MAAM,KAAA,GAAQ;AAAA,EACnB,cAAA,EAAgB,MAAA;AAAA,EAChB,SAAA,EAAW,MAAA;AAAA,EACX,SAAA,EAAW,MAAA;AAAA,EACX,WAAA,EAAa,MAAA;AAAA,EACb,WAAA,EAAa,MAAA;AAAA,EACb,gBAAA,EAAkB,MAAA;AAAA,EAClB,cAAA,EAAgB,MAAA;AAAA,EAChB,WAAA,EAAa,MAAA;AAAA,EACb,iBAAA,EAAmB,MAAA;AAAA,EACnB,eAAA,EAAiB,MAAA;AAAA,EACjB,gBAAA,EAAkB;AACpB;;ACZO,MAAM,QAAA,GAAW;AAAA,EACtB,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI;AACN;;;;;;;;;;;;"}
|
package/dist/tokens.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.es.js","sources":["../src/ds/tokens/borders.ts","../src/ds/tokens/fonts.ts","../src/ds/tokens/sizes.ts","../src/ds/tokens/spacings.ts"],"sourcesContent":["export const BorderWidth = {\n sm: '0.5px',\n};\n\nexport const BorderRadius = {\n none: '0px',\n sm: '2px',\n md: '4px',\n lg: '6px',\n};\n","export const FontSizes = {\n 'header-md': '1rem', // 16px\n 'ui-lg': '0.813rem', // 13px\n 'ui-md': '0.75rem', // 12px\n 'ui-sm': '0.688rem', // 11px\n 'ui-xs': '0.625rem', // 10px\n};\n\nexport const LineHeights = {\n 'header-md': '125%',\n 'ui-lg': '153.846%',\n 'ui-md': '166.667%',\n 'ui-sm': '181.818%',\n 'ui-xs': '200%',\n};\n","export const Sizes = {\n 'icon-default': '16px',\n 'icon-lg': '20px',\n 'icon-sm': '12px',\n 'button-md': '24px',\n 'button-lg': '40px',\n 'header-default': '40px',\n 'table-header': '28px',\n 'table-row': '44px',\n 'table-row-small': '32px',\n 'badge-default': '20px',\n 'avatar-default': '24px',\n};\n","export const Spacings = {\n sm: '2px',\n md: '4px',\n lg: '8px',\n};\n"],"names":[],"mappings":";;AAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"tokens.es.js","sources":["../src/ds/tokens/borders.ts","../src/ds/tokens/fonts.ts","../src/ds/tokens/sizes.ts","../src/ds/tokens/spacings.ts"],"sourcesContent":["export const BorderWidth = {\n sm: '0.5px',\n};\n\nexport const BorderRadius = {\n none: '0px',\n sm: '2px',\n md: '4px',\n lg: '6px',\n};\n","export const FontSizes = {\n 'header-md': '1rem', // 16px\n 'ui-lg': '0.813rem', // 13px\n 'ui-md': '0.75rem', // 12px\n 'ui-sm': '0.688rem', // 11px\n 'ui-xs': '0.625rem', // 10px\n};\n\nexport const LineHeights = {\n 'header-md': '125%',\n 'ui-lg': '153.846%',\n 'ui-md': '166.667%',\n 'ui-sm': '181.818%',\n 'ui-xs': '200%',\n};\n","export const Sizes = {\n 'icon-default': '16px',\n 'icon-lg': '20px',\n 'icon-sm': '12px',\n 'button-md': '24px',\n 'button-lg': '40px',\n 'header-default': '40px',\n 'table-header': '28px',\n 'table-row': '44px',\n 'table-row-small': '32px',\n 'badge-default': '20px',\n 'avatar-default': '24px',\n};\n","export const Spacings = {\n sm: '2px',\n md: '4px',\n lg: '8px',\n};\n"],"names":[],"mappings":";;AAAO,MAAM,WAAA,GAAc;AAAA,EACzB,EAAA,EAAI;AACN;AAEO,MAAM,YAAA,GAAe;AAAA,EAC1B,IAAA,EAAM,KAAA;AAAA,EACN,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI;AACN;;ACTO,MAAM,SAAA,GAAY;AAAA,EACvB,WAAA,EAAa,MAAA;AAAA;AAAA,EACb,OAAA,EAAS,UAAA;AAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA;AAAA,EACT,OAAA,EAAS,UAAA;AAAA;AAAA,EACT,OAAA,EAAS;AAAA;AACX;AAEO,MAAM,WAAA,GAAc;AAAA,EACzB,WAAA,EAAa,MAAA;AAAA,EACb,OAAA,EAAS,UAAA;AAAA,EACT,OAAA,EAAS,UAAA;AAAA,EACT,OAAA,EAAS,UAAA;AAAA,EACT,OAAA,EAAS;AACX;;ACdO,MAAM,KAAA,GAAQ;AAAA,EACnB,cAAA,EAAgB,MAAA;AAAA,EAChB,SAAA,EAAW,MAAA;AAAA,EACX,SAAA,EAAW,MAAA;AAAA,EACX,WAAA,EAAa,MAAA;AAAA,EACb,WAAA,EAAa,MAAA;AAAA,EACb,gBAAA,EAAkB,MAAA;AAAA,EAClB,cAAA,EAAgB,MAAA;AAAA,EAChB,WAAA,EAAa,MAAA;AAAA,EACb,iBAAA,EAAmB,MAAA;AAAA,EACnB,eAAA,EAAiB,MAAA;AAAA,EACjB,gBAAA,EAAkB;AACpB;;ACZO,MAAM,QAAA,GAAW;AAAA,EACtB,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI;AACN;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.1.7-alpha.
|
|
4
|
+
"version": "5.1.7-alpha.2",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"@xyflow/react": "^12.6.4",
|
|
70
70
|
"cmdk": "^1.1.1",
|
|
71
71
|
"date-fns": "^4.1.0",
|
|
72
|
+
"prettier": "^3.5.3",
|
|
72
73
|
"json-schema-to-zod": "^2.6.1",
|
|
73
74
|
"motion": "^12.16.0",
|
|
74
75
|
"prism-react-renderer": "^2.4.1",
|
|
@@ -82,7 +83,6 @@
|
|
|
82
83
|
"remark-gfm": "^4.0.1",
|
|
83
84
|
"remark-parse": "^11.0.0",
|
|
84
85
|
"remark-rehype": "^11.1.2",
|
|
85
|
-
"remeda": "^2.23.0",
|
|
86
86
|
"shiki": "^1.29.2",
|
|
87
87
|
"sonner": "^2.0.5",
|
|
88
88
|
"superjson": "^2.2.2",
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"tailwindcss-animate": "^1.0.7",
|
|
91
91
|
"unified": "^11.0.5",
|
|
92
92
|
"use-debounce": "^10.0.5",
|
|
93
|
-
"zod": "^3.25.
|
|
93
|
+
"zod": "^3.25.67",
|
|
94
94
|
"zustand": "^5.0.5",
|
|
95
|
-
"@mastra/client-js": "^0.10.6-alpha.
|
|
95
|
+
"@mastra/client-js": "^0.10.6-alpha.2"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@mastra/core": "^0.10.0-alpha.0",
|
|
@@ -103,21 +103,21 @@
|
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@types/node": "^20.19.0",
|
|
106
|
-
"@types/react": "^19.1.
|
|
106
|
+
"@types/react": "^19.1.8",
|
|
107
107
|
"@types/react-dom": "^19.1.6",
|
|
108
108
|
"@vitejs/plugin-react": "^4.5.2",
|
|
109
109
|
"autoprefixer": "^10.4.21",
|
|
110
110
|
"class-variance-authority": "^0.7.1",
|
|
111
111
|
"clsx": "^2.1.1",
|
|
112
|
-
"postcss": "^8.5.
|
|
113
|
-
"rollup-plugin-node-externals": "^8.0.
|
|
112
|
+
"postcss": "^8.5.6",
|
|
113
|
+
"rollup-plugin-node-externals": "^8.0.1",
|
|
114
114
|
"tailwind-merge": "^3.3.1",
|
|
115
115
|
"tailwindcss": "^3.4.17",
|
|
116
116
|
"typescript": "^5.8.3",
|
|
117
117
|
"vite": "^6.3.5",
|
|
118
118
|
"vite-plugin-dts": "^3.9.1",
|
|
119
119
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
120
|
-
"@mastra/core": "0.10.7-alpha.
|
|
120
|
+
"@mastra/core": "0.10.7-alpha.2"
|
|
121
121
|
},
|
|
122
122
|
"scripts": {
|
|
123
123
|
"dev": "vite",
|