import { AppBridge, OverlayContext } from '@u-devtools/core'; import { Component } from 'vue'; export { defineVueElement, defineVueElements, type DefineElementOptions } from './web-components'; export { createDevToolsContext, type DevToolsContext } from './context'; export * from './vanilla'; export type { Toast } from './context'; export interface AppContext { bridge: AppBridge; /** * ClientApi is only available in client context. * In app context (overlay), api is not provided as it runs on the page. * For app plugins, use module context (Module Singleton) to store the bridge. */ api?: never; /** * Registers a cleanup function that will be called when the plugin is removed * (e.g., during HMR or overlay unmounting). */ onCleanup: (fn: () => void) => void; } export interface AppPluginDefinition { /** * Vue component that will be rendered in the plugins layer (on top of the page) */ component?: Component; /** * Setup function (executed once on startup) * Here you can attach global listeners or register menu items */ setup?: (context: AppContext) => void | Promise; /** * Declarative menu (required for plugins with UI in overlay) */ menu?: { id: string; label: string; icon: string; order?: number; action?: string | ((ctx: OverlayContext) => void); }; /** * Declarative commands */ commands?: Array<{ id: string; label: string; icon?: string; shortcut?: string[]; action: (ctx: AppContext) => void | Promise; }>; } /** * Declarative definition of a plugin part that works in the page context */ export declare function defineApp(def: AppPluginDefinition): AppPluginDefinition; //# sourceMappingURL=index.d.ts.map