@imgly/plugin-ai-text-generation-web 0.2.8 → 0.2.9
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 +27 -0
- package/README.md +37 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/anthropic/index.mjs +10 -10
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +3 -3
- package/dist/open-ai/index.mjs +8 -8
- package/dist/open-ai/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.2.9] - 2025-10-16
|
|
6
|
+
|
|
7
|
+
### New Features
|
|
8
|
+
|
|
9
|
+
- [image-generation] **GeminiFlash25 Provider**: Added Google Gemini Flash 2.5 text-to-image provider via fal.ai with fast generation times, multiple aspect ratios (1:1, 3:4, 4:3, 9:16, 16:9), custom dimensions support, and multiple output formats (JPEG, PNG, WEBP)
|
|
10
|
+
- [image-generation] **Gemini25FlashImageEdit Provider**: Added Google Gemini 2.5 Flash Image Edit provider via fal.ai for advanced image editing with multi-image support (1-10 images), comprehensive quick actions support (editImage, swapBackground, styleTransfer, artistTransfer, createVariant, combineImages, remixPage, remixPageWithPrompt), text-based editing instructions, and fast processing times
|
|
11
|
+
|
|
12
|
+
### Improvements
|
|
13
|
+
|
|
14
|
+
- [generation-web] **Middleware preventDefault() API**: Added `options.preventDefault()` method to suppress default UI feedback (notifications, block states, console logging) when handling errors in custom middleware
|
|
15
|
+
- [all] **Internationalization Support**: All hardcoded strings across AI plugins have been removed and replaced with translation keys, enabling full localization support for plugin labels, actions, styles, and error messages
|
|
16
|
+
- [all] **Translation Keys Available**: Added comprehensive translation keys for:
|
|
17
|
+
- Panel and dock labels (AI Image, AI Video, AI Sticker, AI Voice, Sound Generation)
|
|
18
|
+
- Action labels (Generate Image, Generate Video, Generate Sticker)
|
|
19
|
+
- Style transfer options (None, Anime, Cyberpunk, Kodak 400, Watercolor, Dark Fantasy, Vaporwave, Vector Flat, 3D Animation, Ukiyo-e, Surreal, Steampunk, Night Bokeh, Pop Art)
|
|
20
|
+
- Error messages and UI elements
|
|
21
|
+
- [all] **Backwards Compatibility**: Translation system automatically detects CE.SDK version and gracefully falls back to English strings for CE.SDK versions < 1.59.0, ensuring no breaking changes for existing integrations
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- [generation-web] **Placeholder Block Error State**: Fixed placeholder blocks getting stuck in Pending state when generation fails or is aborted. Blocks are now properly destroyed when generation is aborted, or moved to Error state when generation fails, preventing perpetual loading spinners in the UI.
|
|
26
|
+
- [generation-web] **Middleware Block Targeting**: Fixed middleware to correctly receive block IDs for placeholder blocks and quick action targets. Previously, middleware would fall back to `findAllSelected()` which could target incorrect blocks if the selection changed during generation. Now placeholder blocks created during panel generation and target blocks from quick actions are explicitly passed to middleware, ensuring operations like pending state, locking, and highlighting affect the correct blocks.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- [generation-web] **BlockIds Type Refinement**: Removed unused `| null` type from `blockIds` parameter in `GenerationOptions` and `Generate` function signature. The `null` value was documented but never implemented or used. Use an empty array `[]` instead of `null` to explicitly target no blocks.
|
|
31
|
+
|
|
5
32
|
## [0.2.8] - 2025-09-29
|
|
6
33
|
|
|
7
34
|
### New Features
|
package/README.md
CHANGED
|
@@ -397,6 +397,43 @@ Built-in middleware options:
|
|
|
397
397
|
|
|
398
398
|
You can also create custom middleware functions to meet your specific needs.
|
|
399
399
|
|
|
400
|
+
#### Preventing Default Feedback
|
|
401
|
+
|
|
402
|
+
Middleware can suppress default UI feedback behaviors using `options.preventDefault()`:
|
|
403
|
+
|
|
404
|
+
```typescript
|
|
405
|
+
const customErrorMiddleware = async (input, options, next) => {
|
|
406
|
+
try {
|
|
407
|
+
return await next(input, options);
|
|
408
|
+
} catch (error) {
|
|
409
|
+
// Prevent default error notification
|
|
410
|
+
options.preventDefault();
|
|
411
|
+
|
|
412
|
+
// Show custom error notification
|
|
413
|
+
options.cesdk?.ui.showNotification({
|
|
414
|
+
type: 'error',
|
|
415
|
+
message: `Text generation failed: ${error.message}`,
|
|
416
|
+
action: {
|
|
417
|
+
label: 'Try Again',
|
|
418
|
+
onClick: () => {/* retry logic */}
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
throw error;
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**What gets prevented:**
|
|
428
|
+
- Error/success notifications
|
|
429
|
+
- Block error state
|
|
430
|
+
- Console error logging
|
|
431
|
+
|
|
432
|
+
**What is NOT prevented:**
|
|
433
|
+
- Pending → Ready transition (loading spinner always stops)
|
|
434
|
+
|
|
435
|
+
For more details, see the [@imgly/plugin-ai-generation-web documentation](https://github.com/imgly/plugins/tree/main/packages/plugin-ai-generation-web#preventing-default-feedback).
|
|
436
|
+
|
|
400
437
|
### Using a Proxy
|
|
401
438
|
|
|
402
439
|
For security reasons, you must use a proxy server to handle API requests to Anthropic. The proxy URL is required when configuring providers:
|