code-craft-studio
Version:
A comprehensive QR code and barcode scanning/generation library for React. Works with or without Capacitor. Supports 22+ QR data types and 14+ barcode formats (EAN, UPC, Code 128, etc.), with customizable designs, analytics, and React components. Provider
29 lines (28 loc) • 1.07 kB
TypeScript
import type { PlatformAdapter } from './types';
declare class PlatformManager {
private static instance;
private adapter;
private initPromise;
private constructor();
static getInstance(): PlatformManager;
getAdapter(): Promise<PlatformAdapter>;
private initializeAdapter;
setAdapter(adapter: PlatformAdapter): void;
reset(): void;
}
export declare const platformManager: PlatformManager;
export { platformDetector } from './detector';
export type { PlatformAdapter, PlatformCapabilities, StorageAdapter, PlatformDetector } from './types';
export declare function getPlatform(): Promise<PlatformAdapter>;
export declare function scanQRCode(options?: {
formats?: string[];
}): Promise<import("..").ScanResult>;
export declare function generateQRCode(data: any, options?: any): Promise<{
dataUrl: string;
}>;
export declare function scanBarcode(options?: {
formats?: any[];
}): Promise<import("..").ScanResult>;
export declare function generateBarcode(data: string, format: any, options?: any): Promise<{
dataUrl: string;
}>;