@jjlmoya/utils-creative 1.2.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.
Files changed (71) hide show
  1. package/package.json +64 -0
  2. package/src/category/i18n/en.ts +9 -0
  3. package/src/category/i18n/es.ts +9 -0
  4. package/src/category/i18n/fr.ts +9 -0
  5. package/src/category/index.ts +34 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +143 -0
  9. package/src/data.ts +6 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +27 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +146 -0
  14. package/src/pages/[locale].astro +251 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/tests/faq_count.test.ts +19 -0
  17. package/src/tests/locale_completeness.test.ts +42 -0
  18. package/src/tests/mocks/astro_mock.js +2 -0
  19. package/src/tests/no_h1_in_components.test.ts +48 -0
  20. package/src/tests/seo_length.test.ts +22 -0
  21. package/src/tests/tool_validation.test.ts +17 -0
  22. package/src/tool/bead-pattern-generator/bibliography.astro +18 -0
  23. package/src/tool/bead-pattern-generator/component.astro +372 -0
  24. package/src/tool/bead-pattern-generator/i18n/en.ts +61 -0
  25. package/src/tool/bead-pattern-generator/i18n/es.ts +68 -0
  26. package/src/tool/bead-pattern-generator/i18n/fr.ts +61 -0
  27. package/src/tool/bead-pattern-generator/index.ts +37 -0
  28. package/src/tool/bead-pattern-generator/seo.astro +14 -0
  29. package/src/tool/bead-pattern-generator/style.css +511 -0
  30. package/src/tool/dice-roller/bibliography.astro +17 -0
  31. package/src/tool/dice-roller/component.astro +230 -0
  32. package/src/tool/dice-roller/i18n/en.ts +87 -0
  33. package/src/tool/dice-roller/i18n/es.ts +89 -0
  34. package/src/tool/dice-roller/i18n/fr.ts +87 -0
  35. package/src/tool/dice-roller/index.ts +37 -0
  36. package/src/tool/dice-roller/seo.astro +14 -0
  37. package/src/tool/dice-roller/style.css +482 -0
  38. package/src/tool/excuse-generator/bibliography.astro +18 -0
  39. package/src/tool/excuse-generator/component.astro +140 -0
  40. package/src/tool/excuse-generator/i18n/en.ts +80 -0
  41. package/src/tool/excuse-generator/i18n/es.ts +84 -0
  42. package/src/tool/excuse-generator/i18n/fr.ts +80 -0
  43. package/src/tool/excuse-generator/index.ts +42 -0
  44. package/src/tool/excuse-generator/seo.astro +14 -0
  45. package/src/tool/excuse-generator/style.css +316 -0
  46. package/src/tool/fortune-cookie/bibliography.astro +18 -0
  47. package/src/tool/fortune-cookie/component.astro +299 -0
  48. package/src/tool/fortune-cookie/i18n/en.ts +85 -0
  49. package/src/tool/fortune-cookie/i18n/es.ts +90 -0
  50. package/src/tool/fortune-cookie/i18n/fr.ts +85 -0
  51. package/src/tool/fortune-cookie/index.ts +40 -0
  52. package/src/tool/fortune-cookie/seo.astro +14 -0
  53. package/src/tool/fortune-cookie/style.css +332 -0
  54. package/src/tool/synesthesia-painter/bibliography.astro +17 -0
  55. package/src/tool/synesthesia-painter/component.astro +110 -0
  56. package/src/tool/synesthesia-painter/i18n/en.ts +80 -0
  57. package/src/tool/synesthesia-painter/i18n/es.ts +82 -0
  58. package/src/tool/synesthesia-painter/i18n/fr.ts +80 -0
  59. package/src/tool/synesthesia-painter/index.ts +39 -0
  60. package/src/tool/synesthesia-painter/seo.astro +14 -0
  61. package/src/tool/synesthesia-painter/style.css +234 -0
  62. package/src/tool/zalgo-generator/bibliography.astro +18 -0
  63. package/src/tool/zalgo-generator/component.astro +195 -0
  64. package/src/tool/zalgo-generator/i18n/en.ts +60 -0
  65. package/src/tool/zalgo-generator/i18n/es.ts +67 -0
  66. package/src/tool/zalgo-generator/i18n/fr.ts +60 -0
  67. package/src/tool/zalgo-generator/index.ts +38 -0
  68. package/src/tool/zalgo-generator/seo.astro +14 -0
  69. package/src/tool/zalgo-generator/style.css +558 -0
  70. package/src/tools.ts +4 -0
  71. package/src/types.ts +72 -0
