@imgly/plugin-ai-text-generation-web 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,11 +2,35 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.2.5] - 2025-09-03
6
+
7
+ ### New Features
8
+
9
+ - [image-generation] **NanoBanana Provider**: Added NanoBanana text-to-image provider via fal.ai with fast generation times, 1024×1024 resolution, support for multiple output formats (JPEG, PNG), configurable number of images (1-4), and remixPageWithPrompt quick action
10
+ - [image-generation] **NanoBananaEdit Provider**: Added NanoBananaEdit image-to-image provider via fal.ai for editing existing images with text prompts, supporting all standard quick actions (editImage, swapBackground, styleTransfer, artistTransfer, createVariant, combineImages with up to 10 images, remixPage, remixPageWithPrompt)
11
+
12
+ ### Bug Fixes
13
+
14
+ - [all] **fal.ai Provider Configuration**: Fixed singleton configuration conflict when using multiple fal.ai providers with different proxy URLs. Each provider now maintains its own client instance instead of overwriting a global configuration
15
+ - [video-generation] **Missing Dependency**: Added missing `@fal-ai/client` dependency to plugin-ai-video-generation-web package.json to ensure the package works correctly when installed independently
16
+
17
+ ## [0.2.4] - 2025-08-07
18
+
19
+ ### New Features
20
+
21
+ - [all] **Provider Label Translations**: Added support for provider label translations
22
+ - [all] **Extended Provider Configuration**: Added support for `history` and `supportedQuickActions` configuration fields in `CommonProviderConfiguration`, allowing customers to:
23
+ - Override provider's default history asset source (`history` field) - can be set to `false` to disable history, `'@imgly/local'` for temporary storage, `'@imgly/indexedDB'` for persistent browser storage, or any custom asset source ID
24
+ - Configure supported quick actions (`supportedQuickActions` field) - can disable quick actions by setting to `false`/`null`, keep defaults with `true`, or override with custom mappings and configurations
25
+ - Both fields are optional and maintain backward compatibility with existing provider configurations
26
+ - [generation-web] **Utility Function**: Added `mergeQuickActionsConfig` utility function for merging provider defaults with user configuration overrides, exported from `@imgly/plugin-ai-generation-web` with comprehensive Jest test coverage
27
+
5
28
  ## [0.2.3] - 2025-07-23
6
29
 
7
30
  - [all] **Automatic History Asset Library Entries**: Composite history asset sources now automatically have corresponding asset library entries created with the same IDs (e.g., `ly.img.ai.image-generation.history`)
8
31
  - [all] **Provider Selection in Expanded Quick Actions**: When a quick action is expanded, users can now switch between all providers that support that specific quick action, enhancing flexibility in provider selection
9
32
  - [all] **Quick Action Can Disable Lock**: Some quick actions can now decide to not lock the block when operating on a block. Examples are `CreateVariant` and `CombineImages`.
33
+ - [image-generation] **Ideogram V3**: Added support for Ideogram V3 provider for image generation, which supports text-to-image and image-to-image generation
10
34
 
11
35
  ## [0.2.2] - 2025-07-16
12
36
 
package/README.md CHANGED
@@ -156,6 +156,18 @@ Key features:
156
156
  - Configurable model selection (Claude 3.5 Sonnet, Claude 3.7 Sonnet, etc.)
157
157
  - Default model: Claude 3.7 Sonnet (2025-02-19)
158
158
 
159
+ **Custom Translations:**
160
+
161
+ ```typescript
162
+ cesdk.i18n.setTranslations({
163
+ en: {
164
+ 'ly.img.plugin-ai-text-generation-web.anthropic.property.prompt': 'Enter your text transformation request',
165
+ 'ly.img.plugin-ai-text-generation-web.anthropic.property.temperature': 'Claude Creativity Level',
166
+ 'ly.img.plugin-ai-text-generation-web.anthropic.property.maxTokens': 'Claude Response Length'
167
+ }
168
+ });
169
+ ```
170
+
159
171
  #### OpenAI GPT
160
172
 
161
173
  A powerful text generation model that handles various text transformations:
@@ -191,6 +203,95 @@ Key features:
191
203
  - Configurable model selection (GPT-4o, GPT-4o-mini, GPT-3.5-turbo, etc.)
192
204
  - Default model: GPT-4o-mini
193
205
 
