@jjlmoya/utils-health 1.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.
Files changed (155) hide show
  1. package/package.json +60 -0
  2. package/src/category/i18n/en.ts +60 -0
  3. package/src/category/i18n/es.ts +60 -0
  4. package/src/category/i18n/fr.ts +60 -0
  5. package/src/category/index.ts +22 -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 +28 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +36 -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/schemas_fulfillment.test.ts +23 -0
  21. package/src/tests/seo_length.test.ts +22 -0
  22. package/src/tests/title_quality.test.ts +55 -0
  23. package/src/tests/tool_validation.test.ts +17 -0
  24. package/src/tool/binauralTuner/bibliography.astro +14 -0
  25. package/src/tool/binauralTuner/component.astro +687 -0
  26. package/src/tool/binauralTuner/i18n/en.ts +187 -0
  27. package/src/tool/binauralTuner/i18n/es.ts +187 -0
  28. package/src/tool/binauralTuner/i18n/fr.ts +187 -0
  29. package/src/tool/binauralTuner/index.ts +27 -0
  30. package/src/tool/binauralTuner/seo.astro +14 -0
  31. package/src/tool/binauralTuner/ui.ts +18 -0
  32. package/src/tool/bloodUnitConverter/bibliography.astro +14 -0
  33. package/src/tool/bloodUnitConverter/component.astro +915 -0
  34. package/src/tool/bloodUnitConverter/i18n/en.ts +227 -0
  35. package/src/tool/bloodUnitConverter/i18n/es.ts +250 -0
  36. package/src/tool/bloodUnitConverter/i18n/fr.ts +218 -0
  37. package/src/tool/bloodUnitConverter/index.ts +27 -0
  38. package/src/tool/bloodUnitConverter/seo.astro +14 -0
  39. package/src/tool/bloodUnitConverter/ui.ts +38 -0
  40. package/src/tool/bmiCalculator/bibliography.astro +14 -0
  41. package/src/tool/bmiCalculator/component.astro +415 -0
  42. package/src/tool/bmiCalculator/i18n/en.ts +217 -0
  43. package/src/tool/bmiCalculator/i18n/es.ts +221 -0
  44. package/src/tool/bmiCalculator/i18n/fr.ts +217 -0
  45. package/src/tool/bmiCalculator/index.ts +27 -0
  46. package/src/tool/bmiCalculator/seo.astro +14 -0
  47. package/src/tool/bmiCalculator/ui.ts +21 -0
  48. package/src/tool/breathingVisualizer/bibliography.astro +14 -0
  49. package/src/tool/breathingVisualizer/component.astro +636 -0
  50. package/src/tool/breathingVisualizer/i18n/en.ts +206 -0
  51. package/src/tool/breathingVisualizer/i18n/es.ts +206 -0
  52. package/src/tool/breathingVisualizer/i18n/fr.ts +206 -0
  53. package/src/tool/breathingVisualizer/index.ts +27 -0
  54. package/src/tool/breathingVisualizer/seo.astro +14 -0
  55. package/src/tool/breathingVisualizer/ui.ts +31 -0
  56. package/src/tool/caffeineTracker/bibliography.astro +14 -0
  57. package/src/tool/caffeineTracker/component.astro +1210 -0
  58. package/src/tool/caffeineTracker/i18n/en.ts +198 -0
  59. package/src/tool/caffeineTracker/i18n/es.ts +198 -0
  60. package/src/tool/caffeineTracker/i18n/fr.ts +198 -0
  61. package/src/tool/caffeineTracker/index.ts +27 -0
  62. package/src/tool/caffeineTracker/logic.ts +31 -0
  63. package/src/tool/caffeineTracker/seo.astro +14 -0
  64. package/src/tool/caffeineTracker/ui.ts +36 -0
  65. package/src/tool/daltonismSimulator/bibliography.astro +14 -0
  66. package/src/tool/daltonismSimulator/component.astro +383 -0
  67. package/src/tool/daltonismSimulator/i18n/en.ts +188 -0
  68. package/src/tool/daltonismSimulator/i18n/es.ts +218 -0
  69. package/src/tool/daltonismSimulator/i18n/fr.ts +168 -0
  70. package/src/tool/daltonismSimulator/index.ts +27 -0
  71. package/src/tool/daltonismSimulator/seo.astro +14 -0
  72. package/src/tool/daltonismSimulator/ui.ts +20 -0
  73. package/src/tool/digestionStopwatch/bibliography.astro +14 -0
  74. package/src/tool/digestionStopwatch/component.astro +627 -0
  75. package/src/tool/digestionStopwatch/i18n/en.ts +173 -0
  76. package/src/tool/digestionStopwatch/i18n/es.ts +173 -0
  77. package/src/tool/digestionStopwatch/i18n/fr.ts +173 -0
  78. package/src/tool/digestionStopwatch/index.ts +27 -0
  79. package/src/tool/digestionStopwatch/logic.ts +63 -0
  80. package/src/tool/digestionStopwatch/seo.astro +14 -0
  81. package/src/tool/digestionStopwatch/ui.ts +20 -0
  82. package/src/tool/epworthSleepinessScale/bibliography.astro +14 -0
  83. package/src/tool/epworthSleepinessScale/component.astro +528 -0
  84. package/src/tool/epworthSleepinessScale/i18n/en.ts +217 -0
  85. package/src/tool/epworthSleepinessScale/i18n/es.ts +217 -0
  86. package/src/tool/epworthSleepinessScale/i18n/fr.ts +217 -0
  87. package/src/tool/epworthSleepinessScale/index.ts +27 -0
  88. package/src/tool/epworthSleepinessScale/seo.astro +14 -0
  89. package/src/tool/epworthSleepinessScale/ui.ts +27 -0
  90. package/src/tool/hydrationCalculator/bibliography.astro +14 -0
  91. package/src/tool/hydrationCalculator/component.astro +694 -0
  92. package/src/tool/hydrationCalculator/i18n/en.ts +217 -0
  93. package/src/tool/hydrationCalculator/i18n/es.ts +222 -0
  94. package/src/tool/hydrationCalculator/i18n/fr.ts +199 -0
  95. package/src/tool/hydrationCalculator/index.ts +27 -0
  96. package/src/tool/hydrationCalculator/seo.astro +14 -0
  97. package/src/tool/hydrationCalculator/ui.ts +28 -0
  98. package/src/tool/pelliRobsonTest/bibliography.astro +14 -0
  99. package/src/tool/pelliRobsonTest/component.astro +653 -0
  100. package/src/tool/pelliRobsonTest/i18n/en.ts +205 -0
  101. package/src/tool/pelliRobsonTest/i18n/es.ts +205 -0
  102. package/src/tool/pelliRobsonTest/i18n/fr.ts +205 -0
  103. package/src/tool/pelliRobsonTest/index.ts +27 -0
  104. package/src/tool/pelliRobsonTest/seo.astro +14 -0
  105. package/src/tool/pelliRobsonTest/ui.ts +21 -0
  106. package/src/tool/peripheralVisionTrainer/bibliography.astro +14 -0
  107. package/src/tool/peripheralVisionTrainer/component.astro +678 -0
  108. package/src/tool/peripheralVisionTrainer/i18n/en.ts +224 -0
  109. package/src/tool/peripheralVisionTrainer/i18n/es.ts +224 -0
  110. package/src/tool/peripheralVisionTrainer/i18n/fr.ts +211 -0
  111. package/src/tool/peripheralVisionTrainer/index.ts +27 -0
  112. package/src/tool/peripheralVisionTrainer/seo.astro +14 -0
  113. package/src/tool/peripheralVisionTrainer/ui.ts +26 -0
  114. package/src/tool/readingDistanceCalculator/bibliography.astro +14 -0
  115. package/src/tool/readingDistanceCalculator/component.astro +588 -0
  116. package/src/tool/readingDistanceCalculator/i18n/en.ts +202 -0
  117. package/src/tool/readingDistanceCalculator/i18n/es.ts +215 -0
  118. package/src/tool/readingDistanceCalculator/i18n/fr.ts +193 -0
  119. package/src/tool/readingDistanceCalculator/index.ts +31 -0
  120. package/src/tool/readingDistanceCalculator/seo.astro +14 -0
  121. package/src/tool/readingDistanceCalculator/ui.ts +18 -0
  122. package/src/tool/screenDecompressionTime/bibliography.astro +14 -0
  123. package/src/tool/screenDecompressionTime/component.astro +671 -0
  124. package/src/tool/screenDecompressionTime/i18n/en.ts +225 -0
  125. package/src/tool/screenDecompressionTime/i18n/es.ts +247 -0
  126. package/src/tool/screenDecompressionTime/i18n/fr.ts +225 -0
  127. package/src/tool/screenDecompressionTime/index.ts +27 -0
  128. package/src/tool/screenDecompressionTime/seo.astro +14 -0
  129. package/src/tool/screenDecompressionTime/ui.ts +32 -0
  130. package/src/tool/tinnitusReliever/bibliography.astro +14 -0
  131. package/src/tool/tinnitusReliever/component.astro +581 -0
  132. package/src/tool/tinnitusReliever/i18n/en.ts +161 -0
  133. package/src/tool/tinnitusReliever/i18n/es.ts +161 -0
  134. package/src/tool/tinnitusReliever/i18n/fr.ts +161 -0
  135. package/src/tool/tinnitusReliever/index.ts +27 -0
  136. package/src/tool/tinnitusReliever/seo.astro +14 -0
  137. package/src/tool/tinnitusReliever/ui.ts +9 -0
  138. package/src/tool/ubeCalculator/bibliography.astro +14 -0
  139. package/src/tool/ubeCalculator/component.astro +683 -0
  140. package/src/tool/ubeCalculator/i18n/en.ts +200 -0
  141. package/src/tool/ubeCalculator/i18n/es.ts +200 -0
  142. package/src/tool/ubeCalculator/i18n/fr.ts +196 -0
  143. package/src/tool/ubeCalculator/index.ts +27 -0
  144. package/src/tool/ubeCalculator/seo.astro +14 -0
  145. package/src/tool/ubeCalculator/ui.ts +26 -0
  146. package/src/tool/waterPurifier/bibliography.astro +14 -0
  147. package/src/tool/waterPurifier/component.astro +628 -0
  148. package/src/tool/waterPurifier/i18n/en.ts +167 -0
  149. package/src/tool/waterPurifier/i18n/es.ts +167 -0
  150. package/src/tool/waterPurifier/i18n/fr.ts +167 -0
  151. package/src/tool/waterPurifier/index.ts +27 -0
  152. package/src/tool/waterPurifier/seo.astro +14 -0
  153. package/src/tool/waterPurifier/ui.ts +18 -0
  154. package/src/tools.ts +19 -0
  155. package/src/types.ts +72 -0
