@mastra/playground-ui 1.0.0-alpha.8 → 1.0.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.
Files changed (39) hide show
  1. package/dist/components/dynamic-form/default-field-map.d.ts +16 -0
  2. package/dist/components/dynamic-form/fields/array-field.d.ts +17 -0
  3. package/dist/components/dynamic-form/fields/boolean-field.d.ts +12 -0
  4. package/dist/components/dynamic-form/fields/creatable-field.d.ts +17 -0
  5. package/dist/components/dynamic-form/fields/date-field.d.ts +12 -0
  6. package/dist/components/dynamic-form/fields/enum-field.d.ts +16 -0
  7. package/dist/components/dynamic-form/fields/index.d.ts +10 -0
  8. package/dist/components/dynamic-form/fields/number-field.d.ts +12 -0
  9. package/dist/components/dynamic-form/fields/object-field.d.ts +27 -0
  10. package/dist/components/dynamic-form/fields/record-field.d.ts +14 -0
  11. package/dist/components/dynamic-form/fields/string-field.d.ts +14 -0
  12. package/dist/components/dynamic-form/fields/union-field.d.ts +28 -0
  13. package/dist/components/dynamic-form/index.d.ts +11 -0
  14. package/dist/components/dynamic-form/resolvers/index.d.ts +4 -0
  15. package/dist/components/dynamic-form/schema-resolver.d.ts +21 -0
  16. package/dist/components/dynamic-form/schema.d.ts +70 -0
  17. package/dist/components/dynamic-form/utils.d.ts +12 -0
  18. package/dist/components/ui/calendar.d.ts +8 -0
  19. package/dist/components/ui/code-block.d.ts +7 -0
  20. package/dist/components/ui/collapsible.d.ts +5 -0
  21. package/dist/components/ui/command.d.ts +78 -0
  22. package/dist/components/ui/copy-button.d.ts +7 -0
  23. package/dist/components/ui/date-picker.d.ts +23 -0
  24. package/dist/components/ui/label.d.ts +5 -0
  25. package/dist/components/ui/popover.d.ts +6 -0
  26. package/dist/components/ui/select.d.ts +9 -0
  27. package/dist/components/ui/switch.d.ts +4 -0
  28. package/dist/components/ui/textarea.d.ts +5 -0
  29. package/dist/domains/workflows/context/workflow-run-context.d.ts +12 -0
  30. package/dist/domains/workflows/index.d.ts +2 -0
  31. package/dist/domains/workflows/workflow/utils.d.ts +9 -1
  32. package/dist/domains/workflows/workflow/workflow-trigger.d.ts +5 -0
  33. package/dist/hooks/use-copy-to-clipboard.d.ts +9 -0
  34. package/dist/hooks/use-workflows.d.ts +32 -1
  35. package/dist/index.es.js +1730 -77
  36. package/dist/index.es.js.map +1 -1
  37. package/dist/lib/object.d.ts +50 -0
  38. package/dist/lib/string.d.ts +1 -0
  39. package/package.json +37 -22
