import { DomNode } from '@co-hooks/dom-node'; import { FunctionAny } from '@co-hooks/util'; import { CSSProperties, FC, ReactNode, SyntheticEvent } from 'react'; import { IBoardNodeType, IBrickInstance, IBrickNodeType, INodeType } from '@chief-editor/base'; import { BrickEnv } from '@chief-editor/types'; export declare type IRuntimeBrickRenderProps = Omit & { node: DomNode; }; export interface IRuntimeBoardRenderProps extends IBoardNodeType { style?: CSSProperties; className?: string; children?: ReactNode; node: DomNode; } export interface IRuntimeBrickProps extends Omit, 'layout' | 'styles'> { styles: CSSProperties; layout: CSSProperties; setValue: (value: V) => void; setState: (value: Partial) => void; dispatchEvent(e: SyntheticEvent): void; dispatchEvent(name: string, param?: any): void; renderPart: (name: string, style?: CSSProperties, className?: string) => ReactNode; getDatasource: (data: unknown) => void; getHook: (name: string) => FunctionAny | null; getByExpression(...expression: Array): any; } export interface IRuntimeBrickContainerRenderProps { brickId: string; style?: CSSProperties; className?: string; children?: ReactNode; node: DomNode; } export interface IRuntimeContext { BrickRender: FC; BrickContainerRender?: FC; BrickContainers?: Record>; BoardRender: FC; Bricks: Record>; env?: BrickEnv; } export interface IRuntimeDispatcherProps { node: DomNode; style?: CSSProperties; className?: string; } export declare type IRuntimeBrickPropsGlobal = IRuntimeBrickProps;