@imgly/plugin-ai-image-generation-web 0.2.6 → 0.2.7

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,6 +2,24 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.2.7] - 2025-09-26
6
+
7
+ ### New Features
8
+
9
+ - [image-generation] **QwenImageEdit Provider**: Added Qwen image editing provider via fal.ai for advanced image-to-image transformation with text prompts, supporting all standard quick actions
10
+ - [video-generation] **MinimaxHailuo02StandardImageToVideo Provider**: Added Minimax Hailuo-02 Standard image-to-video provider via fal.ai for transforming still images into videos with selectable resolutions (512P: 912×512, 768P: 1280×720) and adjustable durations (6 or 10 seconds)
11
+ - [video-generation] **ByteDance Seedance v1 Pro Providers**: Added ByteDance Seedance v1 Pro text-to-video and image-to-video providers via fal.ai with:
12
+ - Text-to-video generation from text descriptions with customizable aspect ratios
13
+ - Image-to-video transformation with dynamic motion generation from still images
14
+ - Multiple aspect ratio options (21:9, 16:9, 4:3, 1:1, 3:4, 9:16, or auto from image for i2v)
15
+ - Adjustable duration (3-12 seconds, default 5)
16
+ - Resolution options (480p, 720p, 1080p)
17
+ - Proper aspect ratio handling in placeholder blocks based on user selection
18
+
19
+ - [all] **Property Configuration System**: Providers can now define default values for their properties. Defaults can be static values or dynamic based on context (language, design state, etc.)
20
+
21
+ - [image-generation] **Recraft Provider Defaults**: Recraft providers (V3 and 20b) now support configurable default values for all properties, including dynamic style defaults based on the selected style type
22
+
5
23
  ## [0.2.6] - 2025-09-09
6
24
 
7
25
  ### New Features
package/README.md CHANGED
@@ -176,6 +176,11 @@ text2image: FalAiImage.RecraftV3({
176
176
  headers: {
177
177
  'x-custom-header': 'value',
178
178
  'x-client-version': '1.0.0'
179
+ },
180
+ // Optional: Configure default property values
181
+ properties: {
182
+ style: 'realistic_image', // Default style
183
+ image_size: 'square_hd' // Default size
179
184
  }
180
185
  })
