@cliquify.me/ai-effects 0.0.0-stage → 1.0.0

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.
@@ -0,0 +1,25 @@
1
+ export interface ExistingAnimationDetail {
2
+ property: string;
3
+ delayInFrames: number;
4
+ durationInFrames: number;
5
+ name?: string;
6
+ }
7
+ export interface SelectedItemSummary {
8
+ id: string;
9
+ name?: string;
10
+ type: string;
11
+ startFrame: number;
12
+ endFrame: number;
13
+ durationInFrames: number;
14
+ startTimeMs: number;
15
+ endTimeMs: number;
16
+ durationMs: number;
17
+ width?: number;
18
+ height?: number;
19
+ text?: string;
20
+ currentEffects?: string[];
21
+ currentAnimations?: string[];
22
+ existingAnimationDetails?: ExistingAnimationDetail[];
23
+ }
24
+ export declare const ANIMATION_CONTEXT_KNOWLEDGE = "\n### EDITOR ANIMATIONS & EFFECTS CATALOG (ELEMENT-TYPE SPECIFIC):\n\n1. **TEXT & CAPTIONS ELEMENT PRESETS (isTextItem = true)**:\n - **Basic**: \"disappearIn\" (character typing / typewriter reveal), \"fadeIn\".\n - **Slide**: \"slideInLeft\", \"slideInRight\", \"slideInTop\", \"slideInBottom\".\n - **Scale**: \"growIn\", \"shrinkIn\", \"scaleIn\", \"zoomIn\".\n - **Rotate**: \"spinIn\", \"rotateIn\", \"flipInX\", \"flipInY\".\n - **Bounce**: \"bounceIn\", \"elasticIn\".\n - **Filters**: \"blurIn\", \"brightnessIn\".\n - **Mask (Text Specific)**: \"maskUpIn\", \"maskDownIn\", \"maskRevealIn\", \"maskRevealSlideIn\", \"maskRevealCenterIn\", \"maskRevealCornerIn\".\n - **Blur**: \"blurV2In\", \"blurSlide\".\n - **Custom Keyframe Properties**: \"scale\", \"rotate\", \"opacity\", \"move\" ({ fromX, toX, fromY, toY }), \"blur\", \"brightness\".\n\n2. **IMAGE, VIDEO & MEDIA ELEMENT PRESETS (isMediaItem = true)**:\n - **Fade**: \"fadeIn\", \"slideInRight\".\n - **Scale**: \"scaleIn\", \"shrinkIn\", \"spinIn\", \"twistIn\", \"moveScaleIn\".\n - **Mask**: \"maskRevealIn\", \"maskRevealSlideIn\", \"maskRevealCenterIn\", \"maskRevealCornerIn\", \"maskRevealShrinkScaleIn\", \"maskRevealCenterScaleIn\".\n - **Blur**: \"blurIn\", \"blurSlideV2In\".\n - **Basic Visual Effects**:\n - \"blur\" (Gaussian blur 0 to 40px)\n - \"vignette\" (Cinematic edge darkening)\n - \"chromaticAberration\" (RGB chromatic glitch split)\n - \"noise\" (Granular static texture)\n - \"pixelate\" (8-bit mosaic blocks 1 to 40px)\n - \"grayscale\" (B&W monochrome)\n - \"contrast\" (Punches contrast 0 to 3)\n - \"brightness\" (Modulates luminance 0 to 2)\n - \"hue\" (Color spectrum rotation 0 to 360)\n - \"saturation\" (Color vibrancy 0 to 3)\n\n3. **SHAPE ELEMENT PRESETS**:\n - **Fade**: \"fadeIn\", \"slideInRight\".\n - **Scale**: \"scaleIn\", \"shrinkIn\", \"spinIn\", \"twistIn\", \"moveScaleIn\".\n - **Blur**: \"blurIn\", \"blurSlideV2In\".\n - **Keyframe Properties**: \"scale\", \"rotate\", \"opacity\", \"move\", \"borderRadius\", \"stroke\".\n\n4. **EXIT ANIMATIONS**:\n - \"fadeOut\", \"slideOutLeft\", \"slideOutRight\", \"slideOutTop\", \"slideOutBottom\", \"scaleOut\", \"zoomOut\", \"spinOut\", \"rotateOut\", \"bounceOut\", \"blurOut\", \"maskRevealSlideOut\".\n";
25
+ export declare const TOOLS_CAPABILITIES_KNOWLEDGE = "\n### AVAILABLE TOOLS AND CREATION CAPABILITIES:\nYou have access to 2 dynamic creation tools:\n\n1. **add_text**: Adds a new text element to the editor canvas and timeline.\n - Parameters:\n - \"text\": The textual content requested by user (string, e.g. \"Summer Sale 50% Off\", \"Subscribe\", headline, or paragraph).\n - \"fontSize\": Font size in pixels (number, default: 64, typical range 32 to 120).\n - \"color\": Text hex color (string, default: \"#ffffff\", e.g. \"#f43f5e\", \"#3b82f6\").\n - \"textAlign\": \"left\" | \"center\" | \"right\".\n - \"fontFamily\": Optional font family (e.g. \"Roboto\", \"Inter\", \"Montserrat\").\n\n2. **add_shape**: Adds a geometric or AI-generated vector shape element to canvas and timeline.\n - Parameters:\n - \"shapeType\": Standard (\"rectangle\" | \"circle\" | \"triangle\" | \"star\") OR \"custom\".\n - \"color\": Fill color hex (string, e.g. \"#3b82f6\", \"#ef4444\", \"#10b981\", \"#eab308\", \"#8b5cf6\").\n - \"width\": Width in pixels (number, default: 300).\n - \"height\": Height in pixels (number, default: 300).\n - \"borderRadius\": Corner radius for rectangles (number, e.g. 0 to 50).\n - \"svgContent\": OPTIONAL dynamic SVG markup generated by AI when user asks for custom shapes (e.g. hearts, arrows, shields, badges, icons, speech bubbles, polygons). Format: valid self-contained <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">...</svg>.\n\n### CRITICAL SCOPE & RESTRICTION RULES:\n- ONLY **text** and **shapes** are currently supported for creation/generation.\n- If the user asks to add or generate **images**, **photos**, **videos**, **audio**, **music**, **voiceovers**, or **3D models**, return an \"unsupported\" response explaining that currently only text and shapes are supported.\n- When generating motion effects for selected elements, strictly respect the element type:\n - Text animations (typewriter/disappearIn, maskUpIn, text zoom/slide) for TEXT layers.\n - Image/Video visual filters (vignette, chromatic, pixelate, mask reveal, blur) for IMAGE and VIDEO layers.\n - Shape animations (borderRadius, stroke, scale, rotate) for SHAPE layers.\n";
@@ -0,0 +1,14 @@
1
+ export type LLMProvider = "openai" | "google" | "anthropic";
2
+ export interface ModelOption {
3
+ id: string;
4
+ name: string;
5
+ description: string;
6
+ }
7
+ export declare const PROVIDER_MODELS: Record<LLMProvider, ModelOption[]>;
8
+ export interface LLMConfig {
9
+ provider: LLMProvider;
10
+ model: string;
11
+ apiKey?: string;
12
+ baseUrl?: string;
13
+ }
14
+ export declare const getAIModel: (config?: LLMConfig) => import('ai').LanguageModelV1;
@@ -0,0 +1,63 @@
1
+ export type SupportedEffectProperty = "scale" | "rotate" | "move" | "translateX" | "translateY" | "opacity" | "blur" | "backgroundBlur" | "glass" | "shadow" | "hide-show" | "borderRadius" | "stroke" | "pixelate" | "brightness";
2
+ export interface GeneratedEffectStep {
3
+ property: SupportedEffectProperty;
4
+ from: number;
5
+ to: number;
6
+ durationInFrames: number;
7
+ delayInFrames?: number;
8
+ easing?: "linear" | "easeIn" | "easeOut" | "easeInOut";
9
+ details?: {
10
+ fromX?: number;
11
+ toX?: number;
12
+ fromY?: number;
13
+ toY?: number;
14
+ scale?: number;
15
+ };
16
+ }
17
+ export interface AIEffectResponse {
18
+ title: string;
19
+ description: string;
20
+ steps: GeneratedEffectStep[];
21
+ }
22
+ export type StandardShapeType = "rectangle" | "circle" | "triangle" | "star";
23
+ export type ShapeType = StandardShapeType | "custom";
24
+ export interface AddTextAction {
25
+ type: "add_text";
26
+ text: string;
27
+ fontSize?: number;
28
+ color?: string;
29
+ textAlign?: "left" | "center" | "right";
30
+ fontFamily?: string;
31
+ }
32
+ export interface AddShapeAction {
33
+ type: "add_shape";
34
+ shapeType: ShapeType;
35
+ color?: string;
36
+ width?: number;
37
+ height?: number;
38
+ borderRadius?: number;
39
+ svgContent?: string;
40
+ }
41
+ export interface UnsupportedAction {
42
+ type: "unsupported";
43
+ feature: string;
44
+ message: string;
45
+ }
46
+ export type AIAction = AddTextAction | AddShapeAction | UnsupportedAction;
47
+ export interface AIGenerationResult {
48
+ action?: AIAction;
49
+ effect?: AIEffectResponse;
50
+ message: string;
51
+ }
52
+ export interface ChatMessage {
53
+ id: string;
54
+ sender: "bot" | "user";
55
+ text: string;
56
+ effect?: AIEffectResponse;
57
+ action?: AIAction;
58
+ targetElement?: {
59
+ id: string;
60
+ name: string;
61
+ type: string;
62
+ };
63
+ }
@@ -0,0 +1,19 @@
1
+ export declare const calculateFrames: (display: {
2
+ from: number;
3
+ to: number;
4
+ }, fps: number) => {
5
+ from: number;
6
+ durationInFrames: number;
7
+ };
8
+ export declare const cancelPreviewAnimation: () => void;
9
+ export declare const previewAnimation: (durationInFrames: number, playerRef: {
10
+ current: {
11
+ seekTo: (frame: number) => void;
12
+ getCurrentFrame: () => number;
13
+ play: () => void;
14
+ pause: () => void;
15
+ isPlaying: () => boolean;
16
+ } | null;
17
+ }, previewTimeoutRef?: {
18
+ current: number | null;
19
+ }, startFrameOffset?: number) => void;
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "@cliquify.me/ai-effects",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "private": false,
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "main": "dist/index.es.js",
13
+ "module": "dist/index.es.js",
14
+ "types": "dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/index.es.js",
18
+ "types": "./dist/index.d.ts"
19
+ }
20
+ },
21
+ "devDependencies": {
22
+ "@types/node": "^20.11.24",
23
+ "@types/react": "^19.1.8",
24
+ "@types/react-dom": "^19.1.6",
25
+ "rollup-plugin-peer-deps-external": "^2.2.4",
26
+ "typescript": "^5.8.3",
27
+ "vite": "^5.2.0",
28
+ "vite-plugin-dts": "^3.9.1",
29
+ "@cliquify.me/typescript-config": "1.0.4"
30
+ },
31
+ "dependencies": {
32
+ "@ai-sdk/anthropic": "^1.1.9",
33
+ "@ai-sdk/google": "^1.1.16",
34
+ "@ai-sdk/openai": "^1.1.13",
35
+ "ai": "^4.1.41",
36
+ "nanoid": "^5.0.7",
37
+ "lucide-react": "^0.469.0",
38
+ "sonner": "^1.7.1"
39
+ },
40
+ "peerDependencies": {
41
+ "@designcombo/events": "1.0.2",
42
+ "react": ">=18.0.0",
43
+ "react-dom": ">=18.0.0",
44
+ "remotion": ">=4.0.0",
45
+ "@cliquify.me/state": "9.0.8",
46
+ "@cliquify.me/types": "9.0.9"
47
+ },
48
+ "scripts": {
49
+ "dev": "vite",
50
+ "build": "tsc && vite build",
51
+ "format": "prettier --write ."
52
+ }
6
53
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.