/** * Adapter system for react-escpos. * * This module provides the adapter infrastructure that allows react-escpos * to work with different React component libraries and custom component naming schemes. * * @module adapters */ export { StandardElementType, ComponentMapping, RendererAdapter, } from './types'; export { BaseAdapter } from './base-adapter'; export { ReactPDFAdapter } from './react-pdf-adapter'; export { CustomAdapter } from './custom-adapter'; import { RendererAdapter, ComponentMapping } from './types'; /** * Creates an appropriate adapter based on the provided configuration. * * If no configuration is provided, returns a ReactPDFAdapter (default). * If a ComponentMapping object is provided, returns a CustomAdapter with that mapping. * If a RendererAdapter instance is provided, returns it as-is. * * @param config - Optional adapter configuration (ComponentMapping or RendererAdapter instance) * @returns The appropriate adapter instance * * @example * ```typescript * // Use default React-PDF adapter * const adapter1 = createAdapter(); * * // Use custom component mapping * const adapter2 = createAdapter({ * Receipt: 'document', * Item: 'text' * }); * * // Use custom adapter instance * const customAdapter = new CustomAdapter({ ... }); * const adapter3 = createAdapter(customAdapter); * ``` */ export declare function createAdapter(config?: RendererAdapter | ComponentMapping): RendererAdapter; /** * Checks if a value is a valid adapter configuration. * * @param value - The value to check * @returns True if the value is a valid adapter or component mapping */ export declare function isValidAdapterConfig(value: any): value is RendererAdapter | ComponentMapping; //# sourceMappingURL=index.d.ts.map