181
186
  ```
@@ -187,6 +192,95 @@ Key features:
187
192
  - Adjustable quality settings
188
193
  - Custom headers support for API requests
189
194
 
195
+ **Available Property Values:**
196
+
197
+ ```typescript
198
+ // image_size options:
199
+ 'square_hd' // 1024x1024 (default)
200
+ 'square' // 512x512
201
+ 'portrait_4_3' // 768x1024
202
+ 'portrait_16_9' // 576x1024
203
+ 'landscape_4_3' // 1024x768
204
+ 'landscape_16_9' // 1024x576
205
+
206
+ // style options (grouped by category):
207
+ // Base styles:
208
+ 'any' // Let model decide
209
+ 'realistic_image' // Photorealistic (default)
210
+ 'digital_illustration' // Digital art
211
+ 'vector_illustration' // Vector graphics
212
+
213
+ // Realistic substyles:
214
+ 'realistic_image/b_and_w' // Black and white
215
+ 'realistic_image/hard_flash' // Hard flash photography
216
+ 'realistic_image/hdr' // HDR photography
217
+ 'realistic_image/natural_light' // Natural lighting
218
+ 'realistic_image/studio_portrait' // Studio portrait
219
+ 'realistic_image/enterprise' // Business/corporate
220
+ 'realistic_image/motion_blur' // Motion blur effect
221
+ 'realistic_image/evening_light' // Evening lighting
222
+ 'realistic_image/faded_nostalgia' // Nostalgic/faded look
223
+ 'realistic_image/forest_life' // Forest/nature
224
+ 'realistic_image/mystic_naturalism' // Mystic nature
225
+ 'realistic_image/natural_tones' // Natural color tones
226
+ 'realistic_image/organic_calm' // Organic/calm aesthetic
227
+ 'realistic_image/real_life_glow' // Natural glow
228
+ 'realistic_image/retro_realism' // Retro realistic
229
+ 'realistic_image/retro_snapshot' // Retro photo
230
+ 'realistic_image/urban_drama' // Urban/dramatic
231
+ 'realistic_image/village_realism' // Village/rural
232
+ 'realistic_image/warm_folk' // Warm/folk style
233
+
234
+ // Digital illustration substyles:
235
+ 'digital_illustration/pixel_art' // Pixel art
236
+ 'digital_illustration/hand_drawn' // Hand-drawn
237
+ 'digital_illustration/grain' // Grainy texture
238
+ 'digital_illustration/infantile_sketch' // Child-like sketch
239
+ 'digital_illustration/2d_art_poster' // 2D poster art
240
+ 'digital_illustration/handmade_3d' // Handmade 3D look
241
+ 'digital_illustration/hand_drawn_outline' // Hand-drawn outline
242
+ 'digital_illustration/engraving_color' // Color engraving
243
+ 'digital_illustration/2d_art_poster_2' // Alternative poster style
244
+ 'digital_illustration/antiquarian' // Antique/vintage
245
+ 'digital_illustration/bold_fantasy' // Bold fantasy art
246
+ 'digital_illustration/child_book' // Children's book
247
+ 'digital_illustration/child_books' // Children's book alt
248
+ 'digital_illustration/cover' // Book/album cover
249
+ 'digital_illustration/crosshatch' // Crosshatching
250
+ 'digital_illustration/digital_engraving' // Digital engraving
251
+ 'digital_illustration/expressionism' // Expressionist
252
+ // ... and many more digital illustration styles
253
+
254
+ // Vector illustration substyles:
255
+ 'vector_illustration/cartoon' // Cartoon style
256
+ 'vector_illustration/kawaii' // Kawaii/cute
257
+ 'vector_illustration/comic' // Comic book
258
+ 'vector_illustration/line_art' // Line art
259
+ 'vector_illustration/noir_silhouette' // Noir silhouette
260
+ ```
261
+
262
+ **Configuration Example with All Properties:**
263
+
264
+ ```typescript
265
+ text2image: FalAiImage.RecraftV3({
266
+ proxyUrl: 'http://your-proxy-server.com/api/proxy',
267
+ properties: {
268
+ prompt: '', // User will fill this
269
+ style: 'realistic_image/natural_light',
270
+ image_size: 'landscape_16_9',
271
+
272
+ // Dynamic style based on context
273
+ style: (context) => {
274
+ const hour = new Date().getHours();
275
+ if (hour < 6 || hour > 18) {
276
+ return 'realistic_image/evening_light';
277
+ }
278
+ return 'realistic_image/natural_light';
279
+ }
280
+ }
281
+ })
282
+ ```
283
+
190
284
  **Style Group Control:**
191
285
  You can control which style groups (image/vector) are available using the Feature API:
192
286
 
@@ -221,6 +315,17 @@ text2image: FalAiImage.Recraft20b({
221
315
  headers: {
222
316
  'x-custom-header': 'value',
223
317
  'x-client-version': '1.0.0'
318
+ },
319
+ // Optional: Configure default property values
320
+ properties: {
321
+ // Dynamic style defaults based on style type
322
+ style: (context) => {
323
+ // Different defaults for different style categories
324
+ // This is handled internally by the provider
325
+ return 'broken_line'; // Default for icon styles
326
+ },
327
+ image_size: 'square_hd',
328
+ n_colors: 4 // Default color count for icon styles
224
329
  }
225
330
  })
226
331
  ```
@@ -232,6 +337,65 @@ Key features:
232
337
  - Same image size presets and custom dimensions support
233
338
  - Cost-effective alternative to RecraftV3
234
339
 