@@ -0,0 +1,225 @@
1
+ import type { WithContext, SoftwareApplication, FAQPage, HowToThing } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { ScreenDecompressionTimeUI } from '../ui';
4
+
5
+ const slug = 'ocular-decompression-rest-calculator';
6
+ const title = 'Ocular Decompression Rest Calculator';
7
+ const description =
8
+ 'Calculate how many minutes of visual rest you need based on your daily screen time. Personalised 20-20-20 rule to prevent digital eye strain and fatigue.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'What is the 20-20-20 rule and why does it work?',
13
+ answer:
14
+ 'The 20-20-20 rule states that every 20 minutes of screen work you should look at an object 20 feet away (about 6 metres) for at least 20 seconds. This interval allows the ciliary muscle — responsible for focusing — to fully relax after the sustained contraction required by close-up vision.',
15
+ },
16
+ {
17
+ question: 'How many rest minutes do I need if I work 8 hours at a computer?',
18
+ answer:
19
+ 'For 8 hours of screen exposure the calculator recommends approximately 16 minutes of visual rest distributed throughout the day, with 30-second breaks every 20 minutes. An additional 10–15 minute break mid-session is also recommended.',
20
+ },
21
+ {
22
+ question: 'Why do eyes get tired looking at screens?',
23
+ answer:
24
+ 'Screens force the ciliary muscle to maintain sustained contraction to keep focus on a nearby point. They also reduce blinking frequency from 17 to just 7 times per minute, causing dryness. High-energy blue light (380–500 nm) adds additional oxidative stress to the retina.',
25
+ },
26
+ {
27
+ question: 'Are blue light glasses necessary?',
28
+ answer:
29
+ 'Scientific evidence on blue light filters is mixed for general fatigue, but they are especially useful above 6–8 hours of daily screen time. Their most documented benefit is reducing nocturnal melatonin suppression, improving sleep quality for intensive users.',
30
+ },
31
+ {
32
+ question: 'When should I see an ophthalmologist for digital eye strain?',
33
+ answer:
34
+ 'Consult a specialist if you experience blurred vision persisting more than 30 minutes after leaving the screen, frequent frontal or occipital headaches, double vision, persistent foreign-body sensation, or sudden changes in visual acuity. These symptoms may indicate uncorrected refractive errors or ocular pathology.',
35
+ },
36
+ ];
37
+
38
+ const howToData = [
39
+ {
40
+ name: 'Enter your screen hours',
41
+ text: 'Use the slider or the number field to indicate how many hours per day you spend looking at screens (computer, phone, tablet). The range goes from 0 to 16 hours.',
42
+ },
43
+ {
44
+ name: 'Get your personalised plan',
45
+ text: 'The calculator instantly shows recommended rest minutes, ocular fatigue level, optimal break interval, and ideal working distance.',
46
+ },
47
+ {
48
+ name: 'Apply the dynamic recommendations',
49
+ text: 'Read the 4 recommendation cards tailored to your hours: break management, ergonomic posture, blinking frequency, and blue light protection.',
50
+ },
51
+ {
52
+ name: 'Visualise your ideal day',
53
+ text: 'The timeline chart shows how your day should be distributed between screen work time, visual rest breaks, and screen-free activities.',
54
+ },
55
+ ];
56
+
57
+ const faqSchema: WithContext<FAQPage> = {
58
+ '@context': 'https://schema.org',
59
+ '@type': 'FAQPage',
60
+ mainEntity: faqData.map((item) => ({
61
+ '@type': 'Question',
62
+ name: item.question,
63
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
64
+ })),
65
+ };
66
+
67
+ const howToSchema: WithContext<HowToThing> = {
68
+ '@context': 'https://schema.org',
69
+ '@type': 'HowTo',
70
+ name: title,
71
+ description,
72
+ step: howToData.map((step, i) => ({
73
+ '@type': 'HowToStep',
74
+ position: i + 1,
75
+ name: step.name,
76
+ text: step.text,
77
+ })),
78
+ };
79
+
80
+ const appSchema: WithContext<SoftwareApplication> = {
81
+ '@context': 'https://schema.org',
82
+ '@type': 'SoftwareApplication',
83
+ name: title,
84
+ description,
85
+ applicationCategory: 'HealthApplication',
86
+ operatingSystem: 'Web',
87
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
88
+ };
89
+
90
+ export const content: ToolLocaleContent<ScreenDecompressionTimeUI> = {
91
+ slug,
92
+ title,
93
+ description,
94
+ faqTitle: 'Frequently asked questions about eye strain and screens',
95
+ faq: faqData,
96
+ bibliographyTitle: 'Scientific references',
97
+ bibliography: [
98
+ {
99
+ name: 'World Health Organization — Eye Health',
100
+ url: 'https://www.who.int/es/news-room/fact-sheets/detail/blindness-and-visual-impairment',
101
+ },
102
+ {
103
+ name: 'American Optometric Association — Computer Vision Syndrome',
104
+ url: 'https://www.aoa.org/healthy-eyes/eye-and-vision-conditions/computer-vision-syndrome',
105
+ },
106
+ {
107
+ name: 'Mayo Clinic — Eyestrain',
108
+ url: 'https://www.mayoclinic.org/diseases-conditions/eyestrain/symptoms-causes/syc-20372397',
109
+ },
110
+ ],
111
+ howTo: howToData,
112
+ schemas: [faqSchema, howToSchema, appSchema],
113
+ ui: {
114
+ labelHours: 'Screen hours per day',
115
+ presetLow: 'Light',
116
+ presetNormal: 'Normal',
117
+ presetHigh: 'Heavy',
118
+ resultUnit: 'rest minutes',
119
+ resultPer: 'per day',
120
+ statInterval: 'Interval',
121
+ statBreaks: 'Breaks/day',
122
+ statDistance: 'Ideal distance',
123
+ timelineTitle: 'Your Ideal Visual Day',
124
+ timelineWork: 'Work',
125
+ timelineRest: 'Rest',
126
+ timelineOther: 'Other',
127
+ fatigueLow: 'Low',
128
+ fatigueMod: 'Moderate',
129
+ fatigueHigh: 'High',
130
+ fatigueCritical: 'Critical',
131
+ recBreaksTitle: 'Breaks',
132
+ recBreaksText: 'Take a visual break every {0} minutes of continuous work.',
133
+ recPostureTitle: 'Posture',
134
+ recPostureLow: 'Keep the screen 60–70 cm away. Adjust height to eye level.',
135
+ recPostureMod: 'Increase distance to 70–80 cm. Use a monitor of at least 24 inches.',
136
+ recPostureHigh: 'Minimum distance 80–100 cm. Consider using a projector or large display.',
137
+ recBlinkTitle: 'Blinking',
138
+ recBlinkText: 'Blink consciously {0}+ times per hour. Screens reduce blinking by 66%.',
139
+ recLightTitle: 'Blue Light',
140
+ recLightLow: 'Enable Night Mode on your OS from 8 pm onwards.',
141
+ recLightMod: 'Use blue light glasses or enable f.lux/Night Shift on all your devices.',
142
+ recLightHigh: 'Blue light filter + specialist glasses + dark mode display ESSENTIAL.',
143
+ unitMin: 'min',
144
+ },
145
+ seo: [
146
+ {
147
+ type: 'summary',
148
+ title: 'Ocular Decompression Rest Calculator',
149
+ items: [
150
+ '<strong>Personalised formula</strong>: 2 minutes of rest per hour of screen exposure.',
151
+ '<strong>4 fatigue levels</strong>: Low, Moderate, High and Critical with adapted recommendations.',
152
+ '<strong>20-20-20 rule</strong>: break intervals calculated from your actual hours of use.',
153
+ '<strong>Timeline</strong>: visualisation of your ideal day with work and rest blocks.',
154
+ ],
155
+ },
156
+ {
157
+ type: 'title',
158
+ text: 'Digital Eye Strain: The Hidden Cost of Screen Work',
159
+ level: 2,
160
+ },
161
+ {
162
+ type: 'paragraph',
163
+ html: 'More than <strong>60% of digital workers</strong> experience symptoms of digital eye strain daily: irritated eyes, blurred vision, frontal headaches, or a feeling of ocular heaviness. This syndrome, clinically known as <em>Computer Vision Syndrome</em> (CVS), is the direct consequence of subjecting the visual system to sustained close-focus effort without the rest that ocular physiology demands.',
164
+ },
165
+ {
166
+ type: 'title',
167
+ text: 'The 20-20-20 Rule: Scientific Basis and Practical Application',
168
+ level: 2,
169
+ },
170
+ {
171
+ type: 'paragraph',
172
+ html: 'The 20-20-20 rule was popularised by Dr Jeff Anshel as a mnemonic method for implementing visual breaks. Every <strong>20 minutes</strong> of screen work, look at an object <strong>20 feet</strong> (≈6 metres) away for <strong>20 seconds</strong>. This interval is sufficient for the ciliary muscle to reach its state of complete relaxation, equivalent to infinite vision.',
173
+ },
174
+ {
175
+ type: 'table',
176
+ headers: ['Screen hours', 'Risk level', 'Common symptoms', 'Recommended rest'],
177
+ rows: [
178
+ ['0-2 h', 'Low', 'Virtually none', '4 min/day'],
179
+ ['2-4 h', 'Low-Moderate', 'Occasional mild dryness', '6-8 min/day'],
180
+ ['4-8 h', 'Moderate', 'Dryness, headache, afternoon blur', '10-16 min/day'],
181
+ ['8-12 h', 'High', 'Marked fatigue, transient double vision', '18-24 min/day'],
182
+ ['>12 h', 'Critical', 'Persistent symptoms, risk of pathology', '>24 min/day'],
183
+ ],
184
+ },
185
+ {
186
+ type: 'tip',
187
+ title: 'Blinking: The Forgotten Variable',
188
+ html: 'Under normal conditions we blink <strong>17 times per minute</strong>, distributing the tear film over the cornea. In front of a screen that rate drops to <strong>7 times per minute</strong> — a 59% reduction. The result is accelerated tear evaporation, dryness and increased irritation. Blinking consciously every few minutes is as important as visual breaks.',
189
+ },
190
+ {
191
+ type: 'title',
192
+ text: 'Blue Light: Effects on the Visual System and Sleep',
193
+ level: 2,
194
+ },
195
+ {
196
+ type: 'paragraph',
197
+ html: 'LED screens emit in the <strong>380–500 nm</strong> range (high-energy blue light). This spectrum has two documented effects: it stimulates the retinal ganglion cells that regulate circadian rhythm, suppressing nocturnal <strong>melatonin</strong> secretion; and it generates oxidative stress in the retinal pigment epithelium with chronic and cumulative exposure.',
198
+ },
199
+ {
200
+ type: 'title',
201
+ text: 'Visual Ergonomics: Posture and Working Distance',
202
+ level: 2,
203
+ },
204
+ {
205
+ type: 'paragraph',
206
+ html: 'Working distance is not an arbitrary figure: at <strong>60 cm</strong> the ciliary muscle works at 50% of its maximum accommodation capacity; at <strong>90 cm</strong> the effort falls to near zero. For intensive users (>8h), increasing working distance and using a larger font size significantly reduces cumulative daily ciliary load.',
207
+ },
208
+ {
209
+ type: 'title',
210
+ text: 'When to See an Ophthalmologist',
211
+ level: 2,
212
+ },
213
+ {
214
+ type: 'list',
215
+ items: [
216
+ 'Blurred vision <strong>persisting more than 30 minutes</strong> after leaving the screen.',
217
+ '<strong>Frequent</strong> frontal or occipital headaches associated with digital work.',
218
+ 'Transient double vision or difficulty shifting focus between distances.',
219
+ '<strong>Persistent</strong> foreign-body sensation, itching or stinging.',
220
+ 'Sudden changes in visual acuity unrelated to fatigue.',
221
+ 'Symptoms that <strong>do not improve</strong> with standard preventive measures.',
222
+ ],
223
+ },
224
+ ],
225
+ };
@@ -0,0 +1,247 @@
1
+ import type { WithContext, SoftwareApplication, FAQPage, HowToThing } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { ScreenDecompressionTimeUI } from '../ui';
4
+
5
+ const slug = 'calculadora-descompresion-ocular';
6
+ const title = 'Calculadora de Descompresión Ocular';
7
+ const description =
8
+ 'Calcula los minutos de descanso visual que necesitas según las horas frente a pantalla. Regla 20-20-20 personalizada para prevenir la fatiga ocular digital.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: '¿Qué es la regla 20-20-20 y por qué funciona?',
13
+ answer:
14
+ 'La regla 20-20-20 indica que cada 20 minutos de trabajo frente a pantalla debes mirar un objeto a 20 pies (6 metros) durante al menos 20 segundos. Este intervalo permite que el músculo ciliar del ojo, responsable del enfoque, se relaje y recupere tras el esfuerzo de la visión próxima continuada.',
15
+ },
16
+ {
17
+ question: '¿Cuántos minutos de descanso necesito si trabajo 8 horas frente al ordenador?',
18
+ answer:
19
+ 'Para 8 horas de exposición a pantalla, la calculadora recomienda aproximadamente 16 minutos de descanso visual distribuidos a lo largo del día, con pausas de 30 segundos cada 20 minutos. Además se recomienda al menos un descanso largo de 10-15 minutos a mitad de jornada.',
20
+ },
21
+ {
22
+ question: '¿Por qué los ojos se cansan mirando pantallas?',
23
+ answer:
24
+ 'Las pantallas obligan al músculo ciliar a mantener una contracción sostenida para mantener el enfoque en un punto cercano. Además reducen la frecuencia de parpadeo de 17 a apenas 7 veces por minuto, lo que provoca sequedad. La luz azul de alta energía (380-500nm) añade estrés oxidativo adicional a la retina.',
25
+ },
26
+ {
27
+ question: '¿Son necesarias las gafas de luz azul?',
28
+ answer:
29
+ 'Las evidencias científicas sobre los filtros de luz azul son mixtas para la fatiga general, pero resultan especialmente útiles a partir de 6-8 horas diarias de pantalla. Su beneficio más documentado es la reducción de la supresión de melatonina nocturna, lo que mejora la calidad del sueño en usuarios intensivos.',
30
+ },
31
+ {
32
+ question: '¿Cuándo debo consultar a un oftalmólogo por fatiga visual digital?',
33
+ answer:
34
+ 'Debes consultar si experimentas visión borrosa que persiste más de 30 minutos tras dejar la pantalla, dolores de cabeza frecuentes en la zona frontal u occipital, visión doble, sensación de cuerpo extraño persistente en el ojo o cambios repentinos en la agudeza visual. Estos síntomas pueden indicar problemas refractivos no corregidos o patología ocular.',
35
+ },
36
+ ];
37
+
38
+ const howToData = [
39
+ {
40
+ name: 'Introduce tus horas de pantalla',
41
+ text: 'Usa el deslizador o el campo numérico para indicar cuántas horas al día pasas mirando pantallas (ordenador, móvil, tablet). El rango va de 0 a 16 horas.',
42
+ },
43
+ {
44
+ name: 'Obtén tu plan personalizado',
45
+ text: 'La calculadora calcula al instante los minutos de descanso recomendados, el nivel de fatiga ocular, el intervalo óptimo entre pausas y la distancia de trabajo ideal.',
46
+ },
47
+ {
48
+ name: 'Aplica las recomendaciones dinámicas',
49
+ text: 'Lee las 4 tarjetas de recomendaciones adaptadas a tus horas: gestión de descansos, postura ergonómica, frecuencia de parpadeo y protección frente a la luz azul.',
50
+ },
51
+ {
52
+ name: 'Visualiza tu día ideal',
53
+ text: 'El gráfico de línea temporal muestra cómo debería distribuirse tu jornada entre tiempo de trabajo en pantalla, descansos visuales y otras actividades sin pantalla.',
54
+ },
55
+ ];
56
+
57
+ const faqSchema: WithContext<FAQPage> = {
58
+ '@context': 'https://schema.org',
59
+ '@type': 'FAQPage',
60
+ mainEntity: faqData.map((item) => ({
61
+ '@type': 'Question',
62
+ name: item.question,
63
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
64
+ })),
65
+ };
66
+
67
+ const howToSchema: WithContext<HowToThing> = {
68
+ '@context': 'https://schema.org',
69
+ '@type': 'HowTo',
70
+ name: title,
71
+ description,
72
+ step: howToData.map((step, i) => ({
73
+ '@type': 'HowToStep',
74
+ position: i + 1,
75
+ name: step.name,
76
+ text: step.text,
77
+ })),
78
+ };
79
+
80
+ const appSchema: WithContext<SoftwareApplication> = {
81
+ '@context': 'https://schema.org',
82
+ '@type': 'SoftwareApplication',
83
+ name: title,
84
+ description,
85
+ applicationCategory: 'HealthApplication',
86
+ operatingSystem: 'Web',
87
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
88
+ };
89
+
90
+ export const content: ToolLocaleContent<ScreenDecompressionTimeUI> = {
91
+ slug,
92
+ title,
93
+ description,
94
+ faqTitle: 'Preguntas frecuentes sobre fatiga visual y pantallas',
95
+ faq: faqData,
96
+ bibliographyTitle: 'Referencias científicas',
97
+ bibliography: [
98
+ {
99
+ name: 'Organización Mundial de la Salud — Salud Ocular',
100
+ url: 'https://www.who.int/es/news-room/fact-sheets/detail/blindness-and-visual-impairment',
101
+ },
102
+ {
103
+ name: 'American Optometric Association — Computer Vision Syndrome',
104
+ url: 'https://www.aoa.org/healthy-eyes/eye-and-vision-conditions/computer-vision-syndrome',
105
+ },
106
+ {
107
+ name: 'Mayo Clinic — Eyestrain',
108
+ url: 'https://www.mayoclinic.org/diseases-conditions/eyestrain/symptoms-causes/syc-20372397',
109
+ },
110
+ ],
111
+ howTo: howToData,
112
+ schemas: [faqSchema, howToSchema, appSchema],
113
+ ui: {
114
+ labelHours: 'Horas mirando pantalla',
115
+ presetLow: 'Poco',
116
+ presetNormal: 'Normal',
117
+ presetHigh: 'Mucho',
118
+ resultUnit: 'minutos de descanso',
119
+ resultPer: 'por día',
120
+ statInterval: 'Intervalo',
121
+ statBreaks: 'Descansos/día',
122
+ statDistance: 'Distancia ideal',
123
+ timelineTitle: 'Tu Día Visual Ideal',
124
+ timelineWork: 'Trabajo',
125
+ timelineRest: 'Descanso',
126
+ timelineOther: 'Otros',
127
+ fatigueLow: 'Bajo',
128
+ fatigueMod: 'Moderado',
129
+ fatigueHigh: 'Alto',
130
+ fatigueCritical: 'Crítico',
131
+ recBreaksTitle: 'Descansos',
132
+ recBreaksText: 'Haz un descanso visual cada {0} minutos de trabajo continuo.',
133
+ recPostureTitle: 'Postura',
134
+ recPostureLow: 'Mantén la pantalla a 60-70 cm. Ajusta la altura al nivel de los ojos.',
135
+ recPostureMod: 'Aumenta la distancia a 70-80 cm. Usa un monitor de al menos 24 pulgadas.',
136
+ recPostureHigh: 'Distancia mínima 80-100 cm. Valora usar un proyector o pantalla grande.',
137
+ recBlinkTitle: 'Parpadeo',
138
+ recBlinkText: 'Parpadea conscientemente {0}+ veces por hora. Las pantallas reducen el parpadeo un 66%.',
139
+ recLightTitle: 'Luz Azul',
140
+ recLightLow: 'Activa el modo noche del sistema operativo a partir de las 20h.',
141
+ recLightMod: 'Usa gafas con filtro de luz azul o activa f.lux/Night Shift en todos tus dispositivos.',
142
+ recLightHigh: 'Filtro de luz azul + gafas especializadas + pantalla en modo oscuro IMPRESCINDIBLES.',
143
+ unitMin: 'min',
144
+ },
145
+ seo: [
146
+ {
147
+ type: 'summary',
148
+ title: 'Calculadora de Descompresión Ocular',
149
+ items: [
150
+ '<strong>Fórmula personalizada</strong>: 2 minutos de descanso por cada hora de exposición a pantalla.',
151
+ '<strong>4 niveles de fatiga</strong>: Bajo, Moderado, Alto y Crítico con recomendaciones adaptadas.',
152
+ '<strong>Regla 20-20-20</strong>: intervalos de descanso calculados según tus horas reales de uso.',
153
+ '<strong>Línea temporal</strong>: visualización de tu jornada ideal con bloques de trabajo y descanso.',
154
+ ],
155
+ },
156
+ {
157
+ type: 'title',
158
+ text: 'Fatiga Visual Digital: El Coste Oculto del Trabajo en Pantalla',
159
+ level: 2,
160
+ },
161
+ {
162
+ type: 'paragraph',
163
+ html: 'Más del <strong>60% de los trabajadores digitales</strong> experimenta síntomas de fatiga visual digital a diario: ojos irritados, visión borrosa, cefaleas frontales o sensación de pesadez ocular. Este síndrome, conocido clínicamente como <em>Computer Vision Syndrome</em> (CVS), es la consecuencia directa de someter al sistema visual a un esfuerzo de enfoque cercano y sostenido sin los descansos que la fisiología ocular exige.',
164
+ },
165
+ {
166
+ type: 'paragraph',
167
+ html: 'El <strong>músculo ciliar</strong> es el responsable del enfoque visual (acomodación). En visión lejana permanece relajado; en visión próxima mantiene una contracción continua. Sin pausas estratégicas, ese músculo acumula fatiga de la misma forma que el bíceps después de curls repetidos sin descanso.',
168
+ },
169
+ {
170
+ type: 'title',
171
+ text: 'La Regla 20-20-20: Base Científica y Aplicación Práctica',
172
+ level: 2,
173
+ },
174
+ {
175
+ type: 'paragraph',
176
+ html: 'La regla 20-20-20 fue popularizada por el Dr. Jeff Anshel como método mnemotécnico para implementar pausas visuales. Cada <strong>20 minutos</strong> de trabajo en pantalla, mira un objeto situado a <strong>20 pies</strong> (≈6 metros) durante <strong>20 segundos</strong>. Este intervalo es suficiente para que el músculo ciliar alcance su estado de relajación completa, equivalente a la visión infinita.',
177
+ },
178
+ {
179
+ type: 'table',
180
+ headers: ['Horas de pantalla', 'Nivel de riesgo', 'Síntomas frecuentes', 'Descanso recomendado'],
181
+ rows: [
182
+ ['0-2 h', 'Bajo', 'Prácticamente ninguno', '4 min/día'],
183
+ ['2-4 h', 'Bajo-Moderado', 'Leve sequedad ocasional', '6-8 min/día'],
184
+ ['4-8 h', 'Moderado', 'Sequedad, cefalea, borrosidad vespertina', '10-16 min/día'],
185
+ ['8-12 h', 'Alto', 'Fatiga marcada, visión doble transitoria', '18-24 min/día'],
186
+ ['>12 h', 'Crítico', 'Síntomas persistentes, riesgo de patología', '>24 min/día'],
187
+ ],
188
+ },
189
+ {
190
+ type: 'title',
191
+ text: 'Biología del Músculo Ciliar y la Acomodación Visual',
192
+ level: 2,
193
+ },
194
+ {
195
+ type: 'paragraph',
196
+ html: 'La <strong>acomodación visual</strong> es el proceso por el cual el cristalino cambia su curvatura para enfocar objetos a distintas distancias. En visión lejana el músculo ciliar se relaja y el cristalino se aplana; en visión próxima (pantalla, libro) el músculo se contrae y el cristalino se abomba. Mantener esa contracción durante horas sin pausa genera el equivalente visual de una contractura muscular.',
197
+ },
198
+ {
199
+ type: 'tip',
200
+ title: 'El Parpadeo: La Variable Olvidada',
201
+ html: 'En condiciones normales parpadeamos <strong>17 veces por minuto</strong>, lo que distribuye la película lagrimal sobre la córnea. Frente a una pantalla esa frecuencia cae a <strong>7 veces por minuto</strong> — una reducción del 59%. El resultado es evaporación acelerada de la lágrima, sequedad y mayor irritación. Parpadear conscientemente cada pocos minutos es tan importante como las pausas visuales.',
202
+ },
203
+ {
204
+ type: 'title',
205
+ text: 'Luz Azul: Efectos en el Sistema Visual y el Sueño',
206
+ level: 2,
207
+ },
208
+ {
209
+ type: 'paragraph',
210
+ html: 'Las pantallas LED emiten en el rango de <strong>380-500 nm</strong> (luz azul de alta energía). Este espectro tiene dos efectos documentados: estimula las células ganglionares de la retina que regulan el ritmo circadiano, suprimiendo la secreción de <strong>melatonina</strong> nocturna; y genera estrés oxidativo en el epitelio pigmentario retiniano con exposición crónica y acumulada.',
211
+ },
212
+ {
213
+ type: 'list',
214
+ items: [
215
+ '<strong>0-4 h/día</strong>: Activa el modo noche del SO a partir de las 20h. No requiere hardware adicional.',
216
+ '<strong>4-8 h/día</strong>: Instala f.lux o Night Shift en todos los dispositivos y considera gafas con filtro.',
217
+ '<strong>8-12 h/día</strong>: Gafas especializadas con filtro ≥25% + pantalla en modo oscuro permanente.',
218
+ '<strong>>12 h/día</strong>: Consulta oftalmológica periódica. Valora pantallas de tinta electrónica para lectura.',
219
+ ],
220
+ },
221
+ {
222
+ type: 'title',
223
+ text: 'Ergonomía Visual: Postura y Distancia de Trabajo',
224
+ level: 2,
225
+ },
226
+ {
227
+ type: 'paragraph',
228
+ html: 'La distancia de trabajo no es un dato arbitrario: a <strong>60 cm</strong> el músculo ciliar trabaja al 50% de su capacidad máxima de acomodación; a <strong>90 cm</strong> el esfuerzo se reduce casi a cero. Para usuarios intensivos (>8h), aumentar la distancia de trabajo y usar una tipografía mayor reduce significativamente la carga ciliar acumulada diaria.',
229
+ },
230
+ {
231
+ type: 'title',
232
+ text: 'Cuándo Consultar al Oftalmólogo',
233
+ level: 2,
234
+ },
235
+ {
236
+ type: 'list',
237
+ items: [
238
+ 'Visión borrosa que <strong>persiste más de 30 minutos</strong> tras dejar la pantalla.',
239
+ 'Cefaleas frontales u occipitales <strong>frecuentes</strong> asociadas al trabajo digital.',
240
+ 'Visión doble transitoria o dificultad para cambiar el enfoque entre distancias.',
241
+ 'Sensación de cuerpo extraño, picor o escozor <strong>persistente</strong>.',
242
+ 'Cambios súbitos en la agudeza visual no relacionados con la fatiga.',
243
+ 'Síntomas que <strong>no mejoran</strong> con las medidas preventivas estándar.',
244
+ ],
245
+ },
246
+ ],
247
+ };