@teamimagine/n8n-nodes-imagineart 0.1.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.
- package/LICENSE +21 -0
- package/README.md +84 -0
- package/dist/credentials/ImagineArtOAuth2Api.credentials.d.ts +9 -0
- package/dist/credentials/ImagineArtOAuth2Api.credentials.js +68 -0
- package/dist/credentials/ImagineArtOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/logo-lg.dark.svg +31 -0
- package/dist/credentials/logo-lg.svg +31 -0
- package/dist/nodes/ImagineArt/ImagineArt.node.d.ts +12 -0
- package/dist/nodes/ImagineArt/ImagineArt.node.js +31 -0
- package/dist/nodes/ImagineArt/ImagineArt.node.js.map +1 -0
- package/dist/nodes/ImagineArt/logo-lg.dark.svg +31 -0
- package/dist/nodes/ImagineArt/logo-lg.svg +31 -0
- package/dist/nodes/ImagineArt/methods/loadOptions.d.ts +12 -0
- package/dist/nodes/ImagineArt/methods/loadOptions.js +69 -0
- package/dist/nodes/ImagineArt/methods/loadOptions.js.map +1 -0
- package/dist/nodes/ImagineArt/shared.d.ts +12 -0
- package/dist/nodes/ImagineArt/shared.js +1778 -0
- package/dist/nodes/ImagineArt/shared.js.map +1 -0
- package/dist/nodes/ImagineArt/transport/adStudio.d.ts +33 -0
- package/dist/nodes/ImagineArt/transport/adStudio.js +150 -0
- package/dist/nodes/ImagineArt/transport/adStudio.js.map +1 -0
- package/dist/nodes/ImagineArt/transport/constants.d.ts +6 -0
- package/dist/nodes/ImagineArt/transport/constants.js +9 -0
- package/dist/nodes/ImagineArt/transport/constants.js.map +1 -0
- package/dist/nodes/ImagineArt/transport/imageModels.d.ts +20 -0
- package/dist/nodes/ImagineArt/transport/imageModels.js +91 -0
- package/dist/nodes/ImagineArt/transport/imageModels.js.map +1 -0
- package/dist/nodes/ImagineArt/transport/prompts.d.ts +17 -0
- package/dist/nodes/ImagineArt/transport/prompts.js +216 -0
- package/dist/nodes/ImagineArt/transport/prompts.js.map +1 -0
- package/dist/nodes/ImagineArt/transport/request.d.ts +39 -0
- package/dist/nodes/ImagineArt/transport/request.js +74 -0
- package/dist/nodes/ImagineArt/transport/request.js.map +1 -0
- package/dist/nodes/ImagineArt/transport/status.d.ts +18 -0
- package/dist/nodes/ImagineArt/transport/status.js +40 -0
- package/dist/nodes/ImagineArt/transport/status.js.map +1 -0
- package/dist/nodes/ImagineArt/transport/videoModels.d.ts +29 -0
- package/dist/nodes/ImagineArt/transport/videoModels.js +95 -0
- package/dist/nodes/ImagineArt/transport/videoModels.js.map +1 -0
- package/dist/package.json +65 -0
- package/package.json +65 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveLogoAspect = resolveLogoAspect;
|
|
4
|
+
exports.buildLogoPrompt = buildLogoPrompt;
|
|
5
|
+
exports.resolveInstagramFormat = resolveInstagramFormat;
|
|
6
|
+
exports.buildInstagramPrompt = buildInstagramPrompt;
|
|
7
|
+
exports.buildYouTubeThumbnailPrompt = buildYouTubeThumbnailPrompt;
|
|
8
|
+
exports.buildInteriorPrompt = buildInteriorPrompt;
|
|
9
|
+
exports.buildGiantProductPrompt = buildGiantProductPrompt;
|
|
10
|
+
exports.resolveUGCAspect = resolveUGCAspect;
|
|
11
|
+
exports.buildUGCPrompt = buildUGCPrompt;
|
|
12
|
+
exports.buildDronePrompt = buildDronePrompt;
|
|
13
|
+
exports.buildProductAdPrompt = buildProductAdPrompt;
|
|
14
|
+
exports.buildCookingSheetPrompt = buildCookingSheetPrompt;
|
|
15
|
+
exports.buildCookingVideoPrompt = buildCookingVideoPrompt;
|
|
16
|
+
exports.buildJewelryImagePrompt = buildJewelryImagePrompt;
|
|
17
|
+
exports.buildJewelryVideoPrompt = buildJewelryVideoPrompt;
|
|
18
|
+
exports.buildLogo3DImagePrompt = buildLogo3DImagePrompt;
|
|
19
|
+
exports.buildLogoAnimationPrompt = buildLogoAnimationPrompt;
|
|
20
|
+
function orDefault(value, fallback) {
|
|
21
|
+
const t = (value !== null && value !== void 0 ? value : '').trim();
|
|
22
|
+
return t || fallback;
|
|
23
|
+
}
|
|
24
|
+
const DEFAULT_LOGO_STYLE = 'modern wordmark with icon, minimal';
|
|
25
|
+
const DEFAULT_LOGO_INDUSTRY = 'technology';
|
|
26
|
+
const DEFAULT_LOGO_COLORS = 'brand blue and white';
|
|
27
|
+
const DEFAULT_LOGO_BACKGROUND = 'white';
|
|
28
|
+
function resolveLogoAspect(style) {
|
|
29
|
+
const s = (style !== null && style !== void 0 ? style : '').toLowerCase();
|
|
30
|
+
return s.includes('horizontal') || s.includes('wide') ? '16:9' : '1:1';
|
|
31
|
+
}
|
|
32
|
+
function buildLogoPrompt(brandName, style, industry, colors, background) {
|
|
33
|
+
const s = orDefault(style, DEFAULT_LOGO_STYLE);
|
|
34
|
+
const ind = orDefault(industry, DEFAULT_LOGO_INDUSTRY);
|
|
35
|
+
const col = orDefault(colors, DEFAULT_LOGO_COLORS);
|
|
36
|
+
const bg = orDefault(background, DEFAULT_LOGO_BACKGROUND);
|
|
37
|
+
return `Professional logo for "${(brandName !== null && brandName !== void 0 ? brandName : '').trim()}" — ${s}, ${ind} brand. Color scheme: ${col}. ${bg} background. Clean, scalable, vector-quality logo design. Legible brand name text, balanced proportions. Modern 2025 logo design, no drop shadows, no gradients unless requested, isolated on ${bg} background.`;
|
|
38
|
+
}
|
|
39
|
+
const DEFAULT_INSTAGRAM_BRAND_STYLE = 'modern, vibrant, clean typography, lifestyle photography aesthetic';
|
|
40
|
+
const DEFAULT_INSTAGRAM_FORMAT = '4:5';
|
|
41
|
+
const INSTAGRAM_FORMATS = new Set(['1:1', '4:5', '9:16']);
|
|
42
|
+
function resolveInstagramFormat(format) {
|
|
43
|
+
const f = (format !== null && format !== void 0 ? format : '').trim();
|
|
44
|
+
return INSTAGRAM_FORMATS.has(f) ? f : DEFAULT_INSTAGRAM_FORMAT;
|
|
45
|
+
}
|
|
46
|
+
function buildInstagramPrompt(brief, brandStyle) {
|
|
47
|
+
const style = orDefault(brandStyle, DEFAULT_INSTAGRAM_BRAND_STYLE);
|
|
48
|
+
return `Instagram hero image for: ${(brief !== null && brief !== void 0 ? brief : '').trim()}. Brand style: ${style}. Scroll-stopping, social-media-ready composition that communicates the concept within two seconds — strong focal point, clean negative space for text overlay, vibrant social-optimized color and lighting. High-quality, professional, on-brand.`;
|
|
49
|
+
}
|
|
50
|
+
const DEFAULT_YT_CHANNEL_STYLE = 'bold, high contrast, bright colors';
|
|
51
|
+
function buildYouTubeThumbnailPrompt(title, channelStyle, subjectDescription) {
|
|
52
|
+
const style = orDefault(channelStyle, DEFAULT_YT_CHANNEL_STYLE);
|
|
53
|
+
const subject = (subjectDescription !== null && subjectDescription !== void 0 ? subjectDescription : '').trim();
|
|
54
|
+
const subjectClause = subject ? ` Featured subject: ${subject}.` : '';
|
|
55
|
+
return `YouTube thumbnail for a video about: ${(title !== null && title !== void 0 ? title : '').trim()}.${subjectClause} Channel style: ${style}. High click-through-rate design — one dominant focal subject with an exaggerated emotional hook (surprise, excitement, curiosity), dramatic studio lighting, punchy saturated colors and strong contrast that pops against YouTube's grid, crisp depth of field. Rule-of-thirds composition with the subject offset and clean, uncluttered negative space on one side reserved for a text overlay. Photorealistic, eye-catching, professional. IMPORTANT: do NOT render any text, words, letters, numbers, captions, logos, or watermarks in the image — leave the negative space empty for a text overlay added afterward.`;
|
|
56
|
+
}
|
|
57
|
+
const DEFAULT_INTERIOR_STYLE = 'modern minimalist';
|
|
58
|
+
const DEFAULT_INTERIOR_PALETTE = 'neutral tones with wood accents';
|
|
59
|
+
const INTERIOR_SUFFIX = 'Cinematic lighting, architectural photography style, wide angle lens, 8k resolution, photorealistic textures. High-end interior design magazine quality.';
|
|
60
|
+
const INTERIOR_PHOTO_ADDENDUM = 'Maintain the structural layout and window placement of the reference room. Completely transform the furniture, decor, and wall finishes to match the new style.';
|
|
61
|
+
function buildInteriorPrompt(roomType, style, colorPalette, specificElements, hasPhoto) {
|
|
62
|
+
const room = (roomType !== null && roomType !== void 0 ? roomType : '').trim();
|
|
63
|
+
const s = orDefault(style, DEFAULT_INTERIOR_STYLE);
|
|
64
|
+
const pal = orDefault(colorPalette, DEFAULT_INTERIOR_PALETTE);
|
|
65
|
+
const parts = [
|
|
66
|
+
`Professional interior design visualization of a ${room}.`,
|
|
67
|
+
`Style: ${s}.`,
|
|
68
|
+
`Color palette: ${pal}.`,
|
|
69
|
+
];
|
|
70
|
+
const el = (specificElements !== null && specificElements !== void 0 ? specificElements : '').trim();
|
|
71
|
+
if (el)
|
|
72
|
+
parts.push(`${el}.`);
|
|
73
|
+
parts.push(INTERIOR_SUFFIX);
|
|
74
|
+
if (hasPhoto)
|
|
75
|
+
parts.push(INTERIOR_PHOTO_ADDENDUM);
|
|
76
|
+
return parts.join(' ');
|
|
77
|
+
}
|
|
78
|
+
const DEFAULT_GIANT_PERSON = 'a stylishly dressed man';
|
|
79
|
+
const GIANT_SUFFIX = 'Professional studio lighting, dramatic low-angle perspective emphasizing the enormous scale, clean background, hyper-realistic product detail, high-end commercial advertising photography, high resolution, photorealistic';
|
|
80
|
+
function buildGiantProductPrompt(personDescription) {
|
|
81
|
+
const person = orDefault(personDescription, DEFAULT_GIANT_PERSON);
|
|
82
|
+
return `Surreal advertising visual: the product is enlarged to a massive, building-sized scale, towering over ${person} who stands beside it for scale comparison. ${GIANT_SUFFIX}.`;
|
|
83
|
+
}
|
|
84
|
+
const DEFAULT_UGC_MODEL_DESC = 'woman, 25-30 years old, natural look, diverse';
|
|
85
|
+
const DEFAULT_UGC_SETTING = 'casual lifestyle, natural lighting';
|
|
86
|
+
const DEFAULT_UGC_VERB = 'wearing or using';
|
|
87
|
+
const UGC_SUFFIX = 'candid and relatable, social-media-ready, natural lighting, subtle film grain, shot on a phone, slightly unpolished and accidental composition — avoid overly polished or symmetrical framing, photorealistic, real-world environment, authentic atmosphere';
|
|
88
|
+
const UGC_PLATFORM_RATIOS = {
|
|
89
|
+
instagram: '4:5',
|
|
90
|
+
tiktok: '9:16',
|
|
91
|
+
pinterest: '2:3',
|
|
92
|
+
amazon: '1:1',
|
|
93
|
+
};
|
|
94
|
+
const UGC_PRODUCT_VERBS = { wearable: 'wearing', accessory: 'using' };
|
|
95
|
+
function resolveUGCAspect(platform) {
|
|
96
|
+
var _a;
|
|
97
|
+
const p = (platform !== null && platform !== void 0 ? platform : '').toLowerCase().trim();
|
|
98
|
+
return (_a = UGC_PLATFORM_RATIOS[p]) !== null && _a !== void 0 ? _a : UGC_PLATFORM_RATIOS.instagram;
|
|
99
|
+
}
|
|
100
|
+
function buildUGCPrompt(productName, productType, modelDescription, setting) {
|
|
101
|
+
var _a;
|
|
102
|
+
const verb = (_a = UGC_PRODUCT_VERBS[(productType !== null && productType !== void 0 ? productType : '').toLowerCase().trim()]) !== null && _a !== void 0 ? _a : DEFAULT_UGC_VERB;
|
|
103
|
+
const modelDesc = orDefault(modelDescription, DEFAULT_UGC_MODEL_DESC);
|
|
104
|
+
const set = orDefault(setting, DEFAULT_UGC_SETTING);
|
|
105
|
+
const product = (productName !== null && productName !== void 0 ? productName : '').trim();
|
|
106
|
+
return `Authentic user-generated content lifestyle photo of a ${modelDesc} ${verb} ${product}, with the ${product} naturally featured and clearly visible, in a ${set} setting, ${UGC_SUFFIX}`;
|
|
107
|
+
}
|
|
108
|
+
const DEFAULT_DRONE_SHOT = 'reveal';
|
|
109
|
+
const DEFAULT_DRONE_STYLE = 'golden hour, cinematic, 4K, ultra-detailed';
|
|
110
|
+
const DRONE_SUFFIX = 'DJI-quality drone footage, stabilized gimbal, no shake, cinematic color grade, photorealistic';
|
|
111
|
+
const DRONE_SHOTS = {
|
|
112
|
+
reveal: (s, st) => `Drone camera starts low, slowly ascends and reveals ${s}, sweeping wide aerial perspective, ${st}`,
|
|
113
|
+
orbit: (s, st) => `Drone camera orbits ${s} in a smooth circular arc, 360-degree aerial rotation, ${st}`,
|
|
114
|
+
flyover: (s, st) => `Drone camera flies low and fast over ${s}, tracking forward momentum, depth of field, ${st}`,
|
|
115
|
+
'top-down': (s, st) => `Perfect overhead bird's eye view of ${s}, drone looking straight down, minimal distortion, ${st}`,
|
|
116
|
+
};
|
|
117
|
+
function resolveDroneShot(shotType) {
|
|
118
|
+
const s = (shotType !== null && shotType !== void 0 ? shotType : '').toLowerCase().trim().replace(/_/g, '-').replace(/ /g, '-');
|
|
119
|
+
return DRONE_SHOTS[s] ? s : DEFAULT_DRONE_SHOT;
|
|
120
|
+
}
|
|
121
|
+
function buildDronePrompt(locationOrSubject, shotType, style) {
|
|
122
|
+
const shot = resolveDroneShot(shotType);
|
|
123
|
+
const st = orDefault(style, DEFAULT_DRONE_STYLE);
|
|
124
|
+
const body = DRONE_SHOTS[shot]((locationOrSubject !== null && locationOrSubject !== void 0 ? locationOrSubject : '').trim(), st);
|
|
125
|
+
return `${body}, ${DRONE_SUFFIX}`;
|
|
126
|
+
}
|
|
127
|
+
const PRODUCT_AD_SUFFIX = 'slow cinematic push-in, soft volumetric light, subtle product micro-rotation, shallow depth of field, premium commercial cinematography, smooth gimbal motion, professional colour grade, photorealistic, 4K, advertising quality';
|
|
128
|
+
const PRODUCT_AD_MOODS = {
|
|
129
|
+
luxury: 'elegant gold and black palette, opulent and premium atmosphere, dramatic key lighting',
|
|
130
|
+
playful: 'bright, saturated, vibrant colours, energetic and fun atmosphere, lively lighting',
|
|
131
|
+
minimal: 'clean minimalist palette, soft neutral tones, uncluttered studio backdrop',
|
|
132
|
+
tech: 'sleek modern palette, cool tones, crisp futuristic lighting',
|
|
133
|
+
};
|
|
134
|
+
function buildProductAdPrompt(brandBrief, mood) {
|
|
135
|
+
var _a;
|
|
136
|
+
const clause = (_a = PRODUCT_AD_MOODS[(mood !== null && mood !== void 0 ? mood : '').toLowerCase().trim()]) !== null && _a !== void 0 ? _a : '';
|
|
137
|
+
let body = `Cinematic product advertisement video. ${(brandBrief !== null && brandBrief !== void 0 ? brandBrief : '').trim()}`;
|
|
138
|
+
if (clause)
|
|
139
|
+
body += `, ${clause}`;
|
|
140
|
+
return `${body}, ${PRODUCT_AD_SUFFIX}`;
|
|
141
|
+
}
|
|
142
|
+
const DEFAULT_COOKING_DISH = 'fresh pasta';
|
|
143
|
+
const DEFAULT_COOKING_KITCHEN = 'Italian rustic-modern';
|
|
144
|
+
const DEFAULT_COOKING_OUTFIT = 'a clean apron over smart-casual clothing, sleeves rolled up';
|
|
145
|
+
const DEFAULT_COOKING_DURATION = '15';
|
|
146
|
+
function buildCookingSheetPrompt(dish, kitchenStyle, outfit, durationSeconds) {
|
|
147
|
+
const d = orDefault(dish, DEFAULT_COOKING_DISH);
|
|
148
|
+
const k = orDefault(kitchenStyle, DEFAULT_COOKING_KITCHEN);
|
|
149
|
+
const o = orDefault(outfit, DEFAULT_COOKING_OUTFIT);
|
|
150
|
+
const dur = orDefault(durationSeconds, DEFAULT_COOKING_DURATION);
|
|
151
|
+
return `Create one single composite reference sheet for a ${dur}-second realistic ${d}-making tutorial video. The image should be a clean, high-end production reference board, not a poster with heavy text. Format: wide reference sheet, elegant white margins, clean grid layout, realistic cinematic photography style. Concept: ${d} tutorial in a ${k} kitchen. Top row: motion / choreography guide with 9 numbered cinematic action panels showing the ${d} process step-by-step from raw ingredients to final plated dish. Middle-left: realistic character reference sheet of the uploaded person — preserve their exact face, hair color, hair texture, eye color, skin tone, and all facial features with 100% accuracy. Show the same person in: face close-up, full-body front view, side/action working pose, and back view. Dress them in ${o}. Keep them grounded, approachable, skilled, and cinematic. Middle-right / background: location reference sheet of an elegant ${k} kitchen with tactile surfaces, natural daylight from a large window, hanging cookware, herbs, and premium cooking atmosphere appropriate to the cuisine. Style: realistic, cinematic, warm natural light, shallow depth of field, tactile food photography, premium cooking show aesthetic, rich surface textures. Bottom strip: simple visual icons only. Minimal text, no dense paragraphs. Let the visuals do the heavy lifting.`;
|
|
152
|
+
}
|
|
153
|
+
function buildCookingVideoPrompt(dish, kitchenStyle, outfit, durationSeconds) {
|
|
154
|
+
const d = orDefault(dish, DEFAULT_COOKING_DISH);
|
|
155
|
+
const k = orDefault(kitchenStyle, DEFAULT_COOKING_KITCHEN);
|
|
156
|
+
const o = orDefault(outfit, DEFAULT_COOKING_OUTFIT);
|
|
157
|
+
const dur = orDefault(durationSeconds, DEFAULT_COOKING_DURATION);
|
|
158
|
+
return `Use the supplied reference sheet as the visual and narrative guide — preserve the exact face, hair, eye color, skin tone, and all facial features of the person shown in its character reference with 100% accuracy throughout the entire video, and follow the cooking steps, kitchen setting, outfit, and atmosphere it shows exactly. A single continuous cinematic video of that person making ${d} in the ${k} kitchen from the reference sheet. They wear ${o} throughout.
|
|
159
|
+
|
|
160
|
+
VIDEO STRUCTURE
|
|
161
|
+
Follow the exact 9-step sequence shown in the reference sheet, beat by beat, from raw ingredients through preparation to a final plated close-up.
|
|
162
|
+
|
|
163
|
+
MOTION STYLE
|
|
164
|
+
- Slow, deliberate, satisfying transitions between each step
|
|
165
|
+
- Natural hand and body movement with clear culinary intent
|
|
166
|
+
- Continuous flow with no jump cuts
|
|
167
|
+
- Warm and immersive pacing
|
|
168
|
+
|
|
169
|
+
CAMERA & CINEMATOGRAPHY
|
|
170
|
+
- Close-up shots for hands during mixing, kneading, cutting, plating
|
|
171
|
+
- Medium shots showing the person working at the counter
|
|
172
|
+
- Pull back slightly for the final plating to reveal the full kitchen
|
|
173
|
+
- Shallow depth of field — focus on hands and food, soft background blur
|
|
174
|
+
- No abrupt cuts — smooth match cuts and fluid transitions
|
|
175
|
+
|
|
176
|
+
VISUAL STYLE
|
|
177
|
+
- Warm natural daylight from a large kitchen window
|
|
178
|
+
- Rich tactile textures matching the reference sheet's environment
|
|
179
|
+
- Full color, warm cinematic color grading
|
|
180
|
+
|
|
181
|
+
CONSISTENCY RULES
|
|
182
|
+
- Same character throughout — the face from the reference sheet in every frame
|
|
183
|
+
- Same outfit across the entire video
|
|
184
|
+
- Same kitchen environment as shown in the reference sheet
|
|
185
|
+
|
|
186
|
+
AUDIO
|
|
187
|
+
- Soft kitchen ambience, gentle culinary SFX (chopping, sizzling, pouring), light cinematic underscore
|
|
188
|
+
- No dialogue, no narration
|
|
189
|
+
|
|
190
|
+
OUTPUT STYLE
|
|
191
|
+
- Duration: approximately ${dur} seconds
|
|
192
|
+
- Polished, cinematic, premium cooking show quality
|
|
193
|
+
- Ends with a beautiful close-up of the finished plated ${d}`;
|
|
194
|
+
}
|
|
195
|
+
const DEFAULT_JEWELRY_DESC = 'a delicate rose gold ring with a lotus design and a sparkling diamond';
|
|
196
|
+
const DEFAULT_JEWELRY_SURFACE = 'a beige surface';
|
|
197
|
+
function buildJewelryImagePrompt(jewelryDescription, surfaceDescription) {
|
|
198
|
+
const j = orDefault(jewelryDescription, DEFAULT_JEWELRY_DESC);
|
|
199
|
+
const s = orDefault(surfaceDescription, DEFAULT_JEWELRY_SURFACE);
|
|
200
|
+
return `Style: Luxury product ad, high-end commercial feel. Scene: ${j} resting on ${s}. A soft, warm light highlights the diamond, creating subtle highlights on the metal. 100mm macro lens photography, shallow DOF, incredible detail, elegant and minimal composition.`;
|
|
201
|
+
}
|
|
202
|
+
function buildJewelryVideoPrompt(jewelryDescription, surfaceDescription) {
|
|
203
|
+
const j = orDefault(jewelryDescription, DEFAULT_JEWELRY_DESC);
|
|
204
|
+
const s = orDefault(surfaceDescription, DEFAULT_JEWELRY_SURFACE);
|
|
205
|
+
return `Luxury jewelry advertisement, high-end commercial cinematography. Animate the supplied product still of ${j} resting on ${s}. Open with a close-up macro shot, 100mm lens, shallow depth of field — a soft, warm light highlights the diamond, creating subtle highlights on the metal, with a slow, elegant camera rotation around the piece. Then push into an extreme close-up on the diamond, 200mm macro lens, razor-thin depth of field, a focused LED light catching every facet as the camera glides slowly over the stone, showcasing its brilliance with ethereal, sparkling highlights. Smooth, refined movement throughout, premium macro product cinematography, photorealistic, advertising quality.`;
|
|
206
|
+
}
|
|
207
|
+
const DEFAULT_LOGO_MATERIAL = 'glossy glass and chrome';
|
|
208
|
+
function buildLogo3DImagePrompt(materialStyle) {
|
|
209
|
+
const m = orDefault(materialStyle, DEFAULT_LOGO_MATERIAL);
|
|
210
|
+
return `Transform the supplied flat 2D logo into a premium, high-quality 3D version. Render it as a ${m} material with realistic reflections, studio lighting, soft shadows, and subtle depth and bevels. Preserve the original logo's exact shapes, proportions, lettering, and composition. Clean neutral studio background, sharp focus, high detail, professional product-render quality.`;
|
|
211
|
+
}
|
|
212
|
+
function buildLogoAnimationPrompt(materialStyle) {
|
|
213
|
+
const m = orDefault(materialStyle, DEFAULT_LOGO_MATERIAL);
|
|
214
|
+
return `Cinematic 3D logo animation. Animate the supplied 3D logo (a ${m} material) with a smooth, elegant rotation that shows off its depth and bevels, dynamic studio lighting sweeps and lens flares catching the reflective surface, and polished motion-graphics flourishes. Build to a clean hero hold of the logo facing the camera. Premium brand-reveal aesthetic, soft volumetric light, shallow depth of field, smooth refined camera motion, photorealistic, advertising quality.`;
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../nodes/ImagineArt/transport/prompts.ts"],"names":[],"mappings":";;AAgBA,8CAGC;AAED,0CAYC;AAQD,wDAGC;AAED,oDAGC;AAKD,kEASC;AAUD,kDAoBC;AAOD,0DAGC;AAgBD,4CAGC;AAED,wCAWC;AAuBD,4CASC;AAYD,oDAKC;AAQD,0DAWC;AAED,0DA8CC;AAMD,0DAIC;AAED,0DAIC;AAKD,wDAGC;AAED,4DAGC;AAnRD,SAAS,SAAS,CAAC,KAAa,EAAE,QAAgB;IACjD,MAAM,CAAC,GAAG,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/B,OAAO,CAAC,IAAI,QAAQ,CAAC;AACtB,CAAC;AAGD,MAAM,kBAAkB,GAAG,oCAAoC,CAAC;AAChE,MAAM,qBAAqB,GAA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CAAC,sZAAsZ,CAAC;AAChe,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare function buildImageForm(p: {
|
|
2
|
+
prompt: string;
|
|
3
|
+
styleId: string;
|
|
4
|
+
variation: string;
|
|
5
|
+
aspectRatio: string;
|
|
6
|
+
orgId: string;
|
|
7
|
+
imageUrl?: string;
|
|
8
|
+
folderId?: string;
|
|
9
|
+
}): Record<string, string>;
|
|
10
|
+
export declare function buildVideoForm(p: {
|
|
11
|
+
prompt: string;
|
|
12
|
+
styleId: string;
|
|
13
|
+
variation: string;
|
|
14
|
+
aspectRatio: string;
|
|
15
|
+
duration: string;
|
|
16
|
+
orgId: string;
|
|
17
|
+
resolution?: string;
|
|
18
|
+
imageUrl?: string;
|
|
19
|
+
folderId?: string;
|
|
20
|
+
}): Record<string, string>;
|
|
21
|
+
export declare function buildMusicForm(p: {
|
|
22
|
+
prompt: string;
|
|
23
|
+
duration: string;
|
|
24
|
+
variation: string;
|
|
25
|
+
orgId: string;
|
|
26
|
+
folderId?: string;
|
|
27
|
+
}): Record<string, string>;
|
|
28
|
+
export declare function buildMultipartWithFile(fields: Record<string, string>, filePartName: string, file: {
|
|
29
|
+
buffer: Buffer;
|
|
30
|
+
filename: string;
|
|
31
|
+
mimeType: string;
|
|
32
|
+
}): {
|
|
33
|
+
body: Buffer;
|
|
34
|
+
contentType: string;
|
|
35
|
+
};
|
|
36
|
+
export declare function buildMultipartBody(fields: Record<string, string | string[]>): {
|
|
37
|
+
body: string;
|
|
38
|
+
contentType: string;
|
|
39
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildImageForm = buildImageForm;
|
|
4
|
+
exports.buildVideoForm = buildVideoForm;
|
|
5
|
+
exports.buildMusicForm = buildMusicForm;
|
|
6
|
+
exports.buildMultipartWithFile = buildMultipartWithFile;
|
|
7
|
+
exports.buildMultipartBody = buildMultipartBody;
|
|
8
|
+
function buildImageForm(p) {
|
|
9
|
+
const fields = {
|
|
10
|
+
prompt: p.prompt,
|
|
11
|
+
style_id: p.styleId,
|
|
12
|
+
variation: p.variation,
|
|
13
|
+
aspect_ratio: p.aspectRatio,
|
|
14
|
+
resolution: '1K',
|
|
15
|
+
count: '1',
|
|
16
|
+
org_id: p.orgId,
|
|
17
|
+
};
|
|
18
|
+
if (p.imageUrl)
|
|
19
|
+
fields.image_url = p.imageUrl;
|
|
20
|
+
if (p.folderId)
|
|
21
|
+
fields.parent_id = p.folderId;
|
|
22
|
+
return fields;
|
|
23
|
+
}
|
|
24
|
+
function buildVideoForm(p) {
|
|
25
|
+
const fields = {
|
|
26
|
+
prompt: p.prompt,
|
|
27
|
+
style_id: p.styleId,
|
|
28
|
+
variation: p.variation,
|
|
29
|
+
aspect_ratio: p.aspectRatio,
|
|
30
|
+
count: '1',
|
|
31
|
+
duration: p.duration,
|
|
32
|
+
org_id: p.orgId,
|
|
33
|
+
};
|
|
34
|
+
if (p.resolution)
|
|
35
|
+
fields.resolution = p.resolution;
|
|
36
|
+
if (p.imageUrl)
|
|
37
|
+
fields.image_url = p.imageUrl;
|
|
38
|
+
if (p.folderId)
|
|
39
|
+
fields.parent_id = p.folderId;
|
|
40
|
+
return fields;
|
|
41
|
+
}
|
|
42
|
+
function buildMusicForm(p) {
|
|
43
|
+
const fields = {
|
|
44
|
+
prompt: p.prompt,
|
|
45
|
+
duration: p.duration,
|
|
46
|
+
var: p.variation,
|
|
47
|
+
org_id: p.orgId,
|
|
48
|
+
};
|
|
49
|
+
if (p.folderId)
|
|
50
|
+
fields.parent_id = p.folderId;
|
|
51
|
+
return fields;
|
|
52
|
+
}
|
|
53
|
+
function buildMultipartWithFile(fields, filePartName, file) {
|
|
54
|
+
const boundary = '----n8nImagineArtFileBoundaryLZ81ewbC0Uu';
|
|
55
|
+
const chunks = [];
|
|
56
|
+
for (const [name, value] of Object.entries(fields)) {
|
|
57
|
+
chunks.push(Buffer.from(`--${boundary}\r\nContent-Disposition: form-data; name="${name}"\r\n\r\n${value}\r\n`));
|
|
58
|
+
}
|
|
59
|
+
chunks.push(Buffer.from(`--${boundary}\r\nContent-Disposition: form-data; name="${filePartName}"; filename="${file.filename}"\r\nContent-Type: ${file.mimeType}\r\n\r\n`));
|
|
60
|
+
chunks.push(file.buffer);
|
|
61
|
+
chunks.push(Buffer.from(`\r\n--${boundary}--\r\n`));
|
|
62
|
+
return { body: Buffer.concat(chunks), contentType: `multipart/form-data; boundary=${boundary}` };
|
|
63
|
+
}
|
|
64
|
+
function buildMultipartBody(fields) {
|
|
65
|
+
const boundary = '----n8nImagineArtFormBoundary7MA4YWxkTrZu0gW';
|
|
66
|
+
const parts = Object.entries(fields)
|
|
67
|
+
.flatMap(([name, value]) => (Array.isArray(value) ? value : [value]).map((v) => `--${boundary}\r\nContent-Disposition: form-data; name="${name}"\r\n\r\n${v}\r\n`))
|
|
68
|
+
.join('');
|
|
69
|
+
return {
|
|
70
|
+
body: `${parts}--${boundary}--\r\n`,
|
|
71
|
+
contentType: `multipart/form-data; boundary=${boundary}`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../nodes/ImagineArt/transport/request.ts"],"names":[],"mappings":";;AAEA,wCAqBC;AAED,wCA0BC;AAED,wCAeC;AAID,wDAoBC;AAOD,gDAgBC;AAjHD,SAAgB,cAAc,CAAC,CAQ9B;IACA,MAAM,MAAM,GAA2B;QACtC,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,QAAQ,EAAE,CAAC,CAAC,OAAO;QACnB,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,YAAY,EAAE,CAAC,CAAC,WAAW;QAC3B,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,CAAC,CAAC,KAAK;KACf,CAAC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,QAAQ,QAAQ;QACnC,WAAW,EAAE,iCAAiC,QAAQ,EAAE;KACxD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface StatusAsset {
|
|
2
|
+
status: string;
|
|
3
|
+
url?: {
|
|
4
|
+
generation?: string[];
|
|
5
|
+
thumbnail?: string[];
|
|
6
|
+
processed?: string[];
|
|
7
|
+
};
|
|
8
|
+
asset_metadata?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
export interface StatusResponse {
|
|
11
|
+
status: string;
|
|
12
|
+
assets: StatusAsset[];
|
|
13
|
+
}
|
|
14
|
+
export declare function isTerminal(status: string): boolean;
|
|
15
|
+
export declare function isSuccess(status: string): boolean;
|
|
16
|
+
export declare function isFailureStatus(status: string): boolean;
|
|
17
|
+
export declare function parseStatusResponse(body: unknown): StatusResponse;
|
|
18
|
+
export declare function firstGenerationUrl(res: StatusResponse): string | null;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isTerminal = isTerminal;
|
|
4
|
+
exports.isSuccess = isSuccess;
|
|
5
|
+
exports.isFailureStatus = isFailureStatus;
|
|
6
|
+
exports.parseStatusResponse = parseStatusResponse;
|
|
7
|
+
exports.firstGenerationUrl = firstGenerationUrl;
|
|
8
|
+
const NON_TERMINAL = new Set([
|
|
9
|
+
'queued',
|
|
10
|
+
'generating',
|
|
11
|
+
'running',
|
|
12
|
+
'pending',
|
|
13
|
+
'processing',
|
|
14
|
+
'in_progress',
|
|
15
|
+
]);
|
|
16
|
+
function isTerminal(status) {
|
|
17
|
+
return !NON_TERMINAL.has((status !== null && status !== void 0 ? status : '').toLowerCase());
|
|
18
|
+
}
|
|
19
|
+
function isSuccess(status) {
|
|
20
|
+
return (status !== null && status !== void 0 ? status : '').toLowerCase() === 'finished';
|
|
21
|
+
}
|
|
22
|
+
const FAILURE = new Set(['error', 'failed', 'cancelled', 'canceled', 'rejected']);
|
|
23
|
+
function isFailureStatus(status) {
|
|
24
|
+
return FAILURE.has((status !== null && status !== void 0 ? status : '').toLowerCase());
|
|
25
|
+
}
|
|
26
|
+
function parseStatusResponse(body) {
|
|
27
|
+
var _a;
|
|
28
|
+
const b = (body !== null && body !== void 0 ? body : {});
|
|
29
|
+
return { status: (_a = b.status) !== null && _a !== void 0 ? _a : '', assets: Array.isArray(b.assets) ? b.assets : [] };
|
|
30
|
+
}
|
|
31
|
+
function firstGenerationUrl(res) {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
for (const a of res.assets) {
|
|
34
|
+
const url = (_b = (_a = a.url) === null || _a === void 0 ? void 0 : _a.generation) === null || _b === void 0 ? void 0 : _b[0];
|
|
35
|
+
if (url)
|
|
36
|
+
return url;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../../nodes/ImagineArt/transport/status.ts"],"names":[],"mappings":";;AAqBA,gCAEC;AAED,8BAEC;AAOD,0CAEC;AAED,kDAGC;AAED,gDAMC;AArCD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC5B,QAAQ;IACR,YAAY;IACZ,SAAS;IACT,SAAS;IACT,YAAY;IACZ,aAAa;CACb,CAAC,CAAC;AAEH,SAAgB,UAAU,CAAC,MAAc;IACxC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,SAAgB,SAAS,CAAC,MAAc;IACvC,OAAO,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC;AACpD,CAAC;AAKD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAElF,SAAgB,eAAe,CAAC,MAAc;IAC7C,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAgB,mBAAmB,CAAC,IAAa;;IAChD,MAAM,CAAC,GAAG,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAgD,CAAC;IACtE,OAAO,EAAE,MAAM,EAAE,MAAA,CAAC,CAAC,MAAM,mCAAI,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACpF,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAAmB;;IACrD,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,MAAA,MAAA,CAAC,CAAC,GAAG,0CAAE,UAAU,0CAAG,CAAC,CAAC,CAAC;QACnC,IAAI,GAAG;YAAE,OAAO,GAAG,CAAC;IACrB,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface VideoModelConfig {
|
|
2
|
+
styleId: string;
|
|
3
|
+
variation: string;
|
|
4
|
+
aspectRatios: string[];
|
|
5
|
+
durations: string[];
|
|
6
|
+
resolutions: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare const DEFAULT_VIDEO_MODEL = "ltx-2.3";
|
|
9
|
+
export declare const DEFAULT_VIDEO_ASPECT = "16:9";
|
|
10
|
+
export declare const DEFAULT_VIDEO_DURATION = "6";
|
|
11
|
+
export declare function resolveVideoModel(model: string, aspectRatio: string, duration: string): {
|
|
12
|
+
model: string;
|
|
13
|
+
aspectRatio: string;
|
|
14
|
+
duration: string;
|
|
15
|
+
config: VideoModelConfig;
|
|
16
|
+
};
|
|
17
|
+
export declare function resolveVideoResolution(config: VideoModelConfig, requested: string): string;
|
|
18
|
+
export declare function videoModelOptions(): Array<{
|
|
19
|
+
name: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function videoAspectRatioOptions(): Array<{
|
|
23
|
+
name: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function videoDurationOptions(): Array<{
|
|
27
|
+
name: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_VIDEO_DURATION = exports.DEFAULT_VIDEO_ASPECT = exports.DEFAULT_VIDEO_MODEL = void 0;
|
|
4
|
+
exports.resolveVideoModel = resolveVideoModel;
|
|
5
|
+
exports.resolveVideoResolution = resolveVideoResolution;
|
|
6
|
+
exports.videoModelOptions = videoModelOptions;
|
|
7
|
+
exports.videoAspectRatioOptions = videoAspectRatioOptions;
|
|
8
|
+
exports.videoDurationOptions = videoDurationOptions;
|
|
9
|
+
exports.DEFAULT_VIDEO_MODEL = 'ltx-2.3';
|
|
10
|
+
exports.DEFAULT_VIDEO_ASPECT = '16:9';
|
|
11
|
+
exports.DEFAULT_VIDEO_DURATION = '6';
|
|
12
|
+
const DISPLAY = {
|
|
13
|
+
'veo-3.1': 'Veo 3.1',
|
|
14
|
+
'veo-3.1-fast': 'Veo 3.1 Fast',
|
|
15
|
+
'seedance-2.0': 'Seedance 2.0',
|
|
16
|
+
'seedance-2.0-fast': 'Seedance 2.0 Fast',
|
|
17
|
+
'seedance-1.5-pro': 'Seedance 1.5 Pro',
|
|
18
|
+
'seedance-pro-fast': 'Seedance Pro Fast',
|
|
19
|
+
'kling-3.0-pro': 'Kling 3.0 Pro',
|
|
20
|
+
'kling-2.6-pro': 'Kling 2.6 Pro',
|
|
21
|
+
'kling-o3': 'Kling O3',
|
|
22
|
+
'ltx-2.3': 'LTX 2.3',
|
|
23
|
+
'wan-2.6': 'Wan 2.6',
|
|
24
|
+
'wan-2.2': 'Wan 2.2',
|
|
25
|
+
'pixverse-v6': 'Pixverse v6',
|
|
26
|
+
happy_horse: 'Happy Horse',
|
|
27
|
+
};
|
|
28
|
+
const MODELS = {
|
|
29
|
+
'veo-3.1-fast': { styleId: '17002', variation: 'text_to_video', aspectRatios: ['16:9', '9:16'], durations: ['4', '6', '8'], resolutions: ['720p', '1080p', '4k'] },
|
|
30
|
+
'seedance-2.0-fast': { styleId: '21906', variation: 'text_to_video', aspectRatios: ['21:9', '16:9', '9:16', '3:4', '4:3', '1:1', 'auto'], durations: ['auto', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'], resolutions: ['480p', '720p'] },
|
|
31
|
+
happy_horse: { styleId: '23401', variation: 'text_to_video', aspectRatios: ['16:9', '9:16', '1:1', '4:3', '3:4'], durations: ['3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'], resolutions: ['720p', '1080p'] },
|
|
32
|
+
'seedance-2.0': { styleId: '21905', variation: 'text_to_video', aspectRatios: ['21:9', '16:9', '9:16', '3:4', '4:3', '1:1', 'auto'], durations: ['auto', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'], resolutions: ['480p', '720p', '1080p'] },
|
|
33
|
+
'ltx-2.3': { styleId: '23202', variation: 'text_to_video', aspectRatios: ['16:9', '9:16'], durations: ['6', '8', '10'], resolutions: ['1080p', '1440p', '2160p'] },
|
|
34
|
+
'wan-2.6': { styleId: '22309', variation: 'text_to_video', aspectRatios: ['16:9', '9:16', '1:1', '4:3', '3:4'], durations: ['5', '10', '15'], resolutions: ['720p', '1080p'] },
|
|
35
|
+
'seedance-1.5-pro': { styleId: '40005', variation: 'text_to_video', aspectRatios: ['21:9', '16:9', '9:16', '3:4', '4:3', '1:1'], durations: ['4', '5', '6', '7', '8', '9', '10', '11', '12'], resolutions: ['480p', '720p'] },
|
|
36
|
+
'seedance-pro-fast': { styleId: '40004', variation: 'text_to_video', aspectRatios: ['16:9', '4:3', '1:1', '9:16', '21:9', '3:4'], durations: ['3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], resolutions: ['480p', '720p', '1080p'] },
|
|
37
|
+
'kling-2.6-pro': { styleId: '11017', variation: 'text_to_video', aspectRatios: ['16:9', '9:16', '1:1'], durations: ['5', '10'], resolutions: [] },
|
|
38
|
+
'kling-o3': { styleId: '11021', variation: 'text_to_video', aspectRatios: ['16:9', '9:16', '1:1'], durations: ['3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'], resolutions: [] },
|
|
39
|
+
'kling-3.0-pro': { styleId: '11020', variation: 'text_to_video', aspectRatios: ['16:9', '9:16', '1:1'], durations: ['3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'], resolutions: [] },
|
|
40
|
+
'pixverse-v6': { styleId: '14010', variation: 'text_to_video', aspectRatios: ['16:9', '9:16', '4:3', '3:4', '1:1', '2:3', '3:2', '21:9'], durations: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'], resolutions: ['360p', '540p', '720p', '1080p'] },
|
|
41
|
+
'veo-3.1': { styleId: '17001', variation: 'text_to_video', aspectRatios: ['16:9', '9:16'], durations: ['4', '6', '8'], resolutions: ['720p', '1080p', '4k'] },
|
|
42
|
+
'wan-2.2': { styleId: '22701', variation: 'text_to_video', aspectRatios: [], durations: [], resolutions: [] },
|
|
43
|
+
};
|
|
44
|
+
function resolveOption(value, allowed, preferred) {
|
|
45
|
+
if (value && allowed.includes(value))
|
|
46
|
+
return value;
|
|
47
|
+
if (allowed.includes(preferred))
|
|
48
|
+
return preferred;
|
|
49
|
+
if (allowed.length > 0)
|
|
50
|
+
return allowed[0];
|
|
51
|
+
return preferred;
|
|
52
|
+
}
|
|
53
|
+
function resolveVideoModel(model, aspectRatio, duration) {
|
|
54
|
+
const resolvedModel = MODELS[model] ? model : exports.DEFAULT_VIDEO_MODEL;
|
|
55
|
+
const config = MODELS[resolvedModel];
|
|
56
|
+
return {
|
|
57
|
+
model: resolvedModel,
|
|
58
|
+
aspectRatio: resolveOption(aspectRatio, config.aspectRatios, exports.DEFAULT_VIDEO_ASPECT),
|
|
59
|
+
duration: resolveOption(duration, config.durations, exports.DEFAULT_VIDEO_DURATION),
|
|
60
|
+
config,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function resolveVideoResolution(config, requested) {
|
|
64
|
+
var _a;
|
|
65
|
+
const r = (requested !== null && requested !== void 0 ? requested : '').toLowerCase().trim();
|
|
66
|
+
if (r && config.resolutions.includes(r))
|
|
67
|
+
return r;
|
|
68
|
+
return (_a = config.resolutions[0]) !== null && _a !== void 0 ? _a : '';
|
|
69
|
+
}
|
|
70
|
+
function videoModelOptions() {
|
|
71
|
+
const keys = [exports.DEFAULT_VIDEO_MODEL, ...Object.keys(MODELS).filter((k) => k !== exports.DEFAULT_VIDEO_MODEL)];
|
|
72
|
+
return keys.map((k) => { var _a; return ({ name: (_a = DISPLAY[k]) !== null && _a !== void 0 ? _a : k, value: k }); });
|
|
73
|
+
}
|
|
74
|
+
function videoAspectRatioOptions() {
|
|
75
|
+
const all = new Set();
|
|
76
|
+
for (const m of Object.values(MODELS))
|
|
77
|
+
for (const a of m.aspectRatios)
|
|
78
|
+
all.add(a);
|
|
79
|
+
return [...all].map((a) => ({ name: a, value: a }));
|
|
80
|
+
}
|
|
81
|
+
function videoDurationOptions() {
|
|
82
|
+
const all = new Set();
|
|
83
|
+
for (const m of Object.values(MODELS))
|
|
84
|
+
for (const d of m.durations)
|
|
85
|
+
all.add(d);
|
|
86
|
+
const sorted = [...all].sort((a, b) => {
|
|
87
|
+
if (a === 'auto')
|
|
88
|
+
return -1;
|
|
89
|
+
if (b === 'auto')
|
|
90
|
+
return 1;
|
|
91
|
+
return Number(a) - Number(b);
|
|
92
|
+
});
|
|
93
|
+
return sorted.map((d) => ({ name: d === 'auto' ? 'Auto' : `${d}s`, value: d }));
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=videoModels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoModels.js","sourceRoot":"","sources":["../../../../nodes/ImagineArt/transport/videoModels.ts"],"names":[],"mappings":";;;AAuDA,8CAaC;AAID,wDAIC;AAED,8CAGC;AAED,0DAIC;AAED,oDASC;AA1FY,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAChC,QAAA,oBAAoB,GAAG,MAAM,CAAC;AAC9B,QAAA,sBAAsB,GAAG,GAAG,CAAC;AAE1C,MAAM,OAAO,GAA2B;IACvC,SAAS,EAAE,SAAS;IACpB,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,mBAAmB,EAAE,mBAAmB;IACxC,kBAAkB,EAAE,kBAAkB;IACtC,mBAAmB,EAAE,mBAAmB;IACxC,eAAe,EAAE,eAAe;IAChC,eAAe,EAAE,eAAe;IAChC,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,aAAa;CAC1B,CAAC;AAIF,MAAM,MAAM,GAAqC;IAChD,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE;IAClK,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,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AAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;QAAE,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS;YAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC/E,MAAM,MAAM,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACrC,IAAI,CAAC,KAAK,MAAM;YAAE,OAAO,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,KAAK,MAAM;YAAE,OAAO,CAAC,CAAC;QAC3B,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACjF,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teamimagine/n8n-nodes-imagineart",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "n8n community node for ImagineArt \u2014 generate images, video, and more.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/Vyro-ai/n8n-nodes-imagineart#readme",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"n8n-community-node-package",
|
|
12
|
+
"n8n",
|
|
13
|
+
"imagineart",
|
|
14
|
+
"imagine-art",
|
|
15
|
+
"ai",
|
|
16
|
+
"image-generation",
|
|
17
|
+
"video-generation",
|
|
18
|
+
"text-to-image",
|
|
19
|
+
"text-to-video",
|
|
20
|
+
"music-generation"
|
|
21
|
+
],
|
|
22
|
+
"author": {
|
|
23
|
+
"name": "Ashad001",
|
|
24
|
+
"email": "ashad001sp@gmail.com"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/Vyro-ai/n8n-nodes-imagineart.git"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "n8n-node build",
|
|
32
|
+
"build:watch": "tsc --watch",
|
|
33
|
+
"dev": "n8n-node dev",
|
|
34
|
+
"lint": "n8n-node lint",
|
|
35
|
+
"lint:fix": "n8n-node lint --fix",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"test:watch": "vitest",
|
|
38
|
+
"release": "n8n-node release",
|
|
39
|
+
"prepublishOnly": "n8n-node prerelease"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist"
|
|
43
|
+
],
|
|
44
|
+
"n8n": {
|
|
45
|
+
"n8nNodesApiVersion": 1,
|
|
46
|
+
"strict": true,
|
|
47
|
+
"credentials": [
|
|
48
|
+
"dist/credentials/ImagineArtOAuth2Api.credentials.js"
|
|
49
|
+
],
|
|
50
|
+
"nodes": [
|
|
51
|
+
"dist/nodes/ImagineArt/ImagineArt.node.js"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@n8n/node-cli": "*",
|
|
56
|
+
"eslint": "9.32.0",
|
|
57
|
+
"prettier": "3.6.2",
|
|
58
|
+
"release-it": "^19.0.4",
|
|
59
|
+
"typescript": "5.9.2",
|
|
60
|
+
"vitest": "^4.1.9"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"n8n-workflow": "*"
|
|
64
|
+
}
|
|
65
|
+
}
|