import { UnpluginExecutionOptions, UnpluginFactory } from "./types.cjs"; import { UnpluginFactoryDecorator, UnpluginFactoryOptions } from "./unplugin.cjs"; import { ExecutionContext, UnresolvedContext } from "@powerlines/core"; import { Plugin, RollupOptions } from "rollup"; //#region src/rollup.d.ts /** * A Rollup plugin to bundle TypeScript declaration files (.d.ts) alongside the JavaScript output files. * * @remarks * This plugin generates .d.ts files for each entry point in the bundle, ensuring that type definitions are available for consumers of the library. */ declare const dtsBundlePlugin: Plugin; /** * Resolves the options for [rollup](https://rollupjs.org). * * @param context - The build context. * @returns The resolved options. */ declare function resolveOptions(context: TContext): RollupOptions; /** * Creates a Rollup plugin factory that generates a plugin instance. * * @see https://rollupjs.org/guide/en/#plugins-overview * * @example * ```ts * // rollup.config.ts * import { createRollupFactory } from "@powerlines/unplugin/rollup"; * * const powerlinesPlugin = createRollupFactory({ name: "example-app", ... }); * * export default defineConfig({ * plugins: [powerlinesPlugin()], * }); * * ``` * * @param options - The options to create the plugin factory with. * @param decorate - A function to decorate the plugin options with additional properties or hooks. This can be used to add custom behavior to the plugin instance, such as additional hooks or configuration options. The function receives the generated plugin options and should return an object containing any additional properties or hooks to be merged into the final plugin options. * @returns A function that generates a Rollup plugin instance when called. The generated plugin will invoke the Powerlines API hooks during the build process, allowing you to integrate Powerlines into your Rollup build. */ declare function createRollupFactory(options?: Omit, decorate?: UnpluginFactoryDecorator): UnpluginFactory>; /** * A Rollup plugin that will invoke the Powerlines API hooks during the build process. * * @see https://rollupjs.org/guide/en/#plugins-overview * * @example * ```ts * // rollup.config.ts * * import powerlines from "@powerlines/unplugin/rollup"; * * export default defineConfig({ * plugins: [powerlines({ name: "example-app", ... })], * }) * ``` */ declare const plugin: (options?: UnpluginExecutionOptions | undefined) => Plugin | Plugin[]; //#endregion export { createRollupFactory, plugin as default, plugin, dtsBundlePlugin, resolveOptions }; //# sourceMappingURL=rollup.d.cts.map