340
+ **Available Property Values:**
341
+
342
+ ```typescript
343
+ // image_size options (same as RecraftV3):
344
+ 'square_hd' // 1024x1024 (default)
345
+ 'square' // 512x512
346
+ 'portrait_4_3' // 768x1024
347
+ 'portrait_16_9' // 576x1024
348
+ 'landscape_4_3' // 1024x768
349
+ 'landscape_16_9' // 1024x576
350
+
351
+ // style options - includes all RecraftV3 styles PLUS icon styles:
352
+ // All RecraftV3 styles are supported (see RecraftV3 above)
353
+
354
+ // Additional Icon styles (unique to Recraft20b):
355
+ 'icon/broken_line' // Broken line icon style
356
+ 'icon/colored_outline' // Colored outline icons
357
+ 'icon/colored_shapes' // Solid colored shapes
358
+ 'icon/colored_shapes_gradient' // Gradient colored shapes
359
+ 'icon/doodle_fill' // Doodle-filled icons
360
+ 'icon/doodle_offset_fill' // Offset doodle fill
361
+ 'icon/offset_fill' // Offset fill style
362
+ 'icon/outline' // Simple outline
363
+ 'icon/outline_gradient' // Gradient outline
364
+ 'icon/uneven_fill' // Uneven/artistic fill
365
+
366
+ // Logo styles:
367
+ 'logo' // Logo design
368
+
369
+ // n_colors options (for icon styles):
370
+ 1 // Monochrome
371
+ 2 // Two colors (default)
372
+ 3 // Three colors
373
+ 4 // Four colors
374
+ // ... up to any reasonable number
375
+ ```
376
+
377
+ **Configuration Example with All Properties:**
378
+
379
+ ```typescript
380
+ text2image: FalAiImage.Recraft20b({
381
+ proxyUrl: 'http://your-proxy-server.com/api/proxy',
382
+ properties: {
383
+ prompt: '', // User will fill this
384
+ style: 'icon/colored_outline', // Default to icon style
385
+ image_size: 'square',
386
+ n_colors: 3, // Number of colors for icon styles
387
+
388
+ // Dynamic style based on use case
389
+ style: (context) => {
390
+ // You could check block type or other context
391
+ const engine = context.engine;
392
+ // Return appropriate style
393
+ return 'icon/broken_line';
394
+ }
395
+ }
396
+ })
397
+ ```
398
+
235
399
  **Style Group Control:**
236
400
  You can control which style groups (image/vector/icon) are available using the Feature API:
237
401
 
@@ -270,6 +434,12 @@ text2image: OpenAiImage.GptImage1.Text2Image({
270
434
  headers: {
271
435
  'x-api-key': 'your-key',
272
436
  'x-request-source': 'cesdk-plugin'
437
+ },
438
+ // Optional: Configure default property values
439
+ properties: {
440
+ size: '1024x1024', // Options: '1024x1024', '1792x1024', '1024x1792'
441
+ quality: 'standard', // Options: 'standard', 'hd'
442
+ style: 'vivid' // Options: 'vivid', 'natural'
273
443
  }
274
444
  })
275
445
  ```
@@ -291,6 +461,12 @@ image2image: FalAiImage.GeminiFlashEdit({
291
461
  headers: {
292
462
  'x-custom-header': 'value',
293
463
  'x-client-version': '1.0.0'
464
+ },
465
+ // Optional: Configure default property values
466
+ properties: {
467
+ strength: 0.8, // Transformation strength (0.0-1.0)
468
+ guidance_scale: 7.5, // Guidance scale (0-20)
469
+ num_inference_steps: 50 // Number of inference steps
294
470
  }
295
471
  })
296
472
  ```
@@ -343,6 +519,12 @@ text2image: FalAiImage.IdeogramV3({
343
519
  headers: {
344
520
  'x-custom-header': 'value',
345
521
  'x-client-version': '1.0.0'
522
+ },
523
+ // Optional: Configure default property values
524
+ properties: {
525
+ style: 'GENERAL', // Options: 'AUTO', 'GENERAL', 'REALISTIC', 'DESIGN'
526
+ image_size: 'square_hd', // Same options as Recraft
527
+ seed: 12345 // Fixed seed for reproducibility
346
528
  }
347
529
  })
