@mastra/playground-ui 4.0.0-alpha.5 → 4.0.0-alpha.7
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/dynamic-form/index.d.ts +2 -2
- package/dist/components/dynamic-form/utils.d.ts +0 -4
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/autoform/AutoForm.d.ts +13 -0
- package/dist/components/ui/autoform/components/ArrayElementWrapper.d.ts +4 -0
- package/dist/components/ui/autoform/components/ArrayWrapper.d.ts +4 -0
- package/dist/components/ui/autoform/components/BooleanField.d.ts +4 -0
- package/dist/components/ui/autoform/components/DateField.d.ts +4 -0
- package/dist/components/ui/autoform/components/ErrorMessage.d.ts +5 -0
- package/dist/components/ui/autoform/components/FieldWrapper.d.ts +4 -0
- package/dist/components/ui/autoform/components/Form.d.ts +3 -0
- package/dist/components/ui/autoform/components/NumberField.d.ts +4 -0
- package/dist/components/ui/autoform/components/ObjectWrapper.d.ts +4 -0
- package/dist/components/ui/autoform/components/RecordField.d.ts +4 -0
- package/dist/components/ui/autoform/components/SelectField.d.ts +4 -0
- package/dist/components/ui/autoform/components/StringField.d.ts +4 -0
- package/dist/components/ui/autoform/components/SubmitButton.d.ts +5 -0
- package/dist/components/ui/autoform/index.d.ts +4 -0
- package/dist/components/ui/autoform/types.d.ts +5 -0
- package/dist/components/ui/autoform/utils.d.ts +1 -0
- package/dist/components/ui/autoform/zodProvider/field-type-inference.d.ts +4 -0
- package/dist/components/ui/autoform/zodProvider/index.d.ts +9 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/date-picker.d.ts +2 -2
- package/dist/components/ui/form.d.ts +23 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/hooks/use-workflows.d.ts +0 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +354 -897
- package/dist/index.es.js.map +1 -1
- package/package.json +12 -7
- package/dist/components/dynamic-form/default-field-map.d.ts +0 -16
- package/dist/components/dynamic-form/fields/array-field.d.ts +0 -17
- package/dist/components/dynamic-form/fields/boolean-field.d.ts +0 -12
- package/dist/components/dynamic-form/fields/creatable-field.d.ts +0 -17
- package/dist/components/dynamic-form/fields/date-field.d.ts +0 -12
- package/dist/components/dynamic-form/fields/enum-field.d.ts +0 -16
- package/dist/components/dynamic-form/fields/index.d.ts +0 -10
- package/dist/components/dynamic-form/fields/number-field.d.ts +0 -12
- package/dist/components/dynamic-form/fields/object-field.d.ts +0 -27
- package/dist/components/dynamic-form/fields/record-field.d.ts +0 -14
- package/dist/components/dynamic-form/fields/string-field.d.ts +0 -14
- package/dist/components/dynamic-form/fields/union-field.d.ts +0 -28
- package/dist/components/dynamic-form/resolvers/index.d.ts +0 -4
- package/dist/components/dynamic-form/schema-resolver.d.ts +0 -21
- package/dist/components/dynamic-form/schema.d.ts +0 -70
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { default as z } from 'zod';
|
|
2
2
|
|
|
3
3
|
interface DynamicFormProps<T extends z.ZodSchema> {
|
|
4
4
|
schema: T;
|
|
@@ -7,5 +7,5 @@ interface DynamicFormProps<T extends z.ZodSchema> {
|
|
|
7
7
|
isSubmitLoading?: boolean;
|
|
8
8
|
submitButtonLabel?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function DynamicForm<T extends z.ZodSchema>({ schema, onSubmit, defaultValues, isSubmitLoading, submitButtonLabel, }: DynamicFormProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function DynamicForm<T extends z.ZodSchema>({ schema, onSubmit, defaultValues, isSubmitLoading, submitButtonLabel, }: DynamicFormProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
11
11
|
export {};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { FieldErrors } from 'react-hook-form';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
export declare const transformToNestObject: (error: z.ZodError) => FieldErrors;
|
|
5
1
|
/**
|
|
6
2
|
* Resolve serialized zod output - This function takes the string output ot the `jsonSchemaToZod` function
|
|
7
3
|
* and instantiates the zod object correctly.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from '../../../../node_modules/@types/react';
|
|
2
|
+
import { AutoFormProps } from './types';
|
|
3
|
+
|
|
4
|
+
export declare const ShadcnAutoFormFieldComponents: {
|
|
5
|
+
readonly string: React.FC<import('@autoform/react').AutoFormFieldProps>;
|
|
6
|
+
readonly number: React.FC<import('@autoform/react').AutoFormFieldProps>;
|
|
7
|
+
readonly boolean: React.FC<import('@autoform/react').AutoFormFieldProps>;
|
|
8
|
+
readonly date: React.FC<import('@autoform/react').AutoFormFieldProps>;
|
|
9
|
+
readonly select: React.FC<import('@autoform/react').AutoFormFieldProps>;
|
|
10
|
+
readonly record: React.FC<import('@autoform/react').AutoFormFieldProps>;
|
|
11
|
+
};
|
|
12
|
+
export type FieldTypes = keyof typeof ShadcnAutoFormFieldComponents;
|
|
13
|
+
export declare function AutoForm<T extends Record<string, any>>({ uiComponents, formComponents, ...props }: AutoFormProps<T>): 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 Form: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & React.RefAttributes<HTMLFormElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fieldConfig: (config: import('@autoform/core').FieldConfig<import('../../../../node_modules/@types/react').ReactNode, "string" | "number" | "boolean" | "select" | "date" | "record", import('../../../../node_modules/@types/react').ComponentType<import('@autoform/react').FieldWrapperProps>, {}>) => import('@autoform/zod').SuperRefineFunction;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ParsedSchema } from '@autoform/core';
|
|
2
|
+
import { ZodObjectOrWrapped, ZodProvider } from '@autoform/zod';
|
|
3
|
+
|
|
4
|
+
export declare function parseSchema(schema: ZodObjectOrWrapped): ParsedSchema;
|
|
5
|
+
export declare class CustomZodProvider<T extends ZodObjectOrWrapped> extends ZodProvider<T> {
|
|
6
|
+
private _schema;
|
|
7
|
+
constructor(schema: T);
|
|
8
|
+
parseSchema(): ParsedSchema;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Checkbox };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DayPickerSingleProps } from 'react-day-picker';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
type CommonProps = Omit<
|
|
3
|
+
type CommonProps = Omit<DayPickerSingleProps, 'mode' | 'selected' | 'onSelect'> & {
|
|
4
4
|
value: Date | undefined | null;
|
|
5
5
|
setValue: (date: Date | undefined | null) => void;
|
|
6
6
|
clearable?: boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ControllerProps, FieldPath, FieldValues } from 'react-hook-form';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: import('react-hook-form').FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
5
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const useFormField: () => {
|
|
7
|
+
invalid: boolean;
|
|
8
|
+
isDirty: boolean;
|
|
9
|
+
isTouched: boolean;
|
|
10
|
+
isValidating: boolean;
|
|
11
|
+
error?: import('react-hook-form').FieldError;
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
formItemId: string;
|
|
15
|
+
formDescriptionId: string;
|
|
16
|
+
formMessageId: string;
|
|
17
|
+
};
|
|
18
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
20
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-slot').SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
21
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
4
|
+
declare const toggleVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { Toggle, toggleVariants };
|
|
@@ -6,10 +6,6 @@ export declare const useWorkflow: (workflowId: string, baseUrl: string) => {
|
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const useExecuteWorkflow: (baseUrl: string) => {
|
|
9
|
-
executeWorkflow: ({ workflowId, input }: {
|
|
10
|
-
workflowId: string;
|
|
11
|
-
input: any;
|
|
12
|
-
}) => Promise<WorkflowRunResult>;
|
|
13
9
|
startWorkflowRun: ({ workflowId, runId, input }: {
|
|
14
10
|
workflowId: string;
|
|
15
11
|
runId: string;
|
package/dist/index.d.ts
CHANGED