@@ -0,0 +1,16 @@
1
+ import { FieldProps } from './schema';
2
+
3
+ export declare function getDefaultFieldMap(): {
4
+ STRING: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
5
+ NUMBER: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
6
+ BOOLEAN: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
7
+ DATE: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
8
+ ENUM: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
9
+ ARRAY: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
10
+ RECORD: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
11
+ OBJECT: (props: FieldProps) => import("react/jsx-runtime").JSX.Element | null;
12
+ UNION: (props: FieldProps) => import("react/jsx-runtime").JSX.Element | null;
13
+ CREATABLE: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
14
+ SELECT: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
15
+ MULTI_SELECT: (props: FieldProps) => import("react/jsx-runtime").JSX.Element;
16
+ };
@@ -0,0 +1,17 @@
1
+ import { Control } from 'react-hook-form';
2
+ import * as React from 'react';
3
+ interface ArrayFieldProps {
4
+ name: string;
5
+ control: Control<any>;
6
+ renderField: (props: {
7
+ fieldName: string;
8
+ index: number;
9
+ }) => React.ReactNode;
10
+ handleFieldChange?: (props: {
11
+ key: string;
12
+ value: any[];
13
+ }) => void;
14
+ isStringField?: boolean;
15
+ }
16
+ export declare function ArrayField({ name, control, renderField, isStringField }: ArrayFieldProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Control } from 'react-hook-form';
2
+
3
+ interface BooleanFieldProps {
4
+ name: string;
5
+ control: Control<any>;
6
+ handleFieldChange?: (props: {
7
+ key: string;
8
+ value: boolean;
9
+ }) => void;
10
+ }
11
+ export declare function BooleanField({ name, control, handleFieldChange }: BooleanFieldProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,17 @@
1
+ import { Control } from 'react-hook-form';
2
+
3
+ interface CreatableFieldProps {
4
+ name: string;
5
+ control: Control<any>;
6
+ options?: {
7
+ label: string;
8
+ value: string;
9
+ }[];
10
+ handleFieldChange?: (props: {
11
+ key: string;
12
+ value: string[];
13
+ }) => void;
14
+ placeholder?: string;
15
+ }
16
+ export declare function CreatableField({ name, control, options, handleFieldChange, placeholder }: CreatableFieldProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Control } from 'react-hook-form';
2
+
3
+ interface DateFieldProps {
4
+ name: string;
5
+ control: Control<any>;
6
+ handleFieldChange?: (props: {
7
+ key: string;
8
+ value: string | Date | null | undefined;
9
+ }) => void;
10
+ }
11
+ export declare function DateField({ name, control, handleFieldChange }: DateFieldProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,16 @@
1
+ import { Control } from 'react-hook-form';
2
+
3
+ interface EnumFieldProps {
4
+ name: string;
5
+ control: Control<any>;
6
+ options: {
7
+ label: string;
8
+ value: string;
9
+ }[];
10
+ handleFieldChange?: (props: {
11
+ key: string;
12
+ value: string;
13
+ }) => void;
14
+ }
15
+ export declare function EnumField({ name, control, options, handleFieldChange }: EnumFieldProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,10 @@
1
+ export { ArrayField } from './array-field';
2
+ export { BooleanField } from './boolean-field';
3
+ export { CreatableField } from './creatable-field';
4
+ export { DateField } from './date-field';
5
+ export { EnumField } from './enum-field';
6
+ export { StringField } from './string-field';
7
+ export { UnionField } from './union-field';
8
+ export { ObjectField } from './object-field';
9
+ export { NumberField } from './number-field';
10
+ export { RecordField } from './record-field';
@@ -0,0 +1,12 @@
1
+ import { Control } from 'react-hook-form';
2
+
3
+ interface NumberFieldProps {
4
+ name: string;
5
+ control: Control<any>;
6
+ handleFieldChange?: (props: {
7
+ key: string;
8
+ value: number;
9
+ }) => void;
10
+ }
11
+ export declare function NumberField({ name, control, handleFieldChange }: NumberFieldProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,27 @@
1
+ import { ZodSchema } from 'zod';
2
+ import * as React from 'react';
3
+ interface ObjectFieldProps {
4
+ renderDynamicForm: (props: {
5
+ schema: ZodSchema;
6
+ handleFieldChange: (field: string, value: any) => void;
7
+ control: any;
8
+ formValues: Record<string, any>;
9
+ errors: Record<string, any>;
10
+ parentField: string;
11
+ action?: any;
12
+ isOptional?: boolean;
13
+ depth?: number;
14
+ }) => React.ReactNode;
15
+ schema: ZodSchema;
16
+ handleFieldChange: (field: string, value: any) => void;
17
+ control: any;
18
+ formValues: Record<string, any>;
19
+ errors: Record<string, any>;
20
+ parentField: string;
21
+ action?: any;
22
+ isArray?: boolean;
23
+ isOptional?: boolean;
24
+ depth?: number;
25
+ }
26
+ export declare function ObjectField({ renderDynamicForm, schema, handleFieldChange, control, formValues, errors, parentField, action, isArray, isOptional, depth, }: ObjectFieldProps): import("react/jsx-runtime").JSX.Element;
27
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Control } from 'react-hook-form';
2
+ import { ZodSchema } from 'zod';
3
+
4
+ interface RecordFieldProps {
5
+ name: string;
6
+ control: Control<any>;
7
+ innerSchema?: ZodSchema;
8
+ handleFieldChange?: (props: {
9
+ key: string;
10
+ value: Record<string, any>;
11
+ }) => void;
12
+ }
13
+ export declare function RecordField({ name, control, handleFieldChange }: RecordFieldProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Control } from 'react-hook-form';
2
+
3
+ interface StringFieldProps {
4
+ name: string;
5
+ control: Control<any>;
6
+ handleFieldChange?: (props: {
7
+ key: string;
8
+ value: any;
9
+ }) => void;
10
+ isMultiline?: boolean;
11
+ placeholder?: string;
12
+ }
13
+ export declare function StringField({ name, control, handleFieldChange, isMultiline, placeholder }: StringFieldProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,28 @@
1
+ import { ZodUnion } from 'zod';
2
+ import * as React from 'react';
3
+ interface UnionComponentProps {
4
+ renderDynamicForm: (props: {
5
+ schema: ZodUnion<any>;
6
+ handleFieldChange: (field: string, value: any) => void;
7
+ control: any;
8
+ formValues: Record<string, any>;
9
+ errors: Record<string, any>;
10
+ parentField: string;
11
+ action?: any;
12
+ isOptional?: boolean;
13
+ isNullable?: boolean;
14
+ depth?: number;
15
+ }) => React.ReactNode;
16
+ schema: ZodUnion<any>;
17
+ handleFieldChange: (field: string, value: any) => void;
18
+ control: any;
19
+ formValues: Record<string, any>;
20
+ errors: Record<string, any>;
21
+ parentField: string;
22
+ action?: any;
23
+ isOptional?: boolean;
24
+ isNullable?: boolean;
25
+ depth?: number;
26
+ }
27
+ export declare function UnionField({ renderDynamicForm, schema, handleFieldChange, control, formValues, errors, parentField, action, isOptional, isNullable, depth, }: UnionComponentProps): import("react/jsx-runtime").JSX.Element | null;
28
+ export {};
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+
3
+ interface DynamicFormProps<T extends z.ZodSchema> {
4
+ schema: T;
5
+ onSubmit: (values: z.infer<T>) => void | Promise<void>;
6
+ defaultValues?: z.infer<T>;
7
+ isSubmitLoading?: boolean;
8
+ submitButtonLabel?: string;
9
+ }
10
+ export declare function DynamicForm<T extends z.ZodSchema>({ schema, onSubmit, defaultValues, isSubmitLoading, submitButtonLabel, }: DynamicFormProps<T>): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Resolver } from 'react-hook-form';
2
+ import { z } from 'zod';
3
+
4
+ export declare const customZodUnionResolver: (schemaUnion: z.ZodTypeAny, discriminator: string) => Resolver<any>;
@@ -0,0 +1,21 @@
1
+ import { Control, FieldErrors } from 'react-hook-form';
2
+ import { z } from 'zod';
3
+
4
+ interface ResolveSchemaProps {
5
+ schema: z.ZodSchema;
6
+ parentField: string;
7
+ control: Control<any>;
8
+ formValues: any;
9
+ errors: FieldErrors;
10
+ handleFieldChange: (props: {
11
+ key: string | number | symbol;
12
+ value: any;
13
+ }) => void;
14
+ isArray?: boolean;
15
+ isOptional?: boolean;
16
+ isNullable?: boolean;
17
+ }
18
+ export declare function resolveSchema({ schema, parentField, control, formValues, errors, handleFieldChange, isOptional, isNullable, depth, }: ResolveSchemaProps & {
19
+ depth?: number;
20
+ }): import("react/jsx-runtime").JSX.Element | (import("react/jsx-runtime").JSX.Element | null)[] | null;
21
+ export {};
@@ -0,0 +1,70 @@
1
+ import { Control } from 'react-hook-form';
2
+ import { ZodSchema, z } from 'zod';
3
+ import * as React from 'react';
4
+ type ActionVariables = Record<string, any>;
5
+ export declare enum FormConfigType {
6
+ STRING = "STRING",
7
+ NUMBER = "NUMBER",
8
+ DATE = "DATE",
9
+ ENUM = "ENUM",
10
+ ARRAY = "ARRAY",
11
+ BOOLEAN = "BOOLEAN",
12
+ RECORD = "RECORD",
13
+ OBJECT = "OBJECT",
14
+ UNION = "UNION",
15
+ CREATABLE = "CREATABLE",
16
+ SELECT = "SELECT",
17
+ MULTI_SELECT = "MULTI_SELECT"
18
+ }
19
+ type FormConfig = {
20
+ type: FormConfigType;
21
+ options?: {
22
+ label: string;
23
+ value: string;
24
+ }[];
25
+ isOptional?: boolean;
26
+ hasEffects?: boolean;
27
+ innerSchema?: ZodSchema;
28
+ };
29
+ export declare function getFormConfigTypesFromSchemaDef({ schema, isOptional, }: {
30
+ schema: ZodSchema<any>;
31
+ isOptional?: boolean;
32
+ }): FormConfig;
33
+ export type FieldProps = {
34
+ name: string;
35
+ options?: {
36
+ label: string;
37
+ value: string;
38
+ }[];
39
+ control: Control<any>;
40
+ innerSchema?: ZodSchema;
41
+ variables?: Record<string, ActionVariables | undefined>;
42
+ isNullable?: boolean;
43
+ handleFieldChange: ({ key, value, variables, }: {
44
+ key: keyof z.infer<any>;
45
+ value: any;
46
+ variables?: ActionVariables;
47
+ }) => void;
48
+ };
49
+ export declare function schemaToFormFieldRenderer<T extends ZodSchema>({ schema, errors, renderFieldMap, schemaField, renderLabel, control, variables, onFieldChange, schemaOptions, values, isOptional, isNullable, }: {
50
+ schema: ZodSchema<any>;
51
+ errors: any;
52
+ renderFieldMap?: Record<FormConfigType, (props: FieldProps) => React.ReactNode>;
53
+ schemaField: string;
54
+ control: any;
55
+ onFieldChange: (props: {
56
+ key: keyof z.infer<T>;
57
+ value: any;
58
+ variables?: ActionVariables;
59
+ }) => void;
60
+ variables?: Record<string, ActionVariables | undefined>;
61
+ schemaOptions?: Record<string, any>;
62
+ renderLabel?: ({ isOptional, schemaField }: {
63
+ isOptional: boolean;
64
+ schemaField: string;
65
+ }) => React.ReactNode;
66
+ values: Record<keyof z.infer<T>, unknown>;
67
+ isOptional?: boolean;
68
+ isNullable?: boolean;
69
+ }): any;
70
+ export {};
@@ -0,0 +1,12 @@
1
+ import { FieldErrors } from 'react-hook-form';
2
+ import { z } from 'zod';
3
+
4
+ export declare const transformToNestObject: (error: z.ZodError) => FieldErrors;
5
+ /**
6
+ * Resolve serialized zod output - This function takes the string output ot the `jsonSchemaToZod` function
7
+ * and instantiates the zod object correctly.
8
+ *
9
+ * @param obj - serialized zod object
10
+ * @returns resolved zod object
11
+ */
12
+ export declare function resolveSerializedZodOutput(obj: any): any;
@@ -0,0 +1,8 @@
1
+ import { DayPicker } from 'react-day-picker';
2
+ import * as React from 'react';
3
+ export type CalendarProps = React.ComponentProps<typeof DayPicker>;
4
+ declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
5
+ declare namespace Calendar {
6
+ var displayName: string;
7
+ }
8
+ export { Calendar };
@@ -0,0 +1,7 @@
1
+ declare function CodeBlockDemo({ code, language, filename, className, }: {
2
+ code?: string;
3
+ language: 'ts' | 'json';
4
+ filename?: string;
5
+ className?: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export { CodeBlockDemo };
@@ -0,0 +1,5 @@
1
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
+ declare const Collapsible: import('../../../node_modules/@types/react').ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import('../../../node_modules/@types/react').RefAttributes<HTMLDivElement>>;
3
+ declare const CollapsibleTrigger: import('../../../node_modules/@types/react').ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import('../../../node_modules/@types/react').RefAttributes<HTMLButtonElement>>;
4
+ declare const CollapsibleContent: import('../../../node_modules/@types/react').ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import('../../../node_modules/@types/react').RefAttributes<HTMLDivElement>>;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,78 @@
1
+ import * as React from 'react';
2
+ declare const Command: React.ForwardRefExoticComponent<Omit<{
3
+ children?: React.ReactNode;
4
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
5
+ ref?: React.Ref<HTMLDivElement>;
6
+ } & {
7
+ asChild?: boolean;
8
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
9
+ label?: string;
10
+ shouldFilter?: boolean;
11
+ filter?: (value: string, search: string, keywords?: string[]) => number;
12
+ defaultValue?: string;
13
+ value?: string;
14
+ onValueChange?: (value: string) => void;
15
+ loop?: boolean;
16
+ disablePointerSelection?: boolean;
17
+ vimBindings?: boolean;
18
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
20
+ ref?: React.Ref<HTMLInputElement>;
21
+ } & {
22
+ asChild?: boolean;
23
+ }, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
24
+ value?: string;
25
+ onValueChange?: (search: string) => void;
26
+ } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
27
+ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
28
+ children?: React.ReactNode;
29
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
30
+ ref?: React.Ref<HTMLDivElement>;
31
+ } & {
32
+ asChild?: boolean;
33
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
34
+ label?: string;
35
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
36
+ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
37
+ children?: React.ReactNode;
38
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
39
+ ref?: React.Ref<HTMLDivElement>;
40
+ } & {
41
+ asChild?: boolean;
42
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
43
+ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
44
+ children?: React.ReactNode;
45
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
46
+ ref?: React.Ref<HTMLDivElement>;
47
+ } & {
48
+ asChild?: boolean;
49
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
50
+ heading?: React.ReactNode;
51
+ value?: string;
52
+ forceMount?: boolean;
53
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
54
+ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
55
+ ref?: React.Ref<HTMLDivElement>;
56
+ } & {
57
+ asChild?: boolean;
58
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
59
+ alwaysRender?: boolean;
60
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
61
+ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
62
+ children?: React.ReactNode;
63
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
64
+ ref?: React.Ref<HTMLDivElement>;
65
+ } & {
66
+ asChild?: boolean;
67
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
68
+ disabled?: boolean;
69
+ onSelect?: (value: string) => void;
70
+ value?: string;
71
+ keywords?: string[];
72
+ forceMount?: boolean;
73
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
74
+ declare const CommandShortcut: {
75
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
76
+ displayName: string;
77
+ };
78
+ export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,7 @@
1
+ type CopyButtonProps = {
2
+ content: string;
3
+ copyMessage?: string;
4
+ classname?: string;
5
+ };
6
+ export declare function CopyButton({ content, copyMessage, classname }: CopyButtonProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,23 @@
1
+ import { PropsSingle } from 'react-day-picker';
2
+ import * as React from 'react';
3
+ type CommonProps = Omit<PropsSingle, 'mode' | 'selected' | 'onSelect'> & {
4
+ value: Date | undefined | null;
5
+ setValue: (date: Date | undefined | null) => void;
6
+ clearable?: boolean;
7
+ };
8
+ export type DatePickerProps = (CommonProps & {
9
+ children?: never;
10
+ className?: string;
11
+ placeholder?: string;
12
+ }) | (CommonProps & {
13
+ children: React.ReactNode;
14
+ className?: never;
15
+ placeholder?: string;
16
+ });
17
+ export declare const DatePicker: React.FC<DatePickerProps>;
18
+ export declare const DatePickerOnly: ({ value, setValue, setOpenPopover, clearable, placeholder, className, ...props }: CommonProps & {
19
+ setOpenPopover?: (open: boolean) => void;
20
+ placeholder?: string;
21
+ className?: string;
22
+ }) => import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1,5 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import * as React from 'react';
4
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
+ export { Label };
@@ -0,0 +1,6 @@
1
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
2
+ import * as React from 'react';
3
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export { Popover, PopoverTrigger, PopoverContent };
@@ -0,0 +1,9 @@
1
+ import * as SelectPrimitive from '@radix-ui/react-select';
2
+ import * as React from 'react';
3
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
4
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
6
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectItem };
@@ -0,0 +1,4 @@
1
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
2
+ import * as React from 'react';
3
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Switch };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ }
4
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
5
+ export { Textarea };
@@ -0,0 +1,12 @@
1
+ type WorkflowRunContextType = {
2
+ result: any;
3
+ setResult: React.Dispatch<React.SetStateAction<any>>;
4
+ payload: any;
5
+ setPayload: React.Dispatch<React.SetStateAction<any>>;
6
+ clearData: () => void;
7
+ };
8
+ export declare const WorkflowRunContext: import('../../../../node_modules/@types/react').Context<WorkflowRunContextType>;
9
+ export declare function WorkflowRunProvider({ children }: {
10
+ children: React.ReactNode;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -1,3 +1,5 @@
1
1
  export * from './workflow/workflow-traces';
2
2
  export * from './workflow/workflow-graph';
3
3
  export * from './workflows-table';
4
+ export * from './workflow/workflow-trigger';
5
+ export * from './context/workflow-run-context';
@@ -2,6 +2,7 @@ import { StepCondition } from '@mastra/core/workflows';
2
2
  import { Node, Edge } from '@xyflow/react';
3
3
 
4
4
  export type Condition = {
5
+ type: 'if' | 'else' | 'when';
5
6
  ref: {
6
7
  step: {
7
8
  id: string;
@@ -10,9 +11,16 @@ export type Condition = {
10
11
  };
11
12
  query: Record<string, any>;
12
13
  conj?: 'and' | 'or';
14
+ fnString?: never;
15
+ } | {
16
+ type: 'if' | 'else' | 'when';
17
+ fnString: string;
18
+ ref?: never;
19
+ query?: never;
20
+ conj?: never;
13
21
  };
14
22
  export declare const pathAlphabet: string[];
15
- export declare function extractConditions(group?: StepCondition<any, any>): Condition[];
23
+ export declare function extractConditions(group: StepCondition<any, any>, type: 'if' | 'else' | 'when'): Condition[];
16
24
  export declare const contructNodesAndEdges: ({ stepGraph, stepSubscriberGraph, }: {
17
25
  stepGraph: any;
18
26
  stepSubscriberGraph: any;
@@ -0,0 +1,5 @@
1
+ export declare function WorkflowTrigger({ workflowId, baseUrl, setRunId, }: {
2
+ workflowId: string;
3
+ baseUrl: string;
4
+ setRunId?: (runId: string) => void;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ type UseCopyToClipboardProps = {
2
+ text: string;
3
+ copyMessage?: string;
4
+ };
5
+ export declare function useCopyToClipboard({ text, copyMessage }: UseCopyToClipboardProps): {
6
+ isCopied: boolean;
7
+ handleCopy: () => void;
8
+ };
9
+ export {};
@@ -1,6 +1,37 @@
1
1
  import { Workflow } from '@mastra/core/workflows';
2
+ import { WorkflowRunResult } from '@mastra/client-js';
2
3
 
3
4
  export declare const useWorkflow: (workflowId: string, baseUrl: string) => {
4
- workflow: Workflow<any, any> | null;
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>[]>>>[], any> | null;
5
6
  isLoading: boolean;
6
7
  };
8
+ export declare const useExecuteWorkflow: (baseUrl: string) => {
9
+ executeWorkflow: ({ workflowId, input }: {
10
+ workflowId: string;
11
+ input: any;
12
+ }) => Promise<WorkflowRunResult>;
13
+ createWorkflowRun: ({ workflowId, input }: {
14
+ workflowId: string;
15
+ input: any;
16
+ }) => Promise<{
17
+ runId: string;
18
+ }>;
19
+ isExecutingWorkflow: boolean;
20
+ };
21
+ export declare const useWatchWorkflow: (baseUrl: string) => {
22
+ watchWorkflow: ({ workflowId, runId }: {
23
+ workflowId: string;
24
+ runId: string;
25
+ }) => Promise<void>;
26
+ isWatchingWorkflow: boolean;
27
+ watchResult: WorkflowRunResult | null;
28
+ };
29
+ export declare const useResumeWorkflow: (baseUrl: string) => {
30
+ resumeWorkflow: ({ workflowId, stepId, runId, context, }: {
31
+ workflowId: string;
32
+ stepId: string;
33
+ runId: string;
34
+ context: any;
35
+ }) => Promise<Record<string, any>>;
36
+ isResumingWorkflow: boolean;
37
+ };