348
530
  ```
@@ -362,6 +544,12 @@ image2image: FalAiImage.IdeogramV3Remix({
362
544
  headers: {
363
545
  'x-custom-header': 'value',
364
546
  'x-client-version': '1.0.0'
547
+ },
548
+ // Optional: Configure default property values
549
+ properties: {
550
+ style: 'AUTO', // Options: 'AUTO', 'GENERAL', 'REALISTIC', 'DESIGN'
551
+ image_size: 'square_hd',
552
+ remix_strength: 0.7 // How much to transform (0.0-1.0)
365
553
  }
366
554
  })
367
555
  ```
@@ -372,7 +560,34 @@ Key features:
372
560
  - Multiple image size presets: square HD, square, portrait 4:3/16:9, landscape 4:3/16:9
373
561
  - Custom dimensions support (64x64 to 14142x14142 pixels)
374
562
 
375
- #### 7. FluxProKontextEdit (Image-to-Image)
563
+ #### 7. QwenImageEdit (Image-to-Image)
564
+
565
+ A powerful image editing model with superior text editing capabilities from fal.ai:
566
+
567
+ ```typescript
568
+ image2image: FalAiImage.QwenImageEdit({
569
+ proxyUrl: 'http://your-proxy-server.com/api/proxy',
570
+ headers: {
571
+ 'x-custom-header': 'value',
572
+ 'x-client-version': '1.0.0'
573
+ },
574
+ // Optional: Configure default property values
575
+ properties: {
576
+ seed: 12345, // Fixed seed for reproducibility
577
+ guidance_scale: 7.5 // Guidance strength (0-20)
578
+ }
579
+ })
580
+ ```
581
+
582
+ Key features:
583
+ - **Superior text editing capabilities** for image transformation
584
+ - Transform existing images with detailed text prompts
585
+ - Available through all canvas quick actions (edit, background swap, style transfer, artist styles, variants)
586
+ - Maintains original image dimensions
587
+ - Custom headers support for API requests
588
+ ```
589
+
590
+ #### 8. FluxProKontextEdit (Image-to-Image)
376
591
 
377
592
  A versatile image editing model that applies stylistic changes and transformations:
378
593
 
@@ -387,7 +602,7 @@ Key features:
387
602
  - Built-in quick actions for style transfer, artist styles, background swapping, and variants
388
603
  - Keeps original image dimensions
389
604
 
390
- #### 8. FluxProKontextMaxEdit (Image-to-Image)
605
+ #### 9. FluxProKontextMaxEdit (Image-to-Image)
391
606
 
392
607
  A high-quality variant of FluxProKontext offering more detailed results:
393
608
 
@@ -413,6 +628,10 @@ text2image: FalAiImage.NanoBanana({
413
628
  headers: {
414
629
  'x-custom-header': 'value',
415
630
  'x-client-version': '1.0.0'
631
+ },
632
+ // Optional: Configure default property values
633
+ properties: {
634
+ output_format: 'PNG' // Options: 'PNG', 'JPEG'
416
635
  }
417
636
  })
418
637
  ```
@@ -447,6 +666,11 @@ image2image: FalAiImage.NanoBananaEdit({
447
666
  headers: {
448
667
  'x-custom-header': 'value',
449
668
  'x-client-version': '1.0.0'
669
+ },
670
+ // Optional: Configure default property values
671
+ properties: {
672
+ strength: 0.7, // Edit strength (0.0-1.0)
673
+ output_format: 'PNG' // Options: 'PNG', 'JPEG'
450
674
  }
451
675
  })
452
676
  ```
@@ -795,6 +1019,16 @@ FalAiImage.GeminiFlashEdit(config: {
795
1019
  })
796
1020
  ```
797
1021
 
1022
+ #### QwenImageEdit
1023
+
1024
+ ```typescript
1025
+ FalAiImage.QwenImageEdit(config: {
1026
+ proxyUrl: string;
1027
+ headers?: Record<string, string>;
1028
+ debug?: boolean;
1029
+ })
1030
+ ```
1031
+
798
1032
  ### OpenAI Providers
