import { ConvertRockEventHandlerPropsOptions, ConvertRockSlotPropsOptions, GenerateRockSlotRendererOptions, RenderRockChildrenOptions, RenderRockOptions, RenderRockSlotOptions, RenderRockSlotWithMetaOptions, Rock, RockInstanceProps, RockInstanceContext } from "@ruiapp/move-style"; import type { ContainerRockConfig, ConvertRockEventHandlerPropOptions, DeclarativeRock, ProCodeRock, RockComponentProps, RockEventHandlerFunction, RockMeta, RockRenderer, RockRendererV1, RockRendererV2 } from "@ruiapp/move-style"; import React from "react"; /** * convert react component to RockRendererV2 * * - convertToEventHandlers * - convertToSlotProps * @param rockType * @param ReactComponent * @param keepInstanceFieldsInProps * @returns */ export declare function wrapToRockRenderer(rockTypeOrRockMeta: string | RockMeta, ReactComponent: any, keepInstanceFieldsInProps?: boolean): RockRenderer; /** * Alias of wrapToRockRenderer * @deprecated use wrapToRockRenderer instead * @see wrapToRockRenderer */ export declare const genRockRenderer: typeof wrapToRockRenderer; export declare function useRockInstance(props: { $type?: string; $id?: string; $slot?: any; }, rockType?: string): { $id: string; $slot: any; }; export declare function useRockInstanceContext(): RockInstanceContext; /** * wrap react component to rock component. * use when you want convert some third-party react component to rock component. * @param rockType * @param ReactComponent * @returns */ export declare function wrapToRockComponent(rockMeta: RockMeta, ReactComponent: (props: RockConfig | Record) => React.ReactNode): (props: RockComponentProps) => React.ReactElement | null; export declare function wrapRenderer(rock: Rock): React.Component; export declare function createComponentRenderer(rock: ProCodeRock): RockRendererV2; export declare function createDeclarativeComponentRenderer(rock: DeclarativeRock, rockRenderer: RockRenderer): { (rockInstance: RockInstanceProps, Record, {}>): React.ReactNode; displayName: string; }; export declare type DeclarativeComponentRockConfig = { component: DeclarativeRock; } & ContainerRockConfig; export declare const getDeclarativeRockRenderer: (rockMeta: DeclarativeRock) => RockRendererV1; export declare function renderRock(options: RenderRockOptions): any; export declare function renderRockChildren(options: RenderRockChildrenOptions): any; export declare function renderRockSlot(options: RenderRockSlotOptions): any; export declare function toRenderRockSlot(options: GenerateRockSlotRendererOptions): (...args: any[]) => any; export declare function convertToEventHandlers(options: ConvertRockEventHandlerPropsOptions): Record; export declare function convertToEventHandler(options: ConvertRockEventHandlerPropOptions): RockEventHandlerFunction; export declare function renderSlotWithAdapter(options: RenderRockSlotWithMetaOptions): any[] | { [x: string]: any; $id?: string; $type: string; $version?: string; $name?: string; $description?: string; $exps?: import("@ruiapp/move-style").RockPropExpressions; $i18n?: import("@ruiapp/move-style").RockI18nConfig; $locales?: import("@ruiapp/move-style").RockLocalesConfig; _hidden?: boolean; }; export declare function renderSlotToRenderProp(options: RenderRockSlotWithMetaOptions): (...args: any[]) => any; export declare function convertToSlotProps(options: ConvertRockSlotPropsOptions): {};