0.1.9 • Published 10 months ago

@imgly/plugin-ai-apps-web v0.1.9

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
10 months ago

IMG.LY AI Apps for Web

A plugin for orchestrating all AI generation capabilities in CreativeEditor SDK.

Overview

The @imgly/plugin-ai-apps-web package provides a unified interface for accessing and organizing all AI generation features within the CreativeEditor SDK. It combines image, video, audio, and text generation capabilities into a single cohesive user experience.

Features include:

  • Central AI dock component with loading indicators
  • AI apps menu for quick access to all AI features
  • Integrated history management for generated assets
  • Automatic integration with asset libraries
  • Support for both Design and Video modes

Installation

npm install @imgly/plugin-ai-apps-web

Usage

To use the plugin, import it and configure it with your preferred providers:

import CreativeEditorSDK from '@cesdk/cesdk-js';
import AiApps from '@imgly/plugin-ai-apps-web';

// Import providers from individual AI generation packages
import { AnthropicProvider } from '@imgly/plugin-ai-text-generation-web/anthropic';
import FalAiImage from '@imgly/plugin-ai-image-generation-web/fal-ai';
import FalAiVideo from '@imgly/plugin-ai-video-generation-web/fal-ai';
import ElevenLabs from '@imgly/plugin-ai-audio-generation-web/elevenlabs';

// Initialize CreativeEditor SDK
CreativeEditorSDK.create(domElement, {
    license: 'your-license-key'
    // Other configuration options...
}).then(async (cesdk) => {
    // Add the AI Apps plugin
    cesdk.addPlugin(
        AiApps({
            providers: {
                // Text generation
                text2text: AnthropicProvider({
                    proxyUrl: 'https://your-anthropic-proxy.example.com'
                }),

                // Image generation
                text2image: FalAiImage.RecraftV3({
                    proxyUrl: 'https://your-fal-ai-proxy.example.com'
                }),
                image2image: FalAiImage.GeminiFlashEdit({
                    proxyUrl: 'https://your-fal-ai-proxy.example.com'
                }),

                // Video generation (used in video mode)
                text2video: FalAiVideo.MinimaxVideo01Live({
                    proxyUrl: 'https://your-fal-ai-proxy.example.com'
                }),
                image2video: FalAiVideo.MinimaxVideo01LiveImageToVideo({
                    proxyUrl: 'https://your-fal-ai-proxy.example.com'
                }),

                // Audio generation (used in video mode)
                text2speech: ElevenLabs.MonolingualV1({
                    proxyUrl: 'https://your-elevenlabs-proxy.example.com'
                }),
                text2sound: ElevenLabs.SoundEffects({
                    proxyUrl: 'https://your-elevenlabs-proxy.example.com'
                })
            }
        })
    );

    // Position the AI dock button in the dock order
    cesdk.ui.setDockOrder(['ly.img.ai/apps.dock', ...cesdk.ui.getDockOrder()]);
});

Configuration Options

The plugin accepts the following configuration options:

OptionTypeDescription
providersProvidersObject containing all AI providers to be used
debugbooleanPrint debug messages

Providers Configuration

The providers object can include the following provider functions:

ProviderTypeDescription
text2textProvider<'text'>Provider for text generation and transformation
text2imageProvider<'image'>Provider for text-to-image generation
image2imageProvider<'image'>Provider for image-to-image transformation
text2videoProvider<'video'>Provider for text-to-video generation (video mode only)
image2videoProvider<'video'>Provider for image-to-video generation (video mode only)
text2speechProvider<'audio'>Provider for text-to-speech generation (video mode only)
text2soundProvider<'audio'>Provider for sound effects generation (video mode only)

UI Integration

The plugin adds the following UI components:

  1. AI Dock Button: Access point for all AI features
  2. AI Apps Menu: In video mode, shows cards for all available AI generation types

Dock Integration

To position the AI dock button in your editor's dock, use the setDockOrder method:

// Add the AI dock component to the beginning of the dock
cesdk.ui.setDockOrder(['ly.img.ai/apps.dock', ...cesdk.ui.getDockOrder()]);

// Or add it at a specific position
const currentOrder = cesdk.ui.getDockOrder();
currentOrder.splice(2, 0, 'ly.img.ai/apps.dock');
cesdk.ui.setDockOrder(currentOrder);

Asset History Integration

The plugin automatically integrates generated assets into the appropriate asset libraries:

  • AI-generated images appear in the standard image library
  • AI-generated videos appear in the standard video library
  • AI-generated audio appears in the standard audio library

This integration creates a seamless experience where users can easily find and reuse their AI-generated assets.

Related Packages

License

This plugin is part of the IMG.LY plugin ecosystem for CreativeEditor SDK. Please refer to the license terms in the package.

0.1.9

10 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

12 months ago

0.1.4

12 months ago

0.1.3

12 months ago

0.1.2

12 months ago

0.1.0

12 months ago

0.1.0-rc.2

12 months ago

0.1.0-rc.1

12 months ago

0.1.0-rc.0

12 months ago