import type { FormProps as RcFormProps } from 'rc-field-form/lib/Form'; import type { FormProviderProps as RcFormProviderProps } from 'rc-field-form/lib/FormContext'; import type { Meta } from 'rc-field-form/lib/interface'; import React from 'react'; import type { KpFormProps } from '../Form'; import type { KpFormInstance } from '../hooks/useForm'; import type { KpItemProps } from '../Item'; import type { KpSchemaItemProps } from '../Schema/Item'; import type { ObjectType, ValidateStatus } from '../types'; declare type TypeFormat = (value: any, item: KpSchemaItemProps) => any; export interface KpFormConfigType { jsonFormatSubmit?: TypeFormat; jsonFormatInitialValue?: TypeFormat; jsonDefaultTypeFieldProps?: Record ObjectType)>; jsonInjectTypeItem?: Record>; renderFormNode?: (props: Omit, form: KpFormInstance) => React.ReactNode; renderFormItemNode?: (props: KpItemProps, state: { validateStatus: ValidateStatus; validateErrors: string[]; }) => React.ReactNode; } export declare type FormProviderProps = Omit; /** `noStyle` Form Item Context. Used for error collection */ export declare type ReportMetaChange = (meta: Meta, uniqueKeys: React.Key[]) => void; export declare const NoStyleItemContext: React.Context; export declare type KpFormContextType = { name?: string; form: KpFormInstance; itemRef: (name: (string | number)[]) => (node: React.ReactElement) => void; } & Pick; export declare const KpConfigContext: React.Context; export declare const KpFormContext: React.Context; export declare const KpFormProvider: React.FC; export declare const KpFormConfigProvider: React.FC; export {};