UNPKG

@imgly/plugin-ai-generation-web

Version:

AI generation plugin for the CE.SDK editor

48 lines (47 loc) 1.38 kB
import CreativeEditorSDK from '@cesdk/cesdk-js'; import { RenderCustomProperty } from '../../core/provider'; type Style = { id: 'none' | (string & {}); label: string; prompt: string; thumbUri: string; }; /** * Provides render function for a style transfer property that allows * to change a style (of an image) from a library. * * The style will be appended to the prompt property, so the model does * not need to support style transfer directly. * * By default this expects the property key to be `style`. This can be changed with the option * `propertyKey`. */ declare function renderStyleTransferProperty(providerId: string, options: { cesdk?: CreativeEditorSDK; /** * Base URL used for the UI assets used in the plugin. */ baseURL?: string; /** * What property key to use for the style property. */ propertyKey?: string; /** * What property key to use for the prompt property. */ propertyKeyForPrompt?: string; /** * Override the default styles */ styles?: Style[] | ((defaultStyles: Style[]) => Style[]); /** * Overrides the default i18n translations for the prompt input. */ i18n?: { prompt?: { inputLabel?: string; placeholder?: string; }; }; }): RenderCustomProperty; export default renderStyleTransferProperty;