@imgly/plugin-ai-image-generation-web 0.2.4 → 0.2.6
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 +22 -0
- package/README.md +186 -4
- package/dist/fal-ai/NanoBanana.d.ts +13 -0
- package/dist/fal-ai/NanoBananaEdit.d.ts +13 -0
- package/dist/fal-ai/RecraftV3.constants.d.ts +2 -2
- package/dist/fal-ai/RecraftV3.d.ts +5 -5
- package/dist/fal-ai/__tests__/RecraftV3.test.d.ts +1 -0
- package/dist/fal-ai/createFalClient.d.ts +3 -0
- package/dist/fal-ai/createImageProvider.d.ts +4 -1
- package/dist/fal-ai/index.d.ts +4 -0
- package/dist/fal-ai/index.mjs +10 -10
- package/dist/fal-ai/index.mjs.map +4 -4
- package/dist/fal-ai/utils.d.ts +3 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +4 -4
- package/dist/open-ai/index.mjs +2 -2
- package/dist/open-ai/index.mjs.map +4 -4
- package/dist/quickActions/ArtistTransfer.d.ts +1 -0
- package/dist/quickActions/CombineImages.d.ts +1 -0
- package/dist/quickActions/CreateVariant.d.ts +1 -0
- package/dist/quickActions/EditImage.d.ts +1 -0
- package/dist/quickActions/RemixPage.d.ts +1 -0
- package/dist/quickActions/RemixPageWithPrompt.d.ts +1 -0
- package/dist/quickActions/StyleTransfer.d.ts +1 -0
- package/dist/quickActions/SwapBackground.d.ts +1 -0
- package/dist/quickActions/__tests__/EditImage.test.d.ts +1 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.2.6] - 2025-09-09
|
|
6
|
+
|
|
7
|
+
### New Features
|
|
8
|
+
|
|
9
|
+
- [all] **Feature API Integration**: Added comprehensive Feature API support across all AI plugins to control visibility and availability of features through feature flags. Core features include `providerSelect`, `quickAction`, `quickAction.providerSelect`, `fromText`, and `fromImage` flags.
|
|
10
|
+
- [all] **Quick Action Feature Flags**: Each quick action now automatically registers and respects its own feature flag (e.g., `ly.img.plugin-ai-image-generation-web.quickAction.editImage`), allowing fine-grained control over which quick actions are available to users.
|
|
11
|
+
- [image-generation] **Provider Style Group Control**: Added Feature API support for Recraft providers to control style group visibility. RecraftV3 supports `style.image` and `style.vector` flags, while Recraft20b adds `style.icon` flag for controlling icon style availability.
|
|
12
|
+
- [all] **Provider Selection Feature Flags**: Added support for controlling provider selection UI in both panels (`providerSelect`) and quick actions (`quickAction.providerSelect`), with proper handling when multiple providers are configured.
|
|
13
|
+
|
|
14
|
+
## [0.2.5] - 2025-09-03
|
|
15
|
+
|
|
16
|
+
### New Features
|
|
17
|
+
|
|
18
|
+
- [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
|
|
19
|
+
- [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)
|
|
20
|
+
- [all] **AI Style Asset Library Translations**: AI style presets in asset libraries now automatically use localized names and descriptions from provider translation files, eliminating the need for manual translation configuration
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- [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
|
|
25
|
+
- [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
|
|
26
|
+
|
|
5
27
|
## [0.2.4] - 2025-08-07
|
|
6
28
|
|
|
7
29
|
### New Features
|
package/README.md
CHANGED
|
@@ -106,6 +106,13 @@ CreativeEditorSDK.create(domElement, {
|
|
|
106
106
|
'x-client-version': '1.0.0'
|
|
107
107
|
}
|
|
108
108
|
}),
|
|
109
|
+
FalAiImage.NanoBanana({
|
|
110
|
+
proxyUrl: 'http://your-proxy-server.com/api/proxy',
|
|
111
|
+
headers: {
|
|
112
|
+
'x-custom-header': 'value',
|
|
113
|
+
'x-client-version': '1.0.0'
|
|
114
|
+
}
|
|
115
|
+
}),
|
|
109
116
|
FalAiImage.Recraft20b({
|
|
110
117
|
proxyUrl: 'http://your-proxy-server.com/api/proxy',
|
|
111
118
|
headers: {
|
|
@@ -131,6 +138,13 @@ CreativeEditorSDK.create(domElement, {
|
|
|
131
138
|
'x-client-version': '1.0.0'
|
|
132
139
|
}
|
|
133
140
|
}),
|
|
141
|
+
FalAiImage.NanoBananaEdit({
|
|
142
|
+
proxyUrl: 'http://your-proxy-server.com/api/proxy',
|
|
143
|
+
headers: {
|
|
144
|
+
'x-custom-header': 'value',
|
|
145
|
+
'x-client-version': '1.0.0'
|
|
146
|
+
}
|
|
147
|
+
}),
|
|
134
148
|
OpenAiImage.GptImage1.Image2Image({
|
|
135
149
|
proxyUrl: 'http://your-proxy-server.com/api/proxy',
|
|
136
150
|
headers: {
|
|
@@ -173,6 +187,17 @@ Key features:
|
|
|
173
187
|
- Adjustable quality settings
|
|
174
188
|
- Custom headers support for API requests
|
|
175
189
|
|
|
190
|
+
**Style Group Control:**
|
|
191
|
+
You can control which style groups (image/vector) are available using the Feature API:
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
// Disable vector styles, only allow image styles
|
|
195
|
+
cesdk.feature.enable('ly.img.plugin-ai-image-generation-web.fal-ai/recraft-v3.style.vector', false);
|
|
196
|
+
|
|
197
|
+
// Or disable image styles, only allow vector styles
|
|
198
|
+
cesdk.feature.enable('ly.img.plugin-ai-image-generation-web.fal-ai/recraft-v3.style.image', false);
|
|
199
|
+
```
|
|
200
|
+
|
|
176
201
|
**Custom Translations:**
|
|
177
202
|
```typescript
|
|
178
203
|
cesdk.i18n.setTranslations({
|
|
@@ -207,6 +232,20 @@ Key features:
|
|
|
207
232
|
- Same image size presets and custom dimensions support
|
|
208
233
|
- Cost-effective alternative to RecraftV3
|
|
209
234
|
|
|
235
|
+
**Style Group Control:**
|
|
236
|
+
You can control which style groups (image/vector/icon) are available using the Feature API:
|
|
237
|
+
|
|
238
|
+
```typescript
|
|
239
|
+
// Only allow icon styles
|
|
240
|
+
cesdk.feature.enable('ly.img.plugin-ai-image-generation-web.fal-ai/recraft/v2/text-to-image.style.image', false);
|
|
241
|
+
cesdk.feature.enable('ly.img.plugin-ai-image-generation-web.fal-ai/recraft/v2/text-to-image.style.vector', false);
|
|
242
|
+
|
|
243
|
+
// Only allow image and vector styles (disable icon)
|
|
244
|
+
cesdk.feature.enable('ly.img.plugin-ai-image-generation-web.fal-ai/recraft/v2/text-to-image.style.icon', false);
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Note: When all style groups are disabled, the provider automatically falls back to the 'any' style.
|
|
248
|
+
|
|
210
249
|
**Custom Translations:**
|
|
211
250
|
```typescript
|
|
212
251
|
cesdk.i18n.setTranslations({
|
|
@@ -364,6 +403,73 @@ Key features:
|
|
|
364
403
|
- Maintains original dimensions
|
|
365
404
|
- Canvas quick-action integration
|
|
366
405
|
|
|
406
|
+
#### 9. NanoBanana (Text-to-Image)
|
|
407
|
+
|
|
408
|
+
A fast and efficient text-to-image model from fal.ai that generates high-quality images:
|
|
409
|
+
|
|
410
|
+
```typescript
|
|
411
|
+
text2image: FalAiImage.NanoBanana({
|
|
412
|
+
proxyUrl: 'http://your-proxy-server.com/api/proxy',
|
|
413
|
+
headers: {
|
|
414
|
+
'x-custom-header': 'value',
|
|
415
|
+
'x-client-version': '1.0.0'
|
|
416
|
+
}
|
|
417
|
+
})
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
Key features:
|
|
421
|
+
- Fast generation times for quick prototyping
|
|
422
|
+
- High-quality image output at 1024×1024 resolution
|
|
423
|
+
- Simple prompt-based interface
|
|
424
|
+
- Support for multiple output formats (JPEG, PNG)
|
|
425
|
+
- Configurable number of images (1-4)
|
|
426
|
+
- Supports page remixing with custom prompts
|
|
427
|
+
- Custom headers support for API requests
|
|
428
|
+
|
|
429
|
+
**Custom Translations:**
|
|
430
|
+
```typescript
|
|
431
|
+
cesdk.i18n.setTranslations({
|
|
432
|
+
en: {
|
|
433
|
+
'ly.img.plugin-ai-image-generation-web.fal-ai/nano-banana.property.prompt': 'Describe your image',
|
|
434
|
+
'ly.img.plugin-ai-image-generation-web.fal-ai/nano-banana.property.num_images': 'Number of Images',
|
|
435
|
+
'ly.img.plugin-ai-image-generation-web.fal-ai/nano-banana.property.output_format': 'Output Format'
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
#### 10. NanoBananaEdit (Image-to-Image)
|
|
441
|
+
|
|
442
|
+
An image editing model from fal.ai that transforms existing images using text prompts:
|
|
443
|
+
|
|
444
|
+
```typescript
|
|
445
|
+
image2image: FalAiImage.NanoBananaEdit({
|
|
446
|
+
proxyUrl: 'http://your-proxy-server.com/api/proxy',
|
|
447
|
+
headers: {
|
|
448
|
+
'x-custom-header': 'value',
|
|
449
|
+
'x-client-version': '1.0.0'
|
|
450
|
+
}
|
|
451
|
+
})
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Key features:
|
|
455
|
+
- Edit existing images with text prompts
|
|
456
|
+
- Supports combining multiple images (up to 10 images)
|
|
457
|
+
- Maintains original image dimensions automatically
|
|
458
|
+
- Supports all standard image editing quick actions
|
|
459
|
+
- Fast processing times
|
|
460
|
+
- Canvas quick-action integration
|
|
461
|
+
- Custom headers support for API requests
|
|
462
|
+
|
|
463
|
+
**Custom Translations:**
|
|
464
|
+
```typescript
|
|
465
|
+
cesdk.i18n.setTranslations({
|
|
466
|
+
en: {
|
|
467
|
+
'ly.img.plugin-ai-image-generation-web.fal-ai/nano-banana/edit.property.prompt': 'Edit instructions',
|
|
468
|
+
'ly.img.plugin-ai-image-generation-web.fal-ai/nano-banana/edit.property.image_url': 'Source Image'
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
```
|
|
472
|
+
|
|
367
473
|
### Customizing Labels and Translations
|
|
368
474
|
|
|
369
475
|
You can customize all labels and text in the AI image generation interface using the translation system. This allows you to provide better labels for your users in any language.
|
|
@@ -401,22 +507,27 @@ cesdk.i18n.setTranslations({
|
|
|
401
507
|
|
|
402
508
|
#### QuickAction Translations
|
|
403
509
|
|
|
404
|
-
QuickActions (like "Edit Image", "Style Transfer", etc.) use their own translation keys:
|
|
510
|
+
QuickActions (like "Edit Image", "Style Transfer", etc.) use their own translation keys with provider-specific overrides:
|
|
405
511
|
|
|
406
512
|
```typescript
|
|
407
513
|
cesdk.i18n.setTranslations({
|
|
408
514
|
en: {
|
|
409
|
-
//
|
|
515
|
+
// Provider-specific translations (highest priority)
|
|
516
|
+
'ly.img.plugin-ai-image-generation-web.fal-ai/gemini-flash-edit.quickAction.editImage': 'Edit with Gemini',
|
|
517
|
+
'ly.img.plugin-ai-image-generation-web.fal-ai/flux-pro/kontext.quickAction.styleTransfer': 'Style with Flux Pro Kontext',
|
|
518
|
+
'ly.img.plugin-ai-image-generation-web.open-ai/gpt-image-1/image2image.quickAction.editImage': 'Edit with GPT',
|
|
519
|
+
|
|
520
|
+
// Generic plugin translations
|
|
410
521
|
'ly.img.plugin-ai-image-generation-web.quickAction.editImage': 'Edit Image...',
|
|
411
522
|
'ly.img.plugin-ai-image-generation-web.quickAction.swapBackground': 'Swap Background...',
|
|
412
523
|
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer': 'Style Transfer...',
|
|
413
524
|
'ly.img.plugin-ai-image-generation-web.quickAction.createVariant': 'Create Variant...',
|
|
525
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer': 'Painted By...',
|
|
414
526
|
|
|
415
527
|
// QuickAction input fields and buttons
|
|
416
528
|
'ly.img.plugin-ai-image-generation-web.quickAction.editImage.prompt': 'Edit Image...',
|
|
417
529
|
'ly.img.plugin-ai-image-generation-web.quickAction.editImage.prompt.placeholder': 'e.g. "Add a sunset"',
|
|
418
530
|
'ly.img.plugin-ai-image-generation-web.quickAction.editImage.apply': 'Change',
|
|
419
|
-
|
|
420
531
|
'ly.img.plugin-ai-image-generation-web.quickAction.swapBackground.prompt': 'Swap Background...',
|
|
421
532
|
'ly.img.plugin-ai-image-generation-web.quickAction.swapBackground.prompt.placeholder': 'e.g. "Beach at sunset"',
|
|
422
533
|
'ly.img.plugin-ai-image-generation-web.quickAction.swapBackground.apply': 'Swap'
|
|
@@ -424,12 +535,59 @@ cesdk.i18n.setTranslations({
|
|
|
424
535
|
});
|
|
425
536
|
```
|
|
426
537
|
|
|
427
|
-
**QuickAction Translation
|
|
538
|
+
**QuickAction Translation Priority:**
|
|
539
|
+
1. Provider-specific: `ly.img.plugin-ai-image-generation-web.${provider}.quickAction.${action}.${field}`
|
|
540
|
+
2. Generic plugin: `ly.img.plugin-ai-image-generation-web.quickAction.${action}.${field}`
|
|
541
|
+
|
|
542
|
+
**Translation Structure:**
|
|
428
543
|
- Base key (e.g., `.quickAction.editImage`): Button text when QuickAction is collapsed
|
|
429
544
|
- `.prompt`: Label for input field when expanded
|
|
430
545
|
- `.prompt.placeholder`: Placeholder text for input field
|
|
431
546
|
- `.apply`: Text for action/submit button
|
|
432
547
|
|
|
548
|
+
#### QuickAction Dropdown Options
|
|
549
|
+
|
|
550
|
+
Some QuickActions like Artist Transfer and Style Transfer include dropdown menus with predefined options. You can customize these dropdown labels using provider-specific translation keys:
|
|
551
|
+
|
|
552
|
+
```typescript
|
|
553
|
+
cesdk.i18n.setTranslations({
|
|
554
|
+
en: {
|
|
555
|
+
// Artist Transfer dropdown options (provider-specific)
|
|
556
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.van-gogh': 'Van Gogh',
|
|
557
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.monet': 'Monet',
|
|
558
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.picasso': 'Picasso',
|
|
559
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.dali': 'Dalí',
|
|
560
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.matisse': 'Matisse',
|
|
561
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.warhol': 'Warhol',
|
|
562
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.michelangelo': 'Michelangelo',
|
|
563
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.da-vinci': 'Da Vinci',
|
|
564
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.rembrandt': 'Rembrandt',
|
|
565
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.mondrian': 'Mondrian',
|
|
566
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.kahlo': 'Frida Kahlo',
|
|
567
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.fal-ai/gemini-flash-edit.property.artist.hokusai': 'Hokusai',
|
|
568
|
+
|
|
569
|
+
// Style Transfer dropdown options (provider-specific)
|
|
570
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer.fal-ai/gemini-flash-edit.property.style.water': 'Watercolor Painting',
|
|
571
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer.fal-ai/gemini-flash-edit.property.style.oil': 'Oil Painting',
|
|
572
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer.fal-ai/gemini-flash-edit.property.style.charcoal': 'Charcoal Sketch',
|
|
573
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer.fal-ai/gemini-flash-edit.property.style.pencil': 'Pencil Drawing',
|
|
574
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer.fal-ai/gemini-flash-edit.property.style.pastel': 'Pastel Artwork',
|
|
575
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer.fal-ai/gemini-flash-edit.property.style.ink': 'Ink Wash',
|
|
576
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer.fal-ai/gemini-flash-edit.property.style.stained-glass': 'Stained Glass Window',
|
|
577
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer.fal-ai/gemini-flash-edit.property.style.japanese': 'Japanese Woodblock Print',
|
|
578
|
+
|
|
579
|
+
// Generic fallback options (applies to all providers)
|
|
580
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.artistTransfer.property.artist.van-gogh': 'Van Gogh',
|
|
581
|
+
'ly.img.plugin-ai-image-generation-web.quickAction.styleTransfer.property.style.water': 'Watercolor Painting'
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
The system checks for translations in this order (highest to lowest priority):
|
|
587
|
+
|
|
588
|
+
1. **Provider-specific**: `ly.img.plugin-ai-image-generation-web.quickAction.${actionName}.${providerId}.property.${field}.${option}` - Override labels for a specific AI provider
|
|
589
|
+
2. **Generic**: `ly.img.plugin-ai-image-generation-web.quickAction.${actionName}.property.${field}.${option}` - Override labels for all AI plugins
|
|
590
|
+
|
|
433
591
|
### Configuration Options
|
|
434
592
|
|
|
435
593
|
The plugin accepts the following configuration options:
|
|
@@ -677,6 +835,26 @@ FalAiImage.FluxProKontextMaxEdit(config: {
|
|
|
677
835
|
})
|
|
678
836
|
```
|
|
679
837
|
|
|
838
|
+
#### NanoBanana
|
|
839
|
+
|
|
840
|
+
```typescript
|
|
841
|
+
FalAiImage.NanoBanana(config: {
|
|
842
|
+
proxyUrl: string;
|
|
843
|
+
headers?: Record<string, string>;
|
|
844
|
+
debug?: boolean;
|
|
845
|
+
})
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
#### NanoBananaEdit
|
|
849
|
+
|
|
850
|
+
```typescript
|
|
851
|
+
FalAiImage.NanoBananaEdit(config: {
|
|
852
|
+
proxyUrl: string;
|
|
853
|
+
headers?: Record<string, string>;
|
|
854
|
+
debug?: boolean;
|
|
855
|
+
})
|
|
856
|
+
```
|
|
857
|
+
|
|
680
858
|
## UI Integration
|
|
681
859
|
|
|
682
860
|
The plugin automatically registers the following UI components:
|
|
@@ -769,6 +947,8 @@ const myImageProvider = {
|
|
|
769
947
|
- GptImage1.Image2Image: `ly.img.ai.open-ai/gpt-image-1/image2image`
|
|
770
948
|
- FluxProKontextEdit: `ly.img.ai.fal-ai/flux-pro/kontext`
|
|
771
949
|
- FluxProKontextMaxEdit: `ly.img.ai.fal-ai/flux-pro/kontext/max`
|
|
950
|
+
- NanoBanana: `ly.img.ai.fal-ai/nano-banana`
|
|
951
|
+
- NanoBananaEdit: `ly.img.ai.fal-ai/nano-banana/edit`
|
|
772
952
|
|
|
773
953
|
### Asset History
|
|
774
954
|
|
|
@@ -782,6 +962,8 @@ Generated images are automatically stored in asset sources with the following ID
|
|
|
782
962
|
- GptImage1.Image2Image: `open-ai/gpt-image-1/image2image.history`
|
|
783
963
|
- FluxProKontextEdit: `fal-ai/flux-pro/kontext.history`
|
|
784
964
|
- FluxProKontextMaxEdit: `fal-ai/flux-pro/kontext/max.history`
|
|
965
|
+
- NanoBanana: `fal-ai/nano-banana.history`
|
|
966
|
+
- NanoBananaEdit: `fal-ai/nano-banana/edit.history`
|
|
785
967
|
|
|
786
968
|
### Dock Integration
|
|
787
969
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ImageOutput, CommonProviderConfiguration, type Provider } from '@imgly/plugin-ai-generation-web';
|
|
2
|
+
import CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
3
|
+
type NanoBananaInput = {
|
|
4
|
+
prompt: string;
|
|
5
|
+
num_images?: number;
|
|
6
|
+
sync_mode?: boolean;
|
|
7
|
+
output_format?: 'jpeg' | 'png';
|
|
8
|
+
};
|
|
9
|
+
export declare function NanoBanana(config: CommonProviderConfiguration<NanoBananaInput, ImageOutput>): (context: {
|
|
10
|
+
cesdk: CreativeEditorSDK;
|
|
11
|
+
}) => Promise<Provider<'image', NanoBananaInput, ImageOutput>>;
|
|
12
|
+
declare function getProvider(cesdk: CreativeEditorSDK, config: CommonProviderConfiguration<NanoBananaInput, ImageOutput>): Provider<'image', NanoBananaInput, ImageOutput>;
|
|
13
|
+
export default getProvider;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ImageOutput, type Provider, type CommonProviderConfiguration } from '@imgly/plugin-ai-generation-web';
|
|
2
|
+
import CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
3
|
+
type NanoBananaEditInput = {
|
|
4
|
+
prompt: string;
|
|
5
|
+
image_url?: string;
|
|
6
|
+
image_urls?: string[];
|
|
7
|
+
exportFromBlockIds?: number[];
|
|
8
|
+
};
|
|
9
|
+
export declare function NanoBananaEdit(config: CommonProviderConfiguration<NanoBananaEditInput, ImageOutput>): (context: {
|
|
10
|
+
cesdk: CreativeEditorSDK;
|
|
11
|
+
}) => Promise<Provider<'image', NanoBananaEditInput, ImageOutput>>;
|
|
12
|
+
declare function getProvider(cesdk: CreativeEditorSDK, config: CommonProviderConfiguration<NanoBananaEditInput, ImageOutput>): Provider<'image', NanoBananaEditInput, ImageOutput>;
|
|
13
|
+
export default getProvider;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RecraftV3TextToImageInput } from '@fal-ai/client/endpoints';
|
|
2
2
|
export declare function getImageDimensions(id: string): {
|
|
3
3
|
width: number;
|
|
4
4
|
height: number;
|
|
5
5
|
};
|
|
6
|
-
export type StyleId = Extract<
|
|
6
|
+
export type StyleId = Extract<RecraftV3TextToImageInput['style'], string>;
|
|
7
7
|
export declare const STYLES_IMAGE: {
|
|
8
8
|
id: StyleId;
|
|
9
9
|
label: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CommonProviderConfiguration, type Provider } from '@imgly/plugin-ai-generation-web';
|
|
2
|
-
import { type
|
|
2
|
+
import { type RecraftV3TextToImageInput } from '@fal-ai/client/endpoints';
|
|
3
3
|
import CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
4
4
|
type RecraftV3Output = {
|
|
5
5
|
kind: 'image';
|
|
6
6
|
url: string;
|
|
7
7
|
};
|
|
8
|
-
export type StyleId = Extract<
|
|
9
|
-
interface ProviderConfiguration extends CommonProviderConfiguration<
|
|
8
|
+
export type StyleId = Extract<RecraftV3TextToImageInput['style'], string>;
|
|
9
|
+
interface ProviderConfiguration extends CommonProviderConfiguration<RecraftV3TextToImageInput, RecraftV3Output> {
|
|
10
10
|
/**
|
|
11
11
|
* Base URL used for the UI assets used in the plugin.
|
|
12
12
|
*
|
|
@@ -17,6 +17,6 @@ interface ProviderConfiguration extends CommonProviderConfiguration<RecraftV3Inp
|
|
|
17
17
|
}
|
|
18
18
|
export declare function RecraftV3(config: ProviderConfiguration): (context: {
|
|
19
19
|
cesdk: CreativeEditorSDK;
|
|
20
|
-
}) => Promise<Provider<'image',
|
|
21
|
-
declare function getProvider(cesdk: CreativeEditorSDK, config: ProviderConfiguration): Provider<'image',
|
|
20
|
+
}) => Promise<Provider<'image', RecraftV3TextToImageInput, RecraftV3Output>>;
|
|
21
|
+
declare function getProvider(cesdk: CreativeEditorSDK, config: ProviderConfiguration): Provider<'image', RecraftV3TextToImageInput, RecraftV3Output>;
|
|
22
22
|
export default getProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -25,7 +25,10 @@ type ImageProviderConfiguration = {
|
|
|
25
25
|
* Creates a base provider from schema. This should work out of the box
|
|
26
26
|
* but may be rough around the edges and should/can be further customized.
|
|
27
27
|
*/
|
|
28
|
-
declare function createImageProvider<I extends Record<string, any
|
|
28
|
+
declare function createImageProvider<I extends Record<string, any> & {
|
|
29
|
+
image_url?: string;
|
|
30
|
+
image_urls?: string[];
|
|
31
|
+
}>(options: {
|
|
29
32
|
modelKey: string;
|
|
30
33
|
name?: string;
|
|
31
34
|
schema: OpenAPIV3.Document;
|
package/dist/fal-ai/index.d.ts
CHANGED
|
@@ -5,12 +5,16 @@ import { FluxProKontextEdit } from './FluxProKontextEdit';
|
|
|
5
5
|
import { FluxProKontextMaxEdit } from './FluxProKontextMaxEdit';
|
|
6
6
|
import { IdeogramV3 } from './IdeogramV3';
|
|
7
7
|
import { IdeogramV3Remix } from './IdeogramV3Remix';
|
|
8
|
+
import { NanoBanana } from './NanoBanana';
|
|
9
|
+
import { NanoBananaEdit } from './NanoBananaEdit';
|
|
8
10
|
declare const FalAi: {
|
|
9
11
|
FluxProKontextEdit: typeof FluxProKontextEdit;
|
|
10
12
|
FluxProKontextMaxEdit: typeof FluxProKontextMaxEdit;
|
|
11
13
|
GeminiFlashEdit: typeof GeminiFlashEdit;
|
|
12
14
|
IdeogramV3: typeof IdeogramV3;
|
|
13
15
|
IdeogramV3Remix: typeof IdeogramV3Remix;
|
|
16
|
+
NanoBanana: typeof NanoBanana;
|
|
17
|
+
NanoBananaEdit: typeof NanoBananaEdit;
|
|
14
18
|
Recraft20b: typeof Recraft20b;
|
|
15
19
|
RecraftV3: typeof RecraftV3;
|
|
16
20
|
};
|