/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ import { ActivatablePluginDetails } from 'flipper-common'; import { PluginFactory, FlipperPluginComponent } from './Plugin'; import { DevicePluginPredicate, DevicePluginFactory } from './DevicePlugin'; export type FlipperPluginAPI object> = (pluginInstance: ReturnType) => object; export type FlipperPluginInstance object> = Parameters>[0]; /** * FlipperPluginModule describe the exports that are provided by a typical Flipper Desktop plugin */ export type FlipperDevicePluginModule = { /** predicate that determines if this plugin applies to the currently selcted device */ supportsDevice?: DevicePluginPredicate; /** the factory function that exposes plugin API over the wire */ API?: FlipperPluginAPI; /** the factory function that initializes a plugin instance */ devicePlugin: DevicePluginFactory; /** the component type that can render this plugin */ Component: FlipperPluginComponent; }; /** * FlipperPluginModule describe the exports that are provided by a typical Flipper Desktop plugin */ export type FlipperPluginModule> = { /** the factory function that exposes plugin API over the wire */ API?: FlipperPluginAPI; /** the factory function that initializes a plugin instance */ plugin: Factory; /** the component type that can render this plugin */ Component: FlipperPluginComponent; }; /** * A sandy plugin definition represents a loaded plugin definition, storing two things: * the loaded JS module, and the meta data (typically coming from package.json). * * Also delegates some of the standard plugin functionality to have a similar public static api as FlipperPlugin */ export declare class SandyPluginDefinition { id: string; module: FlipperPluginModule | FlipperDevicePluginModule; css?: string; details: ActivatablePluginDetails; isDevicePlugin: boolean; constructor(details: ActivatablePluginDetails, module: FlipperPluginModule | FlipperDevicePluginModule, css?: string); asDevicePluginModule(): FlipperDevicePluginModule; asPluginModule(): FlipperPluginModule; get packageName(): string; get title(): string; get icon(): string | undefined; get category(): string | undefined; get gatekeeper(): string | undefined; get version(): string; get keyboardActions(): never[]; } //# sourceMappingURL=SandyPluginDefinition.d.ts.map