799
1033
 
800
1034
  #### GptImage1.Text2Image
@@ -943,6 +1177,7 @@ const myImageProvider = {
943
1177
  - IdeogramV3: `ly.img.ai.fal-ai/ideogram/v3`
944
1178
  - IdeogramV3Remix: `ly.img.ai.fal-ai/ideogram/v3/remix`
945
1179
  - GeminiFlashEdit: `ly.img.ai.fal-ai/gemini-flash-edit`
1180
+ - QwenImageEdit: `ly.img.ai.fal-ai/qwen-image-edit`
946
1181
  - GptImage1.Text2Image: `ly.img.ai.open-ai/gpt-image-1/text2image`
947
1182
  - GptImage1.Image2Image: `ly.img.ai.open-ai/gpt-image-1/image2image`
948
1183
  - FluxProKontextEdit: `ly.img.ai.fal-ai/flux-pro/kontext`
@@ -958,6 +1193,7 @@ Generated images are automatically stored in asset sources with the following ID
958
1193
  - IdeogramV3: `fal-ai/ideogram/v3.history`
959
1194
  - IdeogramV3Remix: `fal-ai/ideogram/v3/remix.history`
960
1195
  - GeminiFlashEdit: `fal-ai/gemini-flash-edit.history`
1196
+ - QwenImageEdit: `fal-ai/qwen-image-edit.history`
961
1197
  - GptImage1.Text2Image: `open-ai/gpt-image-1/text2image.history`
962
1198
  - GptImage1.Image2Image: `open-ai/gpt-image-1/image2image.history`
963
1199
  - FluxProKontextEdit: `fal-ai/flux-pro/kontext.history`
@@ -0,0 +1,21 @@
1
+ import { ImageOutput, type Provider, type CommonProviderConfiguration } from '@imgly/plugin-ai-generation-web';
2
+ import CreativeEditorSDK from '@cesdk/cesdk-js';
3
+ type QwenImageEditInput = {
4
+ prompt: string;
5
+ image_url: string;
6
+ num_images?: number;
7
+ image_size?: string;
8
+ acceleration?: 'none' | 'regular' | 'high';
9
+ output_format?: 'jpeg' | 'png';
10
+ guidance_scale?: number;
11
+ num_inference_steps?: number;
12
+ sync_mode?: boolean;
13
+ seed?: number;
14
+ negative_prompt?: string;
15
+ enable_safety_checker?: boolean;
16
+ };
17
+ export declare function QwenImageEdit(config: CommonProviderConfiguration<QwenImageEditInput, ImageOutput>): (context: {
18
+ cesdk: CreativeEditorSDK;
19
+ }) => Promise<Provider<'image', QwenImageEditInput, ImageOutput>>;
20
+ declare function getProvider(cesdk: CreativeEditorSDK, config: CommonProviderConfiguration<QwenImageEditInput, ImageOutput>): Provider<'image', QwenImageEditInput, ImageOutput>;
21
+ export default getProvider;
@@ -1,6 +1,6 @@
1
- import { CommonProviderConfiguration, type Provider } from '@imgly/plugin-ai-generation-web';
1
+ import { type Provider } from '@imgly/plugin-ai-generation-web';
2
2
  import CreativeEditorSDK from '@cesdk/cesdk-js';
3
- import { type StyleId } from './Recraft20b.constants';
3
+ import type { Recraft20bConfiguration } from './recraftTypes';
4
4
  type Recraft20bOutput = {
5
5
  kind: 'image';
6
6
  url: string;
@@ -11,24 +11,15 @@ type Recraft20bInput = {
11
11
  width: number;
12
12
  height: number;
13
13
  };
14
- style?: StyleId;
14
+ style?: string;
15
15
  colors?: Array<{
16
16
  r: number;
17
17
  g: number;
18
18
  b: number;
19
19
  }>;
20
20
  };
21
- interface ProviderConfiguration extends CommonProviderConfiguration<Recraft20bInput, Recraft20bOutput> {
22
- /**
23
- * Base URL used for the UI assets used in the plugin.
24
- *
25
- * By default, we load the assets from the IMG.LY CDN You can copy the assets.
26
- * from the `/assets` folder to your own server and set the base URL to your server.
27
- */
28
- baseURL?: string;
29
- }
30
- export declare function Recraft20b(config: ProviderConfiguration): (context: {
21
+ export declare function Recraft20b(config: Recraft20bConfiguration): (context: {
31
22
  cesdk: CreativeEditorSDK;
32
23
  }) => Promise<Provider<'image', Recraft20bInput, Recraft20bOutput>>;
33
- declare function getProvider(cesdk: CreativeEditorSDK, config: ProviderConfiguration): Provider<'image', Recraft20bInput, Recraft20bOutput>;
24
+ declare function getProvider(cesdk: CreativeEditorSDK, config: Recraft20bConfiguration): Provider<'image', Recraft20bInput, Recraft20bOutput>;
34
25
  export default getProvider;
@@ -1,22 +1,14 @@
1
- import { CommonProviderConfiguration, type Provider } from '@imgly/plugin-ai-generation-web';
1
+ import { type Provider } from '@imgly/plugin-ai-generation-web';
2
2
  import { type RecraftV3TextToImageInput } from '@fal-ai/client/endpoints';
3
3
  import CreativeEditorSDK from '@cesdk/cesdk-js';
4
+ import type { RecraftV3Configuration } from './recraftTypes';
4
5
  type RecraftV3Output = {
5
6
  kind: 'image';
6
7
  url: string;
7
8
  };
8
9
  export type StyleId = Extract<RecraftV3TextToImageInput['style'], string>;
9
- interface ProviderConfiguration extends CommonProviderConfiguration<RecraftV3TextToImageInput, RecraftV3Output> {
10
- /**
11
- * Base URL used for the UI assets used in the plugin.
12
- *
13
- * By default, we load the assets from the IMG.LY CDN You can copy the assets.
14
- * from the `/assets` folder to your own server and set the base URL to your server.
15
- */
16
- baseURL?: string;
17
- }
18
- export declare function RecraftV3(config: ProviderConfiguration): (context: {
10
+ export declare function RecraftV3(config: RecraftV3Configuration): (context: {
19
11
  cesdk: CreativeEditorSDK;
20
12
  }) => Promise<Provider<'image', RecraftV3TextToImageInput, RecraftV3Output>>;
21
- declare function getProvider(cesdk: CreativeEditorSDK, config: ProviderConfiguration): Provider<'image', RecraftV3TextToImageInput, RecraftV3Output>;
13
+ declare function getProvider(cesdk: CreativeEditorSDK, config: RecraftV3Configuration): Provider<'image', RecraftV3TextToImageInput, RecraftV3Output>;
22
14
  export default getProvider;
@@ -5,6 +5,7 @@ import { FluxProKontextEdit } from './FluxProKontextEdit';
5
5
  import { FluxProKontextMaxEdit } from './FluxProKontextMaxEdit';
6
6
  import { IdeogramV3 } from './IdeogramV3';
7
7
  import { IdeogramV3Remix } from './IdeogramV3Remix';
8
+ import { QwenImageEdit } from './QwenImageEdit';
8
9
  import { NanoBanana } from './NanoBanana';
9
10
  import { NanoBananaEdit } from './NanoBananaEdit';
10
11
  declare const FalAi: {
@@ -13,6 +14,7 @@ declare const FalAi: {
13
14
  GeminiFlashEdit: typeof GeminiFlashEdit;
14
15
  IdeogramV3: typeof IdeogramV3;
15
16
  IdeogramV3Remix: typeof IdeogramV3Remix;
17
+ QwenImageEdit: typeof QwenImageEdit;
16
18
  NanoBanana: typeof NanoBanana;
17
19
  NanoBananaEdit: typeof NanoBananaEdit;
18
20
  Recraft20b: typeof Recraft20b;