UNPKG

@imgly/plugin-ai-generation-web

Version:

AI generation plugin for the CE.SDK editor

35 lines (34 loc) 1.02 kB
import { ApplyCallbacks } from '../providers/getApplyCallbacks'; export type Callbacks = { /** * Callbacks for the confirmation process. */ applyCallbacks?: ApplyCallbacks; /** * Callback when generation is cancelled. */ onCancelGeneration?: () => void; }; /** * Global registry for managing callbacks for quick action menus across different * components. */ export declare class CallbacksRegistry { /** Map storing all registered callbacks by their ID */ private actions; private constructor(); /** * Gets the singleton instance of the CallbacksRegistry. * Uses global object storage to ensure singleton across different bundle contexts. */ static get(): CallbacksRegistry; /** * Registers apply callbacks in the registry. */ register(blockId: number, callbacks: Partial<Callbacks>): void; /** * Gets the callbacks for the given block id. */ get(blockId: number): Callbacks; } export default CallbacksRegistry;