/** * Component plugin registry for runtime-core. * * This module has NO IMPORTS to ensure it's fully initialized before * any other module can import from it. This avoids circular dependency * issues with ES module initialization. */ /** * Plugin system for components (used by HMR, DevTools, SSR, etc.) * Note: SetupFn type is duplicated here to avoid circular imports */ export type ComponentPlugin = { onDefine?: (name: string | undefined, factory: Function, setup: Function) => void; }; export declare function registerComponentPlugin(plugin: ComponentPlugin): void; /** * Get all registered plugins (internal use) */ export declare function getComponentPlugins(): readonly ComponentPlugin[]; /** * Context extension system for adding properties to ComponentSetupContext * Used by SSR, DevTools, and other packages that need to extend the context */ type ContextExtension = (ctx: object) => void; /** * Register a function that will be called to extend every component context. * Extensions are called in order of registration. * * @example * ```ts * // In @sigx/server-renderer/client * registerContextExtension((ctx) => { * ctx.ssr = { load: () => {} }; * }); * ``` */ export declare function registerContextExtension(extension: ContextExtension): void; /** * Apply all registered context extensions to a context object. * Called internally by the renderer when creating component contexts. */ export declare function applyContextExtensions(ctx: object): void; export {}; //# sourceMappingURL=plugins.d.ts.map