@imgly/plugin-ai-image-generation-web 0.2.14 → 0.2.16
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 +25 -0
- package/README.md +335 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/eachlabs/Flux2.image2image.d.ts +22 -0
- package/dist/eachlabs/Flux2.text2image.d.ts +21 -0
- package/dist/eachlabs/Flux2Flex.image2image.d.ts +23 -0
- package/dist/eachlabs/Flux2Flex.text2image.d.ts +22 -0
- package/dist/eachlabs/Flux2Pro.image2image.d.ts +22 -0
- package/dist/eachlabs/Flux2Pro.text2image.d.ts +21 -0
- package/dist/eachlabs/Gemini3Pro.image2image.d.ts +22 -0
- package/dist/eachlabs/Gemini3Pro.text2image.d.ts +23 -0
- package/dist/eachlabs/NanoBananaPro.image2image.d.ts +24 -0
- package/dist/eachlabs/NanoBananaPro.text2image.d.ts +23 -0
- package/dist/eachlabs/OpenAIImage.image2image.d.ts +22 -0
- package/dist/eachlabs/OpenAIImage.text2image.d.ts +21 -0
- package/dist/eachlabs/Seedream45.image2image.d.ts +23 -0
- package/dist/eachlabs/Seedream45.text2image.d.ts +22 -0
- package/dist/eachlabs/createEachLabsClient.d.ts +46 -0
- package/dist/eachlabs/createImageProvider.d.ts +116 -0
- package/dist/eachlabs/index.d.ts +46 -0
- package/dist/eachlabs/index.mjs +142 -0
- package/dist/eachlabs/index.mjs.map +7 -0
- package/dist/eachlabs/types.d.ts +10 -0
- package/dist/eachlabs/utils.d.ts +34 -0
- package/dist/fal-ai/index.mjs +8 -8
- package/dist/fal-ai/index.mjs.map +4 -4
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +4 -4
- package/dist/open-ai/index.mjs +6 -6
- package/dist/open-ai/index.mjs.map +4 -4
- package/dist/runware/index.mjs +6 -6
- package/dist/runware/index.mjs.map +4 -4
- package/package.json +6 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type { EachLabsClient } from './createEachLabsClient';
|
|
2
|
+
export type { EachLabsProviderConfiguration } from './createImageProvider';
|
|
3
|
+
export declare const ASPECT_RATIO_MAP: Record<string, {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function getImageDimensionsFromAspectRatio(aspectRatio: string): {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
2
|
+
import { EachLabsClient } from './createEachLabsClient';
|
|
3
|
+
/**
|
|
4
|
+
* Uploads an image to EachLabs storage if needed.
|
|
5
|
+
* Handles blob: and buffer: URLs by uploading them to EachLabs storage.
|
|
6
|
+
* Regular URLs and data URIs are passed through unchanged.
|
|
7
|
+
*
|
|
8
|
+
* @param client - The EachLabs client instance
|
|
9
|
+
* @param imageUrl - The image URL to process
|
|
10
|
+
* @param cesdk - Optional CE.SDK instance for buffer URL handling
|
|
11
|
+
* @returns The uploaded URL or the original URL if no upload was needed
|
|
12
|
+
*/
|
|
13
|
+
export declare function uploadImageInputToEachLabsIfNeeded(client: EachLabsClient, imageUrl?: string, cesdk?: CreativeEditorSDK): Promise<string | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* Uploads an array of images to EachLabs storage if needed.
|
|
16
|
+
* Used for multi-image inputs like image-to-image generation.
|
|
17
|
+
*
|
|
18
|
+
* @param client - The EachLabs client instance
|
|
19
|
+
* @param imageUrls - Array of image URLs to process
|
|
20
|
+
* @param cesdk - Optional CE.SDK instance for buffer URL handling
|
|
21
|
+
* @returns Array of uploaded URLs
|
|
22
|
+
*/
|
|
23
|
+
export declare function uploadImageArrayToEachLabsIfNeeded(client: EachLabsClient, imageUrls?: string[], cesdk?: CreativeEditorSDK): Promise<string[] | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use uploadImageInputToEachLabsIfNeeded instead
|
|
26
|
+
* Converts a blob: or buffer: URL to a data URI that EachLabs can accept
|
|
27
|
+
*/
|
|
28
|
+
export declare function convertImageUrlForEachLabs(imageUrl?: string, cesdk?: CreativeEditorSDK): Promise<string | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Use uploadImageArrayToEachLabsIfNeeded instead
|
|
31
|
+
* Converts an array of blob:/buffer: URLs to data URIs for EachLabs.
|
|
32
|
+
* Used for multi-image inputs like image-to-image generation.
|
|
33
|
+
*/
|
|
34
|
+
export declare function convertImageUrlArrayForEachLabs(imageUrls?: string[], cesdk?: CreativeEditorSDK): Promise<string[] | undefined>;
|