206
+ **Custom Translations:**
207
+
208
+ ```typescript
209
+ cesdk.i18n.setTranslations({
210
+ en: {
211
+ 'ly.img.plugin-ai-text-generation-web.openai.property.prompt': 'Enter your text transformation request',
212
+ 'ly.img.plugin-ai-text-generation-web.openai.property.temperature': 'GPT Creativity Level',
213
+ 'ly.img.plugin-ai-text-generation-web.openai.property.maxTokens': 'GPT Response Length'
214
+ }
215
+ });
216
+ ```
217
+
218
+ ### Customizing Labels and Translations
219
+
220
+ You can customize all labels and text in the AI text generation interface using the translation system. This allows you to provide better labels for your users in any language.
221
+
222
+ #### Translation Key Structure
223
+
224
+ The system checks for translations in this order (highest to lowest priority):
225
+
226
+ 1. **Provider-specific**: `ly.img.plugin-ai-text-generation-web.${provider}.property.${field}` - Override labels for a specific AI provider
227
+ 2. **Generic**: `ly.img.plugin-ai-generation-web.property.${field}` - Override labels for all AI plugins
228
+
229
+ #### Basic Example
230
+
231
+ ```typescript
232
+ // Customize labels for your AI text generation interface
233
+ cesdk.i18n.setTranslations({
234
+ en: {
235
+ // Generic labels (applies to ALL AI plugins)
236
+ 'ly.img.plugin-ai-generation-web.property.prompt': 'Describe what you want to create',
237
+ 'ly.img.plugin-ai-generation-web.property.temperature': 'Creativity Level',
238
+ 'ly.img.plugin-ai-generation-web.property.maxTokens': 'Maximum Response Length',
239
+
240
+ // Provider-specific for Anthropic
241
+ 'ly.img.plugin-ai-text-generation-web.anthropic.property.prompt': 'Enter your text transformation prompt',
242
+ 'ly.img.plugin-ai-text-generation-web.anthropic.property.temperature': 'Response Creativity',
243
+ 'ly.img.plugin-ai-text-generation-web.anthropic.property.maxTokens': 'Max Response Length',
244
+
245
+ // Provider-specific for OpenAI
246
+ 'ly.img.plugin-ai-text-generation-web.openai.property.prompt': 'Describe your text transformation',
247
+ 'ly.img.plugin-ai-text-generation-web.openai.property.temperature': 'Creativity Setting',
248
+ 'ly.img.plugin-ai-text-generation-web.openai.property.maxTokens': 'Response Limit'
249
+ }
250
+ });
251
+ ```
252
+
253
+ #### QuickAction Translations
254
+
255
+ Text QuickActions (like "Improve Writing", "Fix Grammar", etc.) use their own translation keys with provider-specific overrides:
256
+
257
+ ```typescript
258
+ cesdk.i18n.setTranslations({
259
+ en: {
260
+ // Provider-specific translations (highest priority)
261
+ 'ly.img.plugin-ai-text-generation-web.anthropic.quickAction.improve': 'Improve with Claude',
262
+ 'ly.img.plugin-ai-text-generation-web.anthropic.quickAction.fix': 'Fix with Claude',
263
+ 'ly.img.plugin-ai-text-generation-web.openai.quickAction.translate': 'Translate with GPT',
264
+
265
+ // Generic plugin translations
266
+ 'ly.img.plugin-ai-text-generation-web.quickAction.improve': 'Improve Writing',
267
+ 'ly.img.plugin-ai-text-generation-web.quickAction.fix': 'Fix Grammar',
268
+ 'ly.img.plugin-ai-text-generation-web.quickAction.shorter': 'Make Shorter',
269
+ 'ly.img.plugin-ai-text-generation-web.quickAction.longer': 'Make Longer',
270
+ 'ly.img.plugin-ai-text-generation-web.quickAction.changeTone': 'Change Tone',
271
+ 'ly.img.plugin-ai-text-generation-web.quickAction.translate': 'Translate',
272
+ 'ly.img.plugin-ai-text-generation-web.quickAction.changeTextTo': 'Transform Text...',
273
+
274
+ // QuickAction input fields and buttons
275
+ 'ly.img.plugin-ai-text-generation-web.quickAction.changeTextTo.prompt': 'Transform Text...',
276
+ 'ly.img.plugin-ai-text-generation-web.quickAction.changeTextTo.prompt.placeholder': 'e.g. "Convert to bullet points"',
277
+ 'ly.img.plugin-ai-text-generation-web.quickAction.changeTextTo.apply': 'Transform',
278
+ 'ly.img.plugin-ai-text-generation-web.quickAction.translate.language': 'Target Language',
279
+ 'ly.img.plugin-ai-text-generation-web.quickAction.translate.apply': 'Translate'
280
+ }
281
+ });
282
+ ```
283
+
284
+ **QuickAction Translation Priority:**
285
+ 1. Provider-specific: `ly.img.plugin-ai-text-generation-web.${provider}.quickAction.${action}.${field}`
286
+ 2. Generic plugin: `ly.img.plugin-ai-text-generation-web.quickAction.${action}.${field}`
287
+
288
+ **Translation Structure:**
289
+ - Base key (e.g., `.quickAction.improve`): Button text when QuickAction is collapsed
290
+ - `.prompt`: Label for input field when expanded
291
+ - `.prompt.placeholder`: Placeholder text for input field
292
+ - `.apply`: Text for action/submit button
293
+ - Additional fields like `.language`: Custom field labels
294
+
194
295
  ### Configuration Options
195
296
 
196
297
  The plugin accepts the following configuration options:
@@ -410,6 +511,10 @@ cesdk.ui.setCanvasMenuOrder([
410
511
  ]);
411
512
  ```
412
513
 
514
+ ## Translations
515
+
516
+ For customization and localization, see the [translations.json](https://github.com/imgly/plugins/tree/main/packages/plugin-ai-text-generation-web/translations.json) file which contains provider-specific translation keys for text generation interfaces.
517
+
413
518
  ## Related Packages
414
519
 
415
520
  - [@imgly/plugin-ai-generation-web](https://github.com/imgly/plugins/tree/main/packages/plugin-ai-generation-web) - Core utilities for AI generation