update-base-config 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/README.md +27 -0
- package/package.json +21 -0
- package/src/index.js +153 -0
- package/src/lib.js +144 -0
- package/templates/skills/ids/SKILL.md +40 -0
- package/templates/skills/ids/docs/SKILL_ID_MANAGEMENT.md +438 -0
- package/templates/skills/ids/docs/SKILL_INICIO.txt +124 -0
- package/templates/skills/ids/docs/SKILL_QUICK_START.md +260 -0
- package/templates/skills/ids/docs/SKILL_README.md +230 -0
- package/templates/skills/tailwind/SKILL.md +43 -0
- package/templates/skills/tailwind/docs/SKILL_TAILWIND_BEFORE_AFTER.md +796 -0
- package/templates/skills/tailwind/docs/SKILL_TAILWIND_COPILOT_PROMPT.md +295 -0
- package/templates/skills/tailwind/docs/SKILL_TAILWIND_CUSTOM.md +776 -0
- package/templates/skills/tailwind/docs/SKILL_TAILWIND_INDEX.md +315 -0
- package/templates/skills/tailwind/docs/SKILL_TAILWIND_QUICK_START.md +426 -0
- package/templates/skills/tailwind/docs/SKILL_TAILWIND_SUMMARY.md +436 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# Instrucciones para Copilot - Tailwind Custom (tw-blue & tw-green)
|
|
2
|
+
|
|
3
|
+
> ⚠️ **IMPORTANTE**: Este archivo contiene instrucciones que el equipo debe proporcionar a Copilot/AI antes de solicitar crear maquetas.
|
|
4
|
+
|
|
5
|
+
## 🎯 Contexto del Proyecto
|
|
6
|
+
|
|
7
|
+
Este es un proyecto **Vue 3 + Vite** que usa **Tailwind CSS v3 CON PRESETS PERSONALIZADOS**.
|
|
8
|
+
|
|
9
|
+
### Stack de Diseño
|
|
10
|
+
|
|
11
|
+
- **CSS Framework**: Tailwind CSS v3.4
|
|
12
|
+
- **Presets Activos**: `tw-blue` (principal), `tw-green` (secundario)
|
|
13
|
+
- **Colores Corporativos**: Paleta del Banco de Chile (azul + variantes)
|
|
14
|
+
- **Componentes**: @exdbch/components-lib (librería privada interna)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## ✅ Colores Disponibles
|
|
19
|
+
|
|
20
|
+
Estos colores están **definidos en el preset** y deben usarse siempre que sea posible:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
PRIMARIOS (tw-blue preset):
|
|
24
|
+
├── brand (Azul principal - #007BC4 aproximado)
|
|
25
|
+
├── brand-light (Azul claro - para gradientes)
|
|
26
|
+
├── brand-dark (Azul oscuro - fondos)
|
|
27
|
+
├── brand-lighter (Azul muy claro)
|
|
28
|
+
├── primary (Variante primaria)
|
|
29
|
+
├── primary-light (Variante clara)
|
|
30
|
+
├── secondary (Secundario)
|
|
31
|
+
└── accent (Acentos)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 📝 Instrucciones de Implementación
|
|
37
|
+
|
|
38
|
+
### Regla #1: Usar Presets, No Tailwind Estándar
|
|
39
|
+
|
|
40
|
+
```vue
|
|
41
|
+
<!-- ❌ NUNCA hagas esto -->
|
|
42
|
+
<div class="bg-blue-500 text-gray-700 border-blue-300">
|
|
43
|
+
❌ Incorrecto - Usa colores genéricos de Tailwind
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<!-- ✅ SIEMPRE haz esto -->
|
|
47
|
+
<div class="bg-brand text-gray-700 border-brand-light">
|
|
48
|
+
✅ Correcto - Usa colores del preset
|
|
49
|
+
</div>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Regla #2: Gradientes con Colores del Preset
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<!-- ❌ INCORRECTO -->
|
|
56
|
+
<h1 class="bg-gradient-to-r from-blue-400 to-blue-600">Título</h1>
|
|
57
|
+
|
|
58
|
+
<!-- ✅ CORRECTO -->
|
|
59
|
+
<h1 class="text-transparent bg-clip-text bg-gradient-to-r from-brand-light to-primary">
|
|
60
|
+
Título
|
|
61
|
+
</h1>
|
|
62
|
+
|
|
63
|
+
<!-- ✅ TAMBIÉN CORRECTO -->
|
|
64
|
+
<div class="bg-gradient-to-tl from-brand-dark via-brand to-brand/80">
|
|
65
|
+
Contenedor
|
|
66
|
+
</div>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Regla #3: Valores Arbitrarios Solo Cuando NO Existan en Preset
|
|
70
|
+
|
|
71
|
+
```vue
|
|
72
|
+
<!-- ✅ CORRECTO - Valor arbitrario porque es específico -->
|
|
73
|
+
<div class="py-[14px] px-7 rounded-bl-[44px]">
|
|
74
|
+
Padding/tamaño específico no en Tailwind estándar
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<!-- ✅ CORRECTO - Opacidad no disponible -->
|
|
78
|
+
<div class="bg-brand/75">
|
|
79
|
+
Brand con opacidad específica
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<!-- ❌ INCORRECTO - Existe en preset -->
|
|
83
|
+
<div class="bg-[#0080FF]">
|
|
84
|
+
❌ Usa valores arbitrarios cuando color EXISTE en preset
|
|
85
|
+
</div>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Regla #4: Breakpoints Responsivos
|
|
89
|
+
|
|
90
|
+
```vue
|
|
91
|
+
<!-- ✅ CORRECTO -->
|
|
92
|
+
<div class="bg-brand md:bg-brand-light lg:bg-primary">
|
|
93
|
+
Adapta colores según pantalla
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<!-- ✅ CORRECTO -->
|
|
97
|
+
<h1 class="text-5 md:text-[64px] lg:text-left">
|
|
98
|
+
Título responsivo
|
|
99
|
+
</h1>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Regla #5: Estados Interactivos
|
|
103
|
+
|
|
104
|
+
```vue
|
|
105
|
+
<!-- ✅ CORRECTO -->
|
|
106
|
+
<button class="bg-brand hover:bg-brand-dark active:bg-primary transition-all">
|
|
107
|
+
Botón con estados
|
|
108
|
+
</button>
|
|
109
|
+
|
|
110
|
+
<!-- ✅ CORRECTO -->
|
|
111
|
+
<div class="border-brand focus:border-primary">
|
|
112
|
+
Input con focus state
|
|
113
|
+
</div>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 🎨 Paleta de Colores - Referencia Visual
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
tw-blue Preset:
|
|
122
|
+
|
|
123
|
+
└── BRAND (Azul Corporativo)
|
|
124
|
+
├── brand-light ← Gradientes (origen)
|
|
125
|
+
├── brand ← Fondos primarios
|
|
126
|
+
├── brand-dark ← Fondos oscuros
|
|
127
|
+
└── brand-lighter ← Fondos suaves
|
|
128
|
+
|
|
129
|
+
└── PRIMARY (Variante)
|
|
130
|
+
├── primary-light ← Gradientes claras
|
|
131
|
+
└── primary ← Botones, acciones
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 📋 Checklist Antes de Generar Código
|
|
137
|
+
|
|
138
|
+
Antes de crear una maqueta, verifica:
|
|
139
|
+
|
|
140
|
+
- [ ] ¿Necesito colores? → Usar `brand`, `primary`, etc.
|
|
141
|
+
- [ ] ¿Necesito gradientes? → Usar `from-brand-light to-primary`
|
|
142
|
+
- [ ] ¿Necesito tamaños específicos? → Usar arbitrarios `[tamaño]`
|
|
143
|
+
- [ ] ¿El color existe en preset? → NO usar arbitrarios (ej: NO `bg-[#0080FF]`)
|
|
144
|
+
- [ ] ¿Necesito opacidad? → Usar `color/50`, `color/75`, etc.
|
|
145
|
+
- [ ] ¿Es responsive? → Incluir breakpoints `md:`, `lg:`
|
|
146
|
+
- [ ] ¿Tiene estados? → Incluir `hover:`, `focus:`, `active:`
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 🚫 Lo Que NUNCA Debes Hacer
|
|
151
|
+
|
|
152
|
+
1. **No uses colores estándar de Tailwind**
|
|
153
|
+
|
|
154
|
+
- ❌ `bg-blue-500`, `text-gray-700`, `border-red-300`
|
|
155
|
+
- ✅ `bg-brand`, `text-gray-700`, `border-brand-light`
|
|
156
|
+
|
|
157
|
+
2. **No uses valores arbitrarios para colores que existen**
|
|
158
|
+
|
|
159
|
+
- ❌ `bg-[#0080FF]` (si es azul corporativo, usa `bg-brand`)
|
|
160
|
+
- ✅ `bg-brand` (usa el color del preset)
|
|
161
|
+
|
|
162
|
+
3. **No olvides gradientes personalizados**
|
|
163
|
+
|
|
164
|
+
- ❌ `from-blue-500 to-blue-700`
|
|
165
|
+
- ✅ `from-brand-light to-primary`
|
|
166
|
+
|
|
167
|
+
4. **No uses valores de espaciado fuera de la escala 1-7**
|
|
168
|
+
|
|
169
|
+
- ❌ `p-8`, `m-10`, `gap-12`
|
|
170
|
+
- ✅ `p-7` (40px - máximo) o `p-[48px]` (arbitrario para > 40px)
|
|
171
|
+
|
|
172
|
+
5. **No uses tamaños de fuente mayores a text-8**
|
|
173
|
+
|
|
174
|
+
- ❌ `text-5xl`, `text-9xl`
|
|
175
|
+
- ✅ `text-8` (40px - máximo) o `text-[48px]` (arbitrario)
|
|
176
|
+
|
|
177
|
+
6. **No ignores breakpoints customizados**
|
|
178
|
+
|
|
179
|
+
- ❌ Usar solo `bg-brand` en desktop
|
|
180
|
+
- ✅ `bg-brand md:bg-brand-light lg:bg-primary`
|
|
181
|
+
- **Nota**: md = 768px (NO 770px de Modyo 8)
|
|
182
|
+
|
|
183
|
+
7. **No uses nombres genéricos para colores**
|
|
184
|
+
|
|
185
|
+
- ❌ "azul", "gris", "rojo"
|
|
186
|
+
- ✅ "brand", "primary", "brand-dark"
|
|
187
|
+
|
|
188
|
+
8. **No olvides que las duraciones customizadas son limitadas**
|
|
189
|
+
- ❌ `duration-400` (no existe tal cual)
|
|
190
|
+
- ✅ `duration-300`, `duration-500` o `duration-[400ms]` (arbitrario)
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 💡 Tips Prácticos
|
|
195
|
+
|
|
196
|
+
### Cuando No Sepas Qué Color Usar
|
|
197
|
+
|
|
198
|
+
1. Abre [`tailwind.config.js`](./tailwind.config.js)
|
|
199
|
+
2. Ve la sección `presets: [twBlue]`
|
|
200
|
+
3. Usa colores disponibles: `brand`, `primary`, etc.
|
|
201
|
+
4. O consulta ejemplos reales en:
|
|
202
|
+
- [`src/pages/Charlas/Charlas.vue`](./src/pages/Charlas/Charlas.vue)
|
|
203
|
+
- [`src/pages/ValeVista/sections/BeneficiosSlider.vue`](./src/pages/ValeVista/sections/BeneficiosSlider.vue)
|
|
204
|
+
|
|
205
|
+
### Cuando Necesites Un Color Específico
|
|
206
|
+
|
|
207
|
+
```javascript
|
|
208
|
+
// Paso 1: ¿Existe en preset?
|
|
209
|
+
brand, brand-light, brand-dark, primary, primary-light, secondary, accent, gray, success, warning, error
|
|
210
|
+
|
|
211
|
+
// Paso 2: Si NO existe
|
|
212
|
+
Usa valor arbitrario: bg-[#FF5733] o text-[#333333]
|
|
213
|
+
|
|
214
|
+
// Paso 3: Si es frecuente
|
|
215
|
+
Propón agregar al preset en tailwind.config.js
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Cuando Necesites Espaciado o Tipografía
|
|
219
|
+
|
|
220
|
+
```javascript
|
|
221
|
+
// ESPACIADO (solo 1-7 = 4px a 40px)
|
|
222
|
+
// ¿Está entre 4px y 40px?
|
|
223
|
+
p-1 (4px), p-5 (24px), p-7 (40px) ✅
|
|
224
|
+
|
|
225
|
+
// ¿Necesitas más de 40px?
|
|
226
|
+
p-[48px], m-[80px], gap-[56px] ✅
|
|
227
|
+
|
|
228
|
+
// TIPOGRAFÍA (solo hasta text-8 = 40px)
|
|
229
|
+
// ¿Está entre 12px y 40px?
|
|
230
|
+
text-1/xs (12px), text-5/xl (24px), text-8/4xl (40px) ✅
|
|
231
|
+
|
|
232
|
+
// ¿Necesitas más de 40px?
|
|
233
|
+
text-[48px], text-[64px] ✅
|
|
234
|
+
|
|
235
|
+
// BORDES
|
|
236
|
+
rounded-1/sm (4px), rounded-2/md (8px), rounded-3/lg (16px), rounded-full ✅
|
|
237
|
+
rounded-[24px], rounded-bl-[44px] (arbitrarios específicos) ✅
|
|
238
|
+
|
|
239
|
+
// TRANSICIONES
|
|
240
|
+
duration-300, duration-1000 (disponibles) ✅
|
|
241
|
+
duration-[400ms] (arbitrario si no existe) ✅
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Para Gradientes Especiales
|
|
245
|
+
|
|
246
|
+
```vue
|
|
247
|
+
<!-- Combinaciones comunes del proyecto -->
|
|
248
|
+
<div class="bg-gradient-to-r from-brand-light to-primary">
|
|
249
|
+
Horizontal classic
|
|
250
|
+
</div>
|
|
251
|
+
|
|
252
|
+
<div class="bg-gradient-to-t from-primary to-primary-light">
|
|
253
|
+
Vertical suave
|
|
254
|
+
</div>
|
|
255
|
+
|
|
256
|
+
<div class="bg-gradient-to-tl from-brand-dark via-brand to-brand/80">
|
|
257
|
+
Diagonal con 3 pasos
|
|
258
|
+
</div>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## 📞 Validación Rápida
|
|
264
|
+
|
|
265
|
+
Si Copilot te sugiere algo como:
|
|
266
|
+
|
|
267
|
+
```vue
|
|
268
|
+
<div class="bg-blue-600 text-gray-500 border-red-400"></div>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Responde**:
|
|
272
|
+
|
|
273
|
+
> Este proyecto usa Tailwind con presets personalizados. Usa colores disponibles: `brand`, `primary`, `brand-light`, etc. Reemplaza con colores del preset.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## 🔗 Referencias
|
|
278
|
+
|
|
279
|
+
- **Documentación completa**: [SKILL_TAILWIND_CUSTOM.md](./SKILL_TAILWIND_CUSTOM.md)
|
|
280
|
+
- **Configuración**: [tailwind.config.js](./tailwind.config.js)
|
|
281
|
+
- **Ejemplos reales**:
|
|
282
|
+
- [Charlas.vue](./src/pages/Charlas/Charlas.vue)
|
|
283
|
+
- [BeneficiosSlider.vue](./src/pages/ValeVista/sections/BeneficiosSlider.vue)
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## ⚡ Tl;dr (Muy Rápido)
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
Regla de Oro:
|
|
291
|
+
1. Usa colores del preset (brand, primary, etc)
|
|
292
|
+
2. Para gradientes: combina colores preset
|
|
293
|
+
3. Para tamaños/valores específicos: usa arbitrarios [tamaño]
|
|
294
|
+
4. NUNCA uses colores arbitrarios si existen en preset
|
|
295
|
+
```
|