import type { Action, ApiDefinitionRegistry, ComponentDataBindingRegistry, ComponentEventDto, DataSourceDiagnostic, DbAdapter, DbRealtimeAdapter, MediaAssetRegistry, StateAdapter, UiNode } from '@ankhorage/contracts'; import type { RuntimeNodePropsResolver } from '@ankhorage/contracts/runtime'; import React from 'react'; import type { ComponentRegistry } from './registry'; import type { RuntimeBindingOperationExecutor, RuntimeBindingOperationResultCache, RuntimeBindingOperationResultWriter } from './runtimeBindings'; import type { RuntimeEventOperationLifecycle, RuntimeEventOperationState } from './runtimeEventOperationLifecycle'; import type { RuntimeMediaAssetResolver } from './runtimeMedia'; export type { RuntimeNodePropsResolver, RuntimeResolveNodePropsArgs, } from '@ankhorage/contracts/runtime'; export interface RuntimeRendererWrapArgs { node: UiNode; rendered: React.ReactNode; isRoot: boolean; } export interface RuntimeActionHandlerArgs { action: RuntimeAction; event?: ComponentEventDto; node?: UiNode; resolvedPayload?: object; } export type RuntimeAction = Action | { readonly type: string; readonly payload?: object; }; export type RuntimeActionHandler = (args: RuntimeActionHandlerArgs) => Promise | void; export type RuntimeActionHandlers = Record; export type RuntimeActionExecutor = RuntimeActionHandler; export interface RuntimeRendererConfig { disableActions?: boolean; registry?: ComponentRegistry; wrapNode?: (args: RuntimeRendererWrapArgs) => React.ReactNode; resolveNodeProps?: RuntimeNodePropsResolver; resolveMediaAsset?: RuntimeMediaAssetResolver; mediaAssets?: MediaAssetRegistry; actionHandlers?: RuntimeActionHandlers; dbAdapter?: DbAdapter; dbRealtimeAdapter?: DbRealtimeAdapter; stateAdapter?: StateAdapter; bindingContext?: Record; apis?: ApiDefinitionRegistry; dataBindings?: ComponentDataBindingRegistry; operationResults?: RuntimeBindingOperationResultCache; writeOperationResult?: RuntimeBindingOperationResultWriter; executeAction?: RuntimeActionExecutor; executeOperation?: RuntimeBindingOperationExecutor; onDiagnostics?: (diagnostics: readonly DataSourceDiagnostic[]) => void; eventOperationLifecycle?: RuntimeEventOperationLifecycle; eventOperationState?: RuntimeEventOperationState; } export declare function composeRuntimeRendererWrapNode(innerWrapNode?: RuntimeRendererConfig['wrapNode'], outerWrapNode?: RuntimeRendererConfig['wrapNode']): RuntimeRendererConfig['wrapNode']; export declare function composeRuntimeNodePropsResolver(localResolver?: RuntimeRendererConfig['resolveNodeProps'], inheritedResolver?: RuntimeRendererConfig['resolveNodeProps']): RuntimeRendererConfig['resolveNodeProps']; export declare function mergeRuntimeRendererConfig(localConfig: RuntimeRendererConfig | undefined, inheritedConfig: RuntimeRendererConfig | undefined): RuntimeRendererConfig; export declare function RuntimeRendererConfigProvider(props: { value: RuntimeRendererConfig; children: React.ReactNode; }): React.JSX.Element; export declare function useRuntimeRendererConfig(): RuntimeRendererConfig; //# sourceMappingURL=RuntimeRendererConfig.d.ts.map