@@ -0,0 +1,332 @@
1
+ .fortune-cookie {
2
+ --fortune-cookie-bg: #fff;
3
+ --fortune-cookie-bg-muted: #fffbeb;
4
+ --fortune-cookie-text: #0f172a;
5
+ --fortune-cookie-text-muted: #475569;
6
+ --fortune-cookie-text-dim: #64748b;
7
+ --fortune-cookie-border: #fef3c7;
8
+ --fortune-cookie-shadow: rgba(0, 0, 0, 0.05);
9
+ --fortune-cookie-primary: #f59e0b;
10
+ --fortune-cookie-primary-on: #fff;
11
+ --fortune-cookie-accent: #fcd34d;
12
+ --fortune-cookie-success: #10b981;
13
+ --fortune-cookie-warning: #f59e0b;
14
+ --fortune-cookie-error: #f43f5e;
15
+ }
16
+
17
+ .theme-dark .fortune-cookie {
18
+ --fortune-cookie-bg: #0f172a;
19
+ --fortune-cookie-bg-muted: #1e293b;
20
+ --fortune-cookie-text: #f8fafc;
21
+ --fortune-cookie-text-muted: #94a3b8;
22
+ --fortune-cookie-text-dim: #64748b;
23
+ --fortune-cookie-border: #334155;
24
+ --fortune-cookie-shadow: rgba(0, 0, 0, 0.3);
25
+ --fortune-cookie-primary: #fbbf24;
26
+ --fortune-cookie-primary-on: #fff;
27
+ --fortune-cookie-accent: #fcd34d;
28
+ --fortune-cookie-success: #34d399;
29
+ --fortune-cookie-warning: #fbbf24;
30
+ --fortune-cookie-error: #fb7185;
31
+ }
32
+
33
+ .fortune-cookie-root {
34
+ width: 100%;
35
+ max-width: 64rem;
36
+ margin-left: auto;
37
+ margin-right: auto;
38
+ }
39
+
40
+ .fortune-cookie-card {
41
+ position: relative;
42
+ background-color: var(--fortune-cookie-bg);
43
+ border-radius: 1.5rem;
44
+ box-shadow: 0 25px 50px -12px var(--fortune-cookie-shadow);
45
+ overflow: hidden;
46
+ border: 1px solid var(--fortune-cookie-border);
47
+ min-height: 600px;
48
+ display: flex;
49
+ flex-direction: column;
50
+ align-items: center;
51
+ justify-content: center;
52
+ padding: 2rem;
53
+ }
54
+
55
+ .fortune-cookie-glow {
56
+ position: absolute;
57
+ inset: 0;
58
+ opacity: 0.1;
59
+ pointer-events: none;
60
+ background-image: radial-gradient(circle at center, var(--fortune-cookie-primary), transparent, transparent);
61
+ }
62
+
63
+ .fortune-cookie-content {
64
+ position: relative;
65
+ z-index: 10;
66
+ width: 100%;
67
+ display: flex;
68
+ flex-direction: column;
69
+ align-items: center;
70
+ }
71
+
72
+ .fortune-cookie-instruction {
73
+ font-size: 1.25rem;
74
+ line-height: 1.75rem;
75
+ font-weight: 700;
76
+ color: #92400e;
77
+ margin-bottom: 2rem;
78
+ text-transform: uppercase;
79
+ letter-spacing: 0.1em;
80
+ animation: fortune-cookie-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
81
+ }
82
+
83
+ .theme-dark .fortune-cookie-instruction {
84
+ color: #fbbf24;
85
+ }
86
+
87
+ @keyframes fortune-cookie-pulse {
88
+ 0%, 100% { opacity: 1; }
89
+ 50% { opacity: .5; }
90
+ }
91
+
92
+ .fortune-cookie-stage {
93
+ position: relative;
94
+ width: 20rem;
95
+ height: 20rem;
96
+ cursor: pointer;
97
+ }
98
+
99
+ @media (min-width: 768px) {
100
+ .fortune-cookie-stage {
101
+ width: 24rem;
102
+ height: 24rem;
103
+ }
104
+ }
105
+
106
+ .fortune-cookie-body {
107
+ position: absolute;
108
+ inset: 2rem;
109
+ transition-property: transform;
110
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
111
+ transition-duration: 100ms;
112
+ }
113
+
114
+ @media (min-width: 768px) {
115
+ .fortune-cookie-body {
116
+ inset: 3rem;
117
+ }
118
+ }
119
+
120
+ .fortune-cookie-body:active {
121
+ transform: scale(0.95);
122
+ }
123
+
124
+ .fortune-cookie-img {
125
+ width: 100%;
126
+ height: 100%;
127
+ object-fit: contain;
128
+ z-index: 10;
129
+ position: relative;
130
+ }
131
+
132
+ .fortune-cookie-broken {
133
+ position: absolute;
134
+ inset: 2rem;
135
+ pointer-events: none;
136
+ }
137
+
138
+ .fortune-cookie-broken.hidden {
139
+ display: none;
140
+ }
141
+
142
+ @media (min-width: 768px) {
143
+ .fortune-cookie-broken {
144
+ inset: 3rem;
145
+ }
146
+ }
147
+
148
+ .fortune-cookie-half {
149
+ position: absolute;
150
+ width: 50%;
151
+ height: 100%;
152
+ object-fit: contain;
153
+ transition-property: all;
154
+ transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
155
+ transition-duration: 1000ms;
156
+ }
157
+
158
+ .fortune-cookie-half-left {
159
+ left: 0;
160
+ transform-origin: bottom left;
161
+ }
162
+
163
+ .fortune-cookie-half-right {
164
+ right: 0;
165
+ transform-origin: bottom right;
166
+ }
167
+
168
+ .fortune-cookie-paper {
169
+ position: absolute;
170
+ top: 50%;
171
+ left: 50%;
172
+ transform: translate(-50%, -50%) scale(0.5);
173
+ width: 75%;
174
+ max-width: 280px;
175
+ opacity: 0;
176
+ transition-property: all;
177
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
178
+ transition-duration: 1000ms;
179
+ z-index: 0;
180
+ }
181
+
182
+ .fortune-cookie-paper.visible {
183
+ opacity: 1;
184
+ transform: translate(-50%, -50%) scale(1);
185
+ z-index: 20;
186
+ }
187
+
188
+ .fortune-cookie-paper-img {
189
+ width: 100%;
190
+ filter: drop-shadow(0 20px 13px rgba(0, 0, 0, 0.03)) drop-shadow(0 8px 5px rgba(0, 0, 0, 0.08));
191
+ transform: rotate(1deg);
192
+ }
193
+
194
+ .fortune-cookie-paper-content {
195
+ position: absolute;
196
+ inset: 0;
197
+ display: flex;
198
+ flex-direction: column;
199
+ align-items: center;
200
+ justify-content: center;
201
+ padding: 2rem;
202
+ text-align: center;
203
+ }
204
+
205
+ .fortune-cookie-text {
206
+ color: #0f172a;
207
+ font-weight: 900;
208
+ font-size: 1.125rem;
209
+ line-height: 1.25;
210
+ transform: rotate(-1deg);
211
+ user-select: text;
212
+ }
213
+
214
+ @media (min-width: 768px) {
215
+ .fortune-cookie-text {
216
+ font-size: 1.25rem;
217
+ line-height: 1.75rem;
218
+ }
219
+ }
220
+
221
+ .fortune-cookie-lucky-numbers {
222
+ margin-top: 1rem;
223
+ display: flex;
224
+ flex-wrap: wrap;
225
+ gap: 0.5rem;
226
+ justify-content: center;
227
+ transform: rotate(-1deg);
228
+ }
229
+
230
+ .fortune-cookie-number {
231
+ font-size: 0.75rem;
232
+ line-height: 1rem;
233
+ font-weight: 700;
234
+ background-color: rgba(255, 255, 255, 0.9);
235
+ color: #450a0a;
236
+ padding-left: 0.5rem;
237
+ padding-right: 0.5rem;
238
+ padding-top: 0.125rem;
239
+ padding-bottom: 0.125rem;
240
+ border-radius: 0.25rem;
241
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
242
+ border: 1px solid #fee2e2;
243
+ }
244
+
245
+ .fortune-cookie-particles {
246
+ position: absolute;
247
+ inset: 0;
248
+ pointer-events: none;
249
+ overflow: visible;
250
+ z-index: 20;
251
+ }
252
+
253
+ .fortune-cookie-reset {
254
+ display: none;
255
+ margin-top: 3rem;
256
+ flex-direction: column;
257
+ align-items: center;
258
+ gap: 1rem;
259
+ }
260
+
261
+ .fortune-cookie-reset.visible {
262
+ display: flex;
263
+ }
264
+
265
+ .fortune-cookie-status {
266
+ font-size: 0.875rem;
267
+ line-height: 1.25rem;
268
+ color: var(--fortune-cookie-text-dim);
269
+ }
270
+
271
+ .fortune-cookie-share-btn {
272
+ padding-left: 1.5rem;
273
+ padding-right: 1.5rem;
274
+ padding-top: 0.5rem;
275
+ padding-bottom: 0.5rem;
276
+ background-color: #f1f5f9;
277
+ color: #334155;
278
+ border-radius: 9999px;
279
+ font-size: 0.875rem;
280
+ line-height: 1.25rem;
281
+ font-weight: 700;
282
+ border: none;
283
+ cursor: pointer;
284
+ display: flex;
285
+ align-items: center;
286
+ gap: 0.5rem;
287
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
288
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
289
+ transition-duration: 150ms;
290
+ }
291
+
292
+ .theme-dark .fortune-cookie-share-btn {
293
+ background-color: #1e293b;
294
+ color: #cbd5e1;
295
+ }
296
+
297
+ .fortune-cookie-share-btn:hover {
298
+ background-color: #e2e8f0;
299
+ }
300
+
301
+ .theme-dark .fortune-cookie-share-btn:hover {
302
+ background-color: #334155;
303
+ }
304
+
305
+ .fortune-cookie-shake-1 {
306
+ animation: fortune-cookie-shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
307
+ }
308
+
309
+ .fortune-cookie-shake-2 {
310
+ animation: fortune-cookie-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
311
+ }
312
+
313
+ .fortune-cookie-shake-3 {
314
+ animation: fortune-cookie-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
315
+ }
316
+
317
+ @keyframes fortune-cookie-shake {
318
+ 10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-1deg); }
319
+ 20%, 80% { transform: translate3d(2px, 0, 0) rotate(2deg); }
320
+ 30%, 50%, 70% { transform: translate3d(-4px, 0, 0) rotate(-4deg); }
321
+ 40%, 60% { transform: translate3d(4px, 0, 0) rotate(4deg); }
322
+ }
323
+
324
+ .fortune-cookie-crumb {
325
+ position: absolute;
326
+ width: 20px;
327
+ height: 20px;
328
+ background-image: url("/images/utilities/fortune/fc-crumbs.webp");
329
+ background-size: contain;
330
+ background-repeat: no-repeat;
331
+ pointer-events: none;
332
+ }
@@ -0,0 +1,17 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { synesthesiaPainter } from './index';
4
+ import type { KnownLocale } from '../../types';
5
+
6
+ interface Props {
7
+ locale?: KnownLocale;
8
+ }
9
+
10
+ const { locale = 'es' } = Astro.props;
11
+ const content = await synesthesiaPainter.i18n[locale]?.();
12
+ if (!content || !content.bibliography || content.bibliography.length === 0) return null;
13
+
14
+ const { bibliography, bibliographyTitle = 'Bibliografía' } = content;
15
+ ---
16
+
17
+ <SharedBibliography title={bibliographyTitle} links={bibliography} />
@@ -0,0 +1,110 @@
1
+ ---
2
+ import type { SynesthesiaPainterUI } from './index';
3
+ import './style.css';
4
+
5
+ interface Props {
6
+ ui: SynesthesiaPainterUI;
7
+ }
8
+
9
+ const { ui } = Astro.props;
10
+ ---
11
+
12
+ <div id="sp-root" class="synesthesia-painter" data-ui={JSON.stringify(ui)}>
13
+ <div class="synesthesia-painter-card">
14
+ <div class="synesthesia-painter-header">
15
+ <button class="synesthesia-painter-mode-btn active" data-mode="letters">{ui.modeLetters}</button>
16
+ <button class="synesthesia-painter-mode-btn" data-mode="dots">{ui.modeDots}</button>
17
+ <button class="synesthesia-painter-mode-btn" data-mode="aura">{ui.modeAura}</button>
18
+ </div>
19
+
20
+ <div id="sp-canvas" class="synesthesia-painter-canvas-wrapper">
21
+ <div id="sp-viz" class="synesthesia-painter-viz-layer"></div>
22
+ <textarea id="sp-input" class="synesthesia-painter-input" autofocus></textarea>
23
+ <div id="sp-placeholder" class="synesthesia-painter-placeholder">
24
+ <span class="synesthesia-painter-placeholder-text">{ui.placeholder}</span>
25
+ </div>
26
+ </div>
27
+
28
+ <div class="synesthesia-painter-footer">
29
+ <p class="synesthesia-painter-tooltip">{ui.footerText}</p>
30
+ <button id="sp-clear" class="synesthesia-painter-clear-btn">
31
+ <span>{ui.clearBtn}</span>
32
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" width="16" height="16">
33
+ <polyline points="3 6 5 6 21 6"></polyline>
34
+ <path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path>
35
+ <path d="M10 11v6"></path>
36
+ <path d="M14 11v6"></path>
37
+ <path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"></path>
38
+ </svg>
39
+ </button>
40
+ </div>
41
+ </div>
42
+ </div>
43
+
44
+ <script>
45
+ const colorMap: Record<string, string> = {
46
+ a: "#ef4444", b: "#3b82f6", c: "#eab308", d: "#78350f", e: "#22c55e",
47
+ f: "#64748b", g: "#8b5cf6", h: "#f97316", i: "#ffffff", j: "#d946ef",
48
+ k: "#ec4899", l: "#fef08a", m: "#b91c1c", n: "#fb923c", o: "#000000",
49
+ p: "#9333ea", q: "#a8a29e", r: "#dc2626", s: "#14b8a6", t: "#1d4ed8",
50
+ u: "#f59e0b", v: "#7c3aed", w: "#1e293b", x: "#111827", y: "#facc15",
51
+ z: "#ffffff", "0": "#ffffff", "1": "#ffffff", "2": "#ef4444", "3": "#22c55e",
52
+ "4": "#3b82f6", "5": "#eab308", "6": "#8b5cf6", "7": "#f97316",
53
+ "8": "#9333ea", "9": "#ec4899"
54
+ };
55
+ const isDark = document.documentElement.classList.contains('dark');
56
+ const viz = document.getElementById('sp-viz') as HTMLElement;
57
+ const input = document.getElementById('sp-input') as HTMLTextAreaElement;
58
+ const placeholder = document.getElementById('sp-placeholder') as HTMLElement;
59
+ const clearBtn = document.getElementById('sp-clear') as HTMLButtonElement;
60
+ const modeBtns = document.querySelectorAll('.synesthesia-painter-mode-btn');
61
+
62
+ function getCharColor(char: string): string {
63
+ const lower = char.toLowerCase();
64
+ const color = colorMap[lower];
65
+ if (!color) return isDark ? "#94a3b8" : "#475569";
66
+ if (color === '#ffffff' && !isDark) return '#0f172a';
67
+ if (color === '#000000' && isDark) return '#f8fafc';
68
+ return color;
69
+ }
70
+
71
+ function render(): void {
72
+ const text = input.value;
73
+ placeholder.style.display = text.length > 0 ? 'none' : 'block';
74
+ viz.innerHTML = '';
75
+ for (const char of text) {
76
+ if (char === '\n') { viz.appendChild(document.createElement('br')); continue; }
77
+ const span = document.createElement('span');
78
+ span.textContent = char;
79
+ span.classList.add('synesthesia-painter-char');
80
+ span.style.setProperty('--char-color', getCharColor(char));
81
+ viz.appendChild(span);
82
+ }
83
+ const cursor = document.createElement('span');
84
+ cursor.className = 'synesthesia-painter-cursor';
85
+ viz.appendChild(cursor);
86
+ }
87
+
88
+ input.addEventListener('input', render);
89
+ clearBtn.addEventListener('click', () => { input.value = ''; render(); input.focus(); });
90
+ modeBtns.forEach((btn) => {
91
+ btn.addEventListener('click', () => {
92
+ modeBtns.forEach((b) => b.classList.remove('active'));
93
+ btn.classList.add('active');
94
+ const mode = (btn as HTMLElement).dataset.mode ?? 'letters';
95
+ viz.className = `synesthesia-painter-viz-layer ${mode}`;
96
+ render();
97
+ });
98
+ });
99
+ document.getElementById('sp-canvas')?.addEventListener('click', () => input.focus());
100
+
101
+ function init() {
102
+ const root = document.getElementById('sp-root');
103
+ if (!root) return;
104
+ render();
105
+ document.addEventListener('astro:page-load', () => render());
106
+ }
107
+
108
+ init();
109
+ document.addEventListener('astro:page-load', init);
110
+ </script>
@@ -0,0 +1,80 @@
1
+ import type { SynesthesiaPainterLocaleContent } from '../index';
2
+
3
+ export const content: SynesthesiaPainterLocaleContent = {
4
+ slug: 'synesthesia-painter',
5
+ title: 'Synesthesia Painter',
6
+ description: 'Visualize the color of words according to grapheme-color synesthesia. Each letter has its own color, turning text into chromatic art.',
7
+ faqTitle: 'Frequently Asked Questions',
8
+ bibliographyTitle: 'Mind Bibliography',
9
+ ui: {
10
+ title: 'Synesthesia Painter',
11
+ description: 'Transform your words into chromatic art.',
12
+ modeLetters: 'Letters',
13
+ modeDots: 'Dots',
14
+ modeAura: 'Aura',
15
+ placeholder: 'Type here...',
16
+ footerText: 'Type to discover your personal color palette',
17
+ clearBtn: 'Clear',
18
+ faqTitle: 'FAQ',
19
+ bibliographyTitle: 'References'
20
+ },
21
+ seo: [
22
+ { type: 'title', text: 'What Is Grapheme-Color Synesthesia?', level: 2 },
23
+ { type: 'paragraph', html: '<strong>Synesthesia</strong> is a neurological condition in which the stimulation of one sense automatically triggers a response in another. The most studied and prevalent variant is <strong>grapheme-color synesthesia</strong>: those who have it perceive each letter or number with an intrinsic, constant, and vivid color. It is not imagination or metaphor; for a synesthete, the letter "A" is red in the same way that fire is hot. This tool applies a <em>statistical palette</em> based on the colors most frequently reported for each grapheme in population studies.' },
24
+ { type: 'title', text: 'Neuroscience: The Cross-Activation Theory', level: 3 },
25
+ { type: 'paragraph', html: 'The most widely accepted neurological model for grapheme-color synesthesia is <strong>cross-activation</strong>. The areas of the temporal cortex involved in recognizing letter shapes (fusiform gyrus) are anatomically adjacent to the regions that process color (area V4). In people with synesthesia, there is greater structural or functional connectivity between these regions, so recognizing a letter also activates color neurons. Functional neuroimaging (fMRI) research has confirmed that synesthetes show genuine activation in V4 when reading text, even when it is monochromatic.' },
26
+ { type: 'tip', title: 'The Three Visualization Modes', html: '<strong>Letters:</strong> The original text colored by grapheme. Ideal for seeing the "chromatic melody" of a full text. <strong>Dots:</strong> Each character becomes a circle of its color; the text disappears and only the color music remains. <strong>Aura:</strong> Letters emit a halo of their color, as if the text glows with its own energy.' },
27
+ { type: 'title', text: 'Statistics and Color Universals', level: 3 },
28
+ { type: 'paragraph', html: 'Although synesthetic colors are unique to each individual, studies by Simner et al. (2006) and Eagleman et al. (2007) found significant statistical patterns. The vowel <strong>A</strong> tends to be red for most; <strong>O</strong> is white or black; <strong>S</strong> appears in teal or green tones; <strong>E</strong> appears as green or white. Interestingly, color-letter associations are more consistent within a linguistic culture than across different cultures, suggesting a role for early alphabet learning.' },
29
+ { type: 'list', items: [
30
+ '<strong>Prevalence:</strong> Approximately 4% of the population has grapheme-color synesthesia to some degree, though more recent studies raise this figure to 6–8% when subclinical forms are included.',
31
+ '<strong>Gender bias:</strong> Synesthesia is 3 to 6 times more common in women than in men, though the causes of this difference are not yet fully explained.',
32
+ '<strong>Heritability:</strong> It has a clear genetic component: it tends to run in families, though not always with the same type of synesthesia.',
33
+ '<strong>Consistency:</strong> Unlike learned associations, synesthetic colors are extraordinarily stable over time. 10-year follow-up studies demonstrate over 90% consistency in grapheme-color associations.',
34
+ '<strong>Famous synesthetes:</strong> Vladimir Nabokov, Wassily Kandinsky, Nikola Tesla, and Billy Joel have publicly described synesthetic experiences that influenced their work.',
35
+ ]},
36
+ { type: 'stats', items: [
37
+ { value: '4–8%', label: 'Population with synesthesia', icon: 'mdi:brain' },
38
+ { value: '90%+', label: 'Color consistency over 10 years', icon: 'mdi:check-circle' },
39
+ { value: '3–6×', label: 'More common in women', icon: 'mdi:gender-female' },
40
+ { value: '26+10', label: 'Colored letters & digits', icon: 'mdi:alphabetical' },
41
+ ], columns: 4 },
42
+ { type: 'title', text: 'Art and Synesthesia: When the Senses Merge', level: 3 },
43
+ { type: 'paragraph', html: '<strong>Wassily Kandinsky</strong>, founder of abstract expressionism, experienced both grapheme-color and music-color synesthesia: he heard instruments in colors (yellow was a trumpet, deep blue a cello) and used these perceptions to create his theory of abstract art. In music, <strong>Alexander Scriabin</strong> composed <em>Prometheus: The Poem of Fire</em> with a part for "tastiera per luce" (light keyboard), designed to project colors corresponding to each note.' },
44
+ { type: 'tip', title: 'Color Palette of This Tool', html: 'The color assignments are inspired by the most common statistical data in scientific literature. <strong>A → red</strong>, <strong>E → green</strong>, <strong>I → white/black depending on background</strong>, <strong>O → black/white</strong>, <strong>U → amber</strong>. Consonants follow less uniform patterns, but contrast with the background is always prioritized to guarantee readability.' },
45
+ ],
46
+ faq: [
47
+ {
48
+ question: 'Do all synesthetes see the same colors for each letter?',
49
+ answer: 'No. Synesthetic colors are unique to each person. Statistical tendencies exist (A tends to be red for many), but no two synesthetes have exactly the same palette. This tool uses the colors most frequently reported in population studies, not the "correct" ones.',
50
+ },
51
+ {
52
+ question: 'Can I develop synesthesia by using this tool continuously?',
53
+ answer: 'Not in the strict neurological sense. Genuine synesthesia is a characteristic of the nervous system, not a learned skill. However, repeated use of color-letter associations can create strong associative memories. Some studies suggest that practicing these associations can improve text memory.',
54
+ },
55
+ {
56
+ question: 'What is the "Aura" mode for?',
57
+ answer: 'Aura mode simulates how some synesthetes describe seeing colors "floating" or "glowing" around letters rather than integrated into them. It creates a more atmospheric and immersive visual experience, especially on a dark background.',
58
+ },
59
+ {
60
+ question: 'Does the "Dots" mode have any scientific basis?',
61
+ answer: 'It is an artistic abstraction. It reduces the text to its "chromatic essence" by eliminating the recognizable shape of the letters. The result resembles chromatic data visualizations or pointillist paintings, and allows you to see the "color signature" of a text without meaning interfering.',
62
+ },
63
+ {
64
+ question: 'Why are some letters like I and O white or black?',
65
+ answer: 'In synesthesia studies, the vowels I and O, and the letter W, are frequently described as white, transparent, or black. This tool adapts those colors to the active background: white on dark background, black on light background, to always guarantee visibility.',
66
+ },
67
+ ],
68
+ bibliography: [
69
+ { name: 'Simner et al. (2006) – Synaesthesia: The prevalence of atypical cross-modal experiences', url: 'https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1626536/' },
70
+ { name: 'Eagleman et al. (2007) – A standardized test battery for the study of synesthesia', url: 'https://www.sciencedirect.com/science/article/pii/S0010945207000087' },
71
+ { name: 'Kandinsky, W. – Concerning the Spiritual in Art (1911)', url: 'https://en.wikipedia.org/wiki/Concerning_the_Spiritual_in_Art' },
72
+ ],
73
+ howTo: [
74
+ { name: 'Write text', text: 'Click the writing area and start typing. Each letter will appear colored according to its statistical synesthetic association.' },
75
+ { name: 'Change visualization mode', text: 'Use the buttons in the top right corner to switch between Letters (colored text), Dots (color circles), and Aura (luminous letters with chromatic halos).' },
76
+ { name: 'Explore different texts', text: 'Write names, words in different languages, or sentences to discover their unique chromatic palette. Long words create fascinating visual gradients.' },
77
+ { name: 'Clear and start again', text: 'Use the "Clear" button in the bottom bar to wipe the canvas and explore a new text.' },
78
+ ],
79
+ schemas: []
80
+ };
@@ -0,0 +1,82 @@
1
+ import type { SynesthesiaPainterLocaleContent } from '../index';
2
+
3
+ export const content: SynesthesiaPainterLocaleContent = {
4
+ slug: 'pintor-sinestesia',
5
+ title: 'Pintor de Sinestesia',
6
+ description: 'Visualiza tus palabras en color según la sinestesia grafema-color. Cada letra tiene su propio color, convirtiendo el texto en arte cromático.',
7
+ faqTitle: 'Preguntas Frecuentes',
8
+ bibliographyTitle: 'Bibliografía de la Mente',
9
+ ui: {
10
+ title: 'Pintor de Sinestesia',
11
+ description: 'Convierte tus palabras en arte cromático.',
12
+ modeLetters: 'Letras',
13
+ modeDots: 'Puntos',
14
+ modeAura: 'Aura',
15
+ placeholder: 'Escribe aquí...',
16
+ footerText: 'Escribe para descubrir tu paleta de colores personal',
17
+ clearBtn: 'Borrar',
18
+ faqTitle: 'FAQ',
19
+ bibliographyTitle: 'Referencias'
20
+ },
21
+ seo: [
22
+ { type: 'title', text: '¿Qué es la sinestesia grafema-color y por qué fascina a la neurociencia?', level: 2 },
23
+ { type: 'paragraph', html: 'La <strong>sinestesia</strong> es una condición neurológica en la que la activación de un sentido desencadena automáticamente una respuesta en otro. La variante más estudiada y prevalente es la <strong>sinestesia grafema-color</strong>: quienes la tienen perciben cada letra o número con un color intrínseco, constante y vivaz. No es imaginación ni metáfora; para un sinestésico, la "A" es roja de la misma forma que el fuego es caliente. La herramienta que tienes ante ti aplica una <em>paleta estadística</em> basada en los colores más frecuentemente reportados para cada grafema en estudios de población.' },
24
+ { type: 'title', text: 'Neurología del fenómeno: la teoría del cross-activation', level: 3 },
25
+ { type: 'paragraph', html: 'El modelo neurológico más aceptado para explicar la sinestesia grafema-color es el de la <strong>activación cruzada</strong> (<em>cross-activation</em>). Las áreas del córtex temporal involucradas en el reconocimiento de formas de letras (giro fusiforme) son anatómicamente adyacentes a las regiones que procesan el color (área V4). En personas con sinestesia, existe mayor conectividad estructural o funcional entre estas regiones, de modo que reconocer una letra activa también las neuronas de color. La investigación mediante neuroimagen funcional (fMRI) ha confirmado que los sinestésicos muestran activación genuina en V4 cuando leen texto, incluso cuando éste es monocromático.' },
26
+ { type: 'tip', title: 'Los tres modos de visualización', html: '<strong>Letras:</strong> El texto original coloreado según su grafema. Ideal para ver la "melodía cromática" de un texto completo. <strong>Puntos:</strong> Cada carácter se convierte en un círculo de su color; el texto desaparece y queda solo la música de colores. <strong>Aura:</strong> Las letras emiten un halo de luz de su color, como si el texto brillara con energía propia.' },
27
+ { type: 'title', text: 'Estadísticas y universales de color', level: 3 },
28
+ { type: 'paragraph', html: 'Aunque los colores sinestésicos son únicos a cada individuo, los estudios de Simner et al. (2006) y Eagleman et al. (2007) encontraron patrones estadísticos significativos. La vocal <strong>A</strong> tiende a ser roja para la mayoría; la <strong>O</strong> es blanca o negra; la <strong>S</strong> aparece en tonos teal o verde; la <strong>E</strong> aparece como verde o blanca. Curiosamente, las asociaciones color-letra son más consistentes dentro de una cultura lingüística que entre culturas distintas, lo que sugiere un papel del aprendizaje temprano del alfabeto.' },
29
+ { type: 'list', items: [
30
+ '<strong>Prevalencia:</strong> Aproximadamente el 4% de la población tiene sinestesia grafema-color en alguna medida, aunque estudios más recientes elevan esta cifra al 6-8% cuando se incluyen formas subclínicas.',
31
+ '<strong>Sesgo de género:</strong> La sinestesia es entre 3 y 6 veces más frecuente en mujeres que en hombres, aunque las causas de esta diferencia aún no están completamente explicadas.',
32
+ '<strong>Heredabilidad:</strong> Tiene un componente genético claro: tiende a transmitirse en familias, aunque no siempre con el mismo tipo de sinestesia.',
33
+ '<strong>Constancia:</strong> A diferencia de las asociaciones aprendidas, los colores sinestésicos son extraordinariamente estables a lo largo del tiempo. Estudios de seguimiento a 10 años demuestran más del 90% de consistencia en las asociaciones grafema-color.',
34
+ '<strong>Sinestésicos famosos:</strong> Vladimir Nabokov, Wassily Kandinsky, Nikola Tesla y Billy Joel han descrito públicamente experiencias sinestésicas que influyeron en sus obras.',
35
+ ]},
36
+ { type: 'title', text: 'Arte y sinestesia: cuando los sentidos se fusionan', level: 3 },
37
+ { type: 'paragraph', html: 'La sinestesia ha tenido una influencia profunda en el arte del siglo XX. <strong>Wassily Kandinsky</strong>, fundador del expresionismo abstracto, experimentaba tanto sinestesia grafema-color como música-color: escuchaba los instrumentos en colores (el amarillo era un trompetín, el azul profundo un chelo) y usó estas percepciones para crear su teoría del arte abstracto. Su obra <em>Composición IV</em> es inseparable de esta experiencia sensorial. En música, <strong>Alexander Scriabin</strong> compuso el <em>Prometheus: El Poema del Fuego</em> con una parte para "tastiera per luce" (teclado de luz), diseñada para proyectar los colores correspondientes a cada nota.' },
38
+ { type: 'tip', title: 'Paleta cromática de esta herramienta', html: 'La asignación de colores está inspirada en los datos estadísticos más comunes de la literatura científica y en la tradición artística de la sinestesia. <strong>A → rojo</strong>, <strong>E → verde</strong>, <strong>I → blanco/negro según el fondo</strong>, <strong>O → negro/blanco</strong>, <strong>U → ámbar</strong>. Las consonantes siguen patrones menos uniformes, pero siempre se prioriza el contraste con el fondo para garantizar legibilidad.' },
39
+ { type: 'title', text: 'Aplicaciones prácticas: diseño, música y terapia', level: 3 },
40
+ { type: 'paragraph', html: 'Más allá de la curiosidad científica, la sinestesia grafema-color tiene aplicaciones concretas. En <strong>diseño tipográfico</strong>, entender estas asociaciones ayuda a elegir paletas de color para logotipos que "resuenen" con el nombre de la marca. En <strong>educación</strong>, se han desarrollado sistemas de aprendizaje del abecedario que usan los colores estadísticamente reportados para facilitar la memorización en niños pequeños. En <strong>musicoterapia</strong>, las visualizaciones sinestésicas se usan para ayudar a pacientes con afasia a reconectar con el lenguaje a través del canal visual-cromático.' },
41
+ { type: 'stats', items: [
42
+ { value: '4–8%', label: 'Población con sinestesia', icon: 'mdi:brain' },
43
+ { value: '+90%', label: 'Consistencia de color a 10 años', icon: 'mdi:check-circle' },
44
+ { value: '3–6×', label: 'Más frecuente en mujeres', icon: 'mdi:gender-female' },
45
+ { value: '26+10', label: 'Letras y dígitos coloreados', icon: 'mdi:alphabetical' },
46
+ ], columns: 4 },
47
+ ],
48
+ faq: [
49
+ {
50
+ question: '¿Todos los sinestésicos ven los mismos colores para cada letra?',
51
+ answer: 'No. Los colores sinestésicos son únicos para cada persona. Existen tendencias estadísticas (la A tiende a ser roja para muchos), pero no hay dos sinestésicos con exactamente la misma paleta. Esta herramienta usa los colores más frecuentemente reportados en estudios de población, no los "correctos".',
52
+ },
53
+ {
54
+ question: '¿Puedo desarrollar sinestesia con el uso continuado de esta herramienta?',
55
+ answer: 'No en el sentido neurológico estricto. La sinestesia genuina es una característica del sistema nervioso, no una habilidad aprendida. Sin embargo, el uso repetido de asociaciones color-letra sí puede crear memorias asociativas fuertes. Algunos estudios sugieren que practicar con estas asociaciones puede mejorar la memoria de textos.',
56
+ },
57
+ {
58
+ question: '¿Para qué sirve el modo "Aura"?',
59
+ answer: 'El modo Aura simula cómo algunos sinestésicos describen ver colores "flotando" o "brillando" alrededor de las letras en lugar de estar integrados en ellas. Crea una experiencia visual más atmosférica e inmersiva, especialmente sobre fondo oscuro.',
60
+ },
61
+ {
62
+ question: '¿El modo "Puntos" tiene alguna base científica?',
63
+ answer: 'Es una abstracción artística. Reduce el texto a su "esencia cromática" eliminando la forma reconocible de las letras. El resultado se parece a visualizaciones de datos cromáticos o a pinturas puntillistas, y permite ver la "firma de color" de un texto sin que el significado interfiera.',
64
+ },
65
+ {
66
+ question: '¿Por qué algunas letras como la I y la O son blancas o negras?',
67
+ answer: 'En los estudios de sinestesia, las vocales I y O, y la letra W, son frecuentemente descritas como blancas, transparentes o negras. Esta herramienta adapta esos colores al fondo activo: blanco sobre fondo oscuro, negro sobre fondo claro, para garantizar siempre visibilidad.',
68
+ },
69
+ ],
70
+ bibliography: [
71
+ { name: 'Simner et al. (2006) – Synaesthesia: The prevalence of atypical cross-modal experiences', url: 'https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1626536/' },
72
+ { name: 'Eagleman et al. (2007) – A standardized test battery for the study of synesthesia', url: 'https://www.sciencedirect.com/science/article/pii/S0010945207000087' },
73
+ { name: 'Kandinsky, W. – De lo espiritual en el arte (1911)', url: 'https://es.wikipedia.org/wiki/De_lo_espiritual_en_el_arte' },
74
+ ],
75
+ howTo: [
76
+ { name: 'Escribir el texto', text: 'Haz clic en el área de escritura y empieza a escribir. Cada letra aparecerá coloreada según su asociación sinestésica estadística.' },
77
+ { name: 'Cambiar el modo de visualización', text: 'Usa los botones de la esquina superior derecha para cambiar entre Letras (texto coloreado), Puntos (círculos de color) y Aura (letras luminosas con halo cromático).' },
78
+ { name: 'Explorar diferentes textos', text: 'Escribe nombres, palabras en distintos idiomas o frases para descubrir su paleta cromática única. Las palabras largas crean gradientes visuales fascinantes.' },
79
+ { name: 'Borrar y empezar de nuevo', text: 'Usa el botón "Borrar" en la barra inferior para limpiar el lienzo y explorar un nuevo texto.' },
80
+ ],
81
+ schemas: []
82
+ };