@imgly/plugin-ai-generation-web
Version:
AI generation plugin for the CE.SDK editor
20 lines (19 loc) • 1.12 kB
TypeScript
import type CreativeEditorSDK from '@cesdk/cesdk-js';
/**
* Creates a translation callback function for AI asset sources
* @param cesdk - The CE.SDK instance
* @param modelKey - The model/provider key (e.g., 'fal-ai/recraft-v3')
* @param propertyName - The property name (e.g., 'style', 'aspect_ratio')
* @param pluginType - The plugin type (e.g., 'image', 'video', 'sticker')
* @returns A translation callback function for use with CustomAssetSource
*/
export declare function createTranslationCallback(cesdk: CreativeEditorSDK, modelKey: string, propertyName?: string, pluginType?: string): (assetId: string, fallbackLabel: string, locale: string) => string;
/**
* Build translation keys array for AI plugin property values
* @param modelKey - The model/provider key
* @param propertyName - The property name
* @param value - The property value
* @param pluginType - The plugin type (image, video, sticker, etc.)
* @returns Array of translation keys in fallback order
*/
export declare function buildTranslationKeys(modelKey: string, propertyName: string, value: string, pluginType?: string): string[];