@cognima/banners 0.0.1-beta
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/assets/fonts/Manrope/Manrope-Bold.ttf +0 -0
- package/assets/fonts/Manrope/Manrope-Regular.ttf +0 -0
- package/assets/fonts/Others/AbyssinicaSIL-Regular.ttf +0 -0
- package/assets/fonts/Others/ChirpRegular.ttf +0 -0
- package/assets/fonts/Poppins/Poppins-Bold.ttf +0 -0
- package/assets/fonts/Poppins/Poppins-Medium.ttf +0 -0
- package/assets/fonts/Poppins/Poppins-Regular.ttf +0 -0
- package/assets/placeholders/album_art.png +0 -0
- package/assets/placeholders/avatar.png +0 -0
- package/assets/placeholders/badge.jpg +0 -0
- package/assets/placeholders/badge.png +0 -0
- package/assets/placeholders/badge_2.jpg +0 -0
- package/assets/placeholders/badge_3.jpg +0 -0
- package/assets/placeholders/badge_4.jpg +0 -0
- package/assets/placeholders/badge_5.jpg +0 -0
- package/assets/placeholders/banner.jpeg +0 -0
- package/assets/placeholders/images.jpeg +0 -0
- package/index.js +153 -0
- package/package.json +34 -0
- package/src/animation-effects.js +631 -0
- package/src/cache-manager.js +258 -0
- package/src/community-banner.js +1536 -0
- package/src/constants.js +208 -0
- package/src/discord-profile.js +584 -0
- package/src/e-commerce-banner.js +1214 -0
- package/src/effects.js +355 -0
- package/src/error-handler.js +305 -0
- package/src/event-banner.js +1319 -0
- package/src/facebook-post.js +679 -0
- package/src/gradient-welcome.js +430 -0
- package/src/image-filters.js +1034 -0
- package/src/image-processor.js +1014 -0
- package/src/instagram-post.js +504 -0
- package/src/interactive-elements.js +1208 -0
- package/src/linkedin-post.js +658 -0
- package/src/marketing-banner.js +1089 -0
- package/src/minimalist-banner.js +892 -0
- package/src/modern-profile.js +755 -0
- package/src/performance-optimizer.js +216 -0
- package/src/telegram-header.js +544 -0
- package/src/test-runner.js +645 -0
- package/src/tiktok-post.js +713 -0
- package/src/twitter-header.js +604 -0
- package/src/validator.js +442 -0
- package/src/welcome-leave.js +445 -0
- package/src/whatsapp-status.js +386 -0
- package/src/youtube-thumbnail.js +681 -0
- package/utils.js +710 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @cognima/banners
|
|
5
|
+
*
|
|
6
|
+
* Módulo para criação de banners para diversas plataformas e finalidades.
|
|
7
|
+
*
|
|
8
|
+
* @module @cognima/banners
|
|
9
|
+
* @author Cognima Team (melhorado)
|
|
10
|
+
* @version 3.0.0
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// Importa os módulos principais
|
|
14
|
+
const welcomeLeave = require('./src/welcome-leave');
|
|
15
|
+
const discordProfile = require('./src/discord-profile');
|
|
16
|
+
const gradientWelcome = require('./src/gradient-welcome');
|
|
17
|
+
const whatsappStatus = require('./src/whatsapp-status');
|
|
18
|
+
const instagramPost = require('./src/instagram-post');
|
|
19
|
+
const youtubeThumbnail = require('./src/youtube-thumbnail');
|
|
20
|
+
const tiktokPost = require('./src/tiktok-post');
|
|
21
|
+
const linkedinPost = require('./src/linkedin-post');
|
|
22
|
+
const facebookPost = require('./src/facebook-post');
|
|
23
|
+
const eventBanner = require('./src/event-banner');
|
|
24
|
+
const marketingBanner = require('./src/marketing-banner');
|
|
25
|
+
const ecommerceBanner = require('./src/e-commerce-banner');
|
|
26
|
+
const communityBanner = require('./src/community-banner');
|
|
27
|
+
const modernProfile = require('./src/modern-profile');
|
|
28
|
+
const minimalistBanner = require('./src/minimalist-banner');
|
|
29
|
+
const telegramHeader = require('./src/telegram-header');
|
|
30
|
+
const twitterHeader = require('./src/twitter-header');
|
|
31
|
+
|
|
32
|
+
// Importa os módulos de utilidades
|
|
33
|
+
const utils = require('./utils');
|
|
34
|
+
const effects = require('./src/effects');
|
|
35
|
+
const imageFilters = require('./src/image-filters');
|
|
36
|
+
const imageProcessor = require('./src/image-processor');
|
|
37
|
+
const animationEffects = require('./src/animation-effects');
|
|
38
|
+
const interactiveElements = require('./src/interactive-elements');
|
|
39
|
+
const constants = require('./src/constants');
|
|
40
|
+
const validator = require('./src/validator');
|
|
41
|
+
const cacheManager = require('./src/cache-manager');
|
|
42
|
+
const performanceOptimizer = require('./src/performance-optimizer');
|
|
43
|
+
const errorHandler = require('./src/error-handler');
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Classe principal do módulo
|
|
47
|
+
*/
|
|
48
|
+
class CognimaBanners {
|
|
49
|
+
constructor() {
|
|
50
|
+
// Inicializa as classes
|
|
51
|
+
this.welcomeLeave = welcomeLeave;
|
|
52
|
+
this.discordProfile = discordProfile;
|
|
53
|
+
this.gradientWelcome = gradientWelcome;
|
|
54
|
+
this.whatsappStatus = whatsappStatus;
|
|
55
|
+
this.instagramPost = instagramPost;
|
|
56
|
+
this.youtubeThumbnail = youtubeThumbnail;
|
|
57
|
+
this.tiktokPost = tiktokPost;
|
|
58
|
+
this.linkedinPost = linkedinPost;
|
|
59
|
+
this.facebookPost = facebookPost;
|
|
60
|
+
this.eventBanner = eventBanner;
|
|
61
|
+
this.marketingBanner = marketingBanner;
|
|
62
|
+
this.ecommerceBanner = ecommerceBanner;
|
|
63
|
+
this.communityBanner = communityBanner;
|
|
64
|
+
this.modernProfile = modernProfile;
|
|
65
|
+
this.minimalistBanner = minimalistBanner;
|
|
66
|
+
this.telegramHeader = telegramHeader;
|
|
67
|
+
this.twitterHeader = twitterHeader;
|
|
68
|
+
|
|
69
|
+
// Adiciona as utilidades
|
|
70
|
+
this.utils = utils;
|
|
71
|
+
this.effects = effects;
|
|
72
|
+
this.imageFilters = imageFilters;
|
|
73
|
+
this.imageProcessor = imageProcessor;
|
|
74
|
+
this.animationEffects = animationEffects;
|
|
75
|
+
this.interactiveElements = interactiveElements;
|
|
76
|
+
this.constants = constants;
|
|
77
|
+
this.validator = validator;
|
|
78
|
+
this.cacheManager = cacheManager;
|
|
79
|
+
this.performanceOptimizer = performanceOptimizer;
|
|
80
|
+
this.errorHandler = errorHandler;
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Configura opções globais para o módulo
|
|
86
|
+
*
|
|
87
|
+
* @param {Object} options - Opções globais
|
|
88
|
+
* @param {boolean} [options.useCache=true] - Se deve usar cache
|
|
89
|
+
* @param {boolean} [options.optimizePerformance=true] - Se deve otimizar performance
|
|
90
|
+
* @param {boolean} [options.debug=false] - Se deve mostrar mensagens de debug
|
|
91
|
+
* @returns {CognimaBanners} - A instância atual para encadeamento
|
|
92
|
+
*/
|
|
93
|
+
configure(options) {
|
|
94
|
+
if (options.useCache !== undefined) {
|
|
95
|
+
this.cacheManager.setEnabled(options.useCache);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (options.optimizePerformance !== undefined) {
|
|
99
|
+
this.performanceOptimizer.setEnabled(options.optimizePerformance);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (options.debug !== undefined) {
|
|
103
|
+
this.errorHandler.setDebug(options.debug);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Limpa o cache
|
|
111
|
+
*
|
|
112
|
+
* @returns {CognimaBanners} - A instância atual para encadeamento
|
|
113
|
+
*/
|
|
114
|
+
clearCache() {
|
|
115
|
+
this.cacheManager.clearCache();
|
|
116
|
+
return this;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Obtém a versão do módulo
|
|
121
|
+
*
|
|
122
|
+
* @returns {string} - Versão do módulo
|
|
123
|
+
*/
|
|
124
|
+
getVersion() {
|
|
125
|
+
return '3.0.0';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Obtém informações sobre o módulo
|
|
130
|
+
*
|
|
131
|
+
* @returns {Object} - Informações sobre o módulo
|
|
132
|
+
*/
|
|
133
|
+
getInfo() {
|
|
134
|
+
return {
|
|
135
|
+
name: '@cognima/banners',
|
|
136
|
+
version: this.getVersion(),
|
|
137
|
+
author: 'Cognima Team',
|
|
138
|
+
description: 'Módulo para criação de banners para diversas plataformas e finalidades.',
|
|
139
|
+
bannerTypes: [
|
|
140
|
+
'welcome', 'leave', 'discord-profile', 'whatsapp-status',
|
|
141
|
+
'instagram-post', 'youtube-thumbnail', 'tiktok-post',
|
|
142
|
+
'linkedin-post', 'facebook-post', 'event', 'advertisement',
|
|
143
|
+
'landing-page', 'product', 'promotion', 'announcement',
|
|
144
|
+
'quote', 'poll', 'modern-profile', 'minimalist',
|
|
145
|
+
'telegram-header', 'twitter-header'
|
|
146
|
+
]
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Exporta a instância principal
|
|
152
|
+
module.exports = new CognimaBanners();
|
|
153
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cognima/banners",
|
|
3
|
+
"version": "0.0.1-beta",
|
|
4
|
+
"description": "Biblioteca avançada para geração de banners dinâmicos para diversas plataformas e aplicações",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"banners",
|
|
8
|
+
"cards",
|
|
9
|
+
"images",
|
|
10
|
+
"discord",
|
|
11
|
+
"welcome",
|
|
12
|
+
"instagram",
|
|
13
|
+
"whatsapp",
|
|
14
|
+
"facebook",
|
|
15
|
+
"twitter",
|
|
16
|
+
"linkedin",
|
|
17
|
+
"tiktok",
|
|
18
|
+
"youtube",
|
|
19
|
+
"profile",
|
|
20
|
+
"canvas",
|
|
21
|
+
"pureimage",
|
|
22
|
+
"social-media"
|
|
23
|
+
],
|
|
24
|
+
"author": "Cognima Team <suporte@cognima.com>",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"axios": "^1.6.2",
|
|
28
|
+
"pureimage": "^0.4.13"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://cognima.com.br",
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=14.0.0"
|
|
33
|
+
}
|
|
34
|
+
}
|