@mastra/playground-ui 2.0.1-alpha.0 → 2.0.1-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/components/ui/data-table.d.ts +5 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/text.d.ts +1 -1
- package/dist/domains/resizable-panel.d.ts +12 -0
- package/dist/domains/workflows/context/workflow-run-context.d.ts +3 -1
- package/dist/domains/workflows/workflow/utils.d.ts +5 -4
- package/dist/domains/workflows/workflow/workflow-after-node.d.ts +6 -0
- package/dist/domains/workflows/workflow/workflow-loop-result-node.d.ts +6 -0
- package/dist/hooks/use-resize-column.d.ts +2 -1
- package/dist/hooks/use-traces.d.ts +1 -1
- package/dist/hooks/use-workflows.d.ts +10 -3
- package/dist/index.css +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +521 -1199
- package/dist/index.es.js.map +1 -1
- package/dist/lib/polls.d.ts +5 -1
- package/package.json +3 -3
- package/dist/chat-ui/chat-items.d.ts +0 -52
- package/dist/chat-ui/chat-message.d.ts +0 -30
- package/dist/chat-ui/chat.d.ts +0 -3
- package/dist/chat-ui/copy-button.d.ts +0 -7
- package/dist/chat-ui/file-preview.d.ts +0 -8
- package/dist/chat-ui/hooks/use-auto-scroll.d.ts +0 -7
- package/dist/chat-ui/hooks/use-autosize-textarea.d.ts +0 -8
- package/dist/chat-ui/hooks/use-copy-to-clipboard.d.ts +0 -10
- package/dist/chat-ui/markdown-renderer.d.ts +0 -88
- package/dist/chat-ui/markdown.d.ts +0 -4
- package/dist/chat-ui/message-input.d.ts +0 -22
- package/dist/chat-ui/message-list.d.ts +0 -11
- package/dist/chat-ui/prompt-suggestions.d.ts +0 -11
- package/dist/chat-ui/syntax-highlighter.d.ts +0 -1
- package/dist/chat-ui/types.d.ts +0 -14
- package/dist/chat-ui/typing-indicator.d.ts +0 -1
|
@@ -67,6 +67,10 @@ interface DataTableProps<TData, TValue> {
|
|
|
67
67
|
* loading state
|
|
68
68
|
*/
|
|
69
69
|
isLoading?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* text to display when there are no results
|
|
72
|
+
*/
|
|
73
|
+
emptyText?: string;
|
|
70
74
|
}
|
|
71
|
-
export declare const DataTable: <TData, TValue>({ title, icon, withoutBorder, columns, data, className, pagination, gotoNextPage, gotoPreviousPage, maxHeight, withoutRadius, disabledFlex, emptyStateHeight, getRowId, selectedRowId, isLoading, }: DataTableProps<TData, TValue>) => import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export declare const DataTable: <TData, TValue>({ title, icon, withoutBorder, columns, data, className, pagination, gotoNextPage, gotoPreviousPage, maxHeight, withoutRadius, disabledFlex, emptyStateHeight, getRowId, selectedRowId, isLoading, emptyText, }: DataTableProps<TData, TValue>) => import("react/jsx-runtime").JSX.Element;
|
|
72
76
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
2
2
|
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare const ResizablePanel: import('../../../node_modules/@types/react').ForwardRefExoticComponent<Omit<import('../../../node_modules/@types/react').HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLDivElement |
|
|
3
|
+
declare const ResizablePanel: import('../../../node_modules/@types/react').ForwardRefExoticComponent<Omit<import('../../../node_modules/@types/react').HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLDivElement | HTMLObjectElement | HTMLLinkElement | HTMLFormElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLMapElement | HTMLAnchorElement | HTMLHeadingElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
4
4
|
className?: string | undefined;
|
|
5
5
|
collapsedSize?: number | undefined;
|
|
6
6
|
collapsible?: boolean | undefined;
|
|
@@ -3,7 +3,7 @@ import { default as React } from '../../../node_modules/@types/react';
|
|
|
3
3
|
|
|
4
4
|
declare const textVariants: (props?: ({
|
|
5
5
|
variant?: "secondary" | "primary" | null | undefined;
|
|
6
|
-
size?: "default" | "sm" | "lg" | "
|
|
6
|
+
size?: "default" | "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | null | undefined;
|
|
7
7
|
weight?: "bold" | "medium" | "normal" | "semibold" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
export interface TextProps extends React.HTMLAttributes<HTMLParagraphElement | HTMLSpanElement | HTMLDivElement>, VariantProps<typeof textVariants> {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from '../../node_modules/@types/react';
|
|
2
|
+
|
|
3
|
+
export declare const MastraResizablePanel: ({ children, defaultWidth, minimumWidth, maximumWidth, className, disabled, setCurrentWidth, dividerPosition, }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
defaultWidth: number;
|
|
6
|
+
minimumWidth: number;
|
|
7
|
+
maximumWidth: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
setCurrentWidth?: (width: number) => void;
|
|
11
|
+
dividerPosition?: "left" | "right";
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { WorkflowRunResult } from '@mastra/client-js';
|
|
2
|
+
|
|
1
3
|
type WorkflowRunContextType = {
|
|
2
|
-
result:
|
|
4
|
+
result: WorkflowRunResult | null;
|
|
3
5
|
setResult: React.Dispatch<React.SetStateAction<any>>;
|
|
4
6
|
payload: any;
|
|
5
7
|
setPayload: React.Dispatch<React.SetStateAction<any>>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { StepCondition } from '@mastra/core/workflows';
|
|
2
2
|
import { Node, Edge } from '@xyflow/react';
|
|
3
3
|
|
|
4
|
+
export type ConditionConditionType = 'if' | 'else' | 'when' | 'until' | 'while';
|
|
4
5
|
export type Condition = {
|
|
5
|
-
type:
|
|
6
|
+
type: ConditionConditionType;
|
|
6
7
|
ref: {
|
|
7
8
|
step: {
|
|
8
9
|
id: string;
|
|
@@ -10,17 +11,17 @@ export type Condition = {
|
|
|
10
11
|
path: string;
|
|
11
12
|
};
|
|
12
13
|
query: Record<string, any>;
|
|
13
|
-
conj?: 'and' | 'or';
|
|
14
|
+
conj?: 'and' | 'or' | 'not';
|
|
14
15
|
fnString?: never;
|
|
15
16
|
} | {
|
|
16
|
-
type:
|
|
17
|
+
type: ConditionConditionType;
|
|
17
18
|
fnString: string;
|
|
18
19
|
ref?: never;
|
|
19
20
|
query?: never;
|
|
20
21
|
conj?: never;
|
|
21
22
|
};
|
|
22
23
|
export declare const pathAlphabet: string[];
|
|
23
|
-
export declare function extractConditions(group: StepCondition<any, any>, type:
|
|
24
|
+
export declare function extractConditions(group: StepCondition<any, any>, type: ConditionConditionType): Condition[];
|
|
24
25
|
export declare const contructNodesAndEdges: ({ stepGraph, stepSubscriberGraph, }: {
|
|
25
26
|
stepGraph: any;
|
|
26
27
|
stepSubscriberGraph: any;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { MouseEvent as ReactMouseEvent } from '../../node_modules/@types/react';
|
|
2
2
|
|
|
3
|
-
export declare const useResizeColumn: ({ defaultWidth, minimumWidth, maximumWidth, }: {
|
|
3
|
+
export declare const useResizeColumn: ({ defaultWidth, minimumWidth, maximumWidth, setCurrentWidth, }: {
|
|
4
4
|
defaultWidth: number;
|
|
5
5
|
minimumWidth: number;
|
|
6
6
|
maximumWidth: number;
|
|
7
|
+
setCurrentWidth?: (width: number) => void;
|
|
7
8
|
}) => {
|
|
8
9
|
sidebarWidth: number;
|
|
9
10
|
isDragging: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RefinedTrace } from '../domains/traces/types';
|
|
2
2
|
|
|
3
3
|
export declare const useTraces: (componentName: string, baseUrl: string, isWorkflow?: boolean) => {
|
|
4
|
-
traces: RefinedTrace[]
|
|
4
|
+
traces: RefinedTrace[];
|
|
5
5
|
firstCallLoading: boolean;
|
|
6
6
|
error: {
|
|
7
7
|
message: string;
|
|
@@ -2,7 +2,7 @@ import { Workflow } from '@mastra/core/workflows';
|
|
|
2
2
|
import { WorkflowRunResult } from '@mastra/client-js';
|
|
3
3
|
|
|
4
4
|
export declare const useWorkflow: (workflowId: string, baseUrl: string) => {
|
|
5
|
-
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>[]
|
|
5
|
+
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>>>>[], any> | null;
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const useExecuteWorkflow: (baseUrl: string) => {
|
|
@@ -10,9 +10,14 @@ export declare const useExecuteWorkflow: (baseUrl: string) => {
|
|
|
10
10
|
workflowId: string;
|
|
11
11
|
input: any;
|
|
12
12
|
}) => Promise<WorkflowRunResult>;
|
|
13
|
-
|
|
13
|
+
startWorkflowRun: ({ workflowId, runId, input }: {
|
|
14
14
|
workflowId: string;
|
|
15
|
+
runId: string;
|
|
15
16
|
input: any;
|
|
17
|
+
}) => Promise<void>;
|
|
18
|
+
createWorkflowRun: ({ workflowId, prevRunId }: {
|
|
19
|
+
workflowId: string;
|
|
20
|
+
prevRunId?: string;
|
|
16
21
|
}) => Promise<{
|
|
17
22
|
runId: string;
|
|
18
23
|
}>;
|
|
@@ -32,6 +37,8 @@ export declare const useResumeWorkflow: (baseUrl: string) => {
|
|
|
32
37
|
stepId: string;
|
|
33
38
|
runId: string;
|
|
34
39
|
context: any;
|
|
35
|
-
}) => Promise<
|
|
40
|
+
}) => Promise<{
|
|
41
|
+
message: string;
|
|
42
|
+
}>;
|
|
36
43
|
isResumingWorkflow: boolean;
|
|
37
44
|
};
|
package/dist/index.css
CHANGED