pixel-forge
Version:
A comprehensive generator for social media previews, favicons, and visual assets across all platforms
105 lines (104 loc) • 2.53 kB
TypeScript
import type { PixelForgeConfig } from '../../core/config-validator';
export interface PWAOptions {
includeManifest?: boolean;
includeIcons?: boolean;
includeSplashScreens?: boolean;
includeAppleIcons?: boolean;
includeAndroidIcons?: boolean;
includeShortcuts?: boolean;
}
export interface PWAManifestShortcut {
name: string;
short_name?: string;
description?: string;
url: string;
icons?: Array<{
src: string;
sizes: string;
type: string;
}>;
}
export declare class PWAGenerator {
private config;
private sourceImage;
constructor(sourceImage: string, config: PixelForgeConfig);
/**
* Generate all PWA assets
*/
generate(options?: PWAOptions): Promise<void>;
/**
* Generate PWA icons in standard sizes
*/
private generatePWAIcons;
/**
* Generate maskable icons for adaptive icons
*/
private generateMaskableIcons;
/**
* Generate Apple-specific icons
*/
private generateAppleIcons;
/**
* Generate Android-specific icons
*/
private generateAndroidIcons;
/**
* Generate splash screens for various devices
*/
private generateSplashScreens;
/**
* Generate individual splash screen
*/
private generateSplashScreen;
/**
* Generate PWA manifest.json
*/
private generateManifest;
/**
* Get default app shortcuts
*/
private getDefaultShortcuts;
/**
* Get HTML meta tags for PWA
*/
getMetaTags(): string[];
/**
* Get Next.js metadata configuration for PWA
*/
getNextMetadata(): {
manifest: string;
themeColor: string;
applicationName: string;
appleWebApp: {
capable: boolean;
title: string;
statusBarStyle: string;
startupImage: {
url: string;
media: string;
}[];
};
icons: {
apple: {
url: string;
sizes: string;
type: string;
}[];
other: ({
url: string;
sizes: string;
type: string;
purpose?: undefined;
} | {
url: string;
sizes: string;
type: string;
purpose: string;
})[];
};
};
/**
* Get list of generated files
*/
getGeneratedFiles(): string[];
}