@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.
- package/package.json +60 -0
- package/src/category/i18n/en.ts +60 -0
- package/src/category/i18n/es.ts +60 -0
- package/src/category/i18n/fr.ts +60 -0
- package/src/category/index.ts +22 -0
- package/src/category/seo.astro +15 -0
- package/src/components/PreviewNavSidebar.astro +116 -0
- package/src/components/PreviewToolbar.astro +143 -0
- package/src/data.ts +28 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +36 -0
- package/src/layouts/PreviewLayout.astro +117 -0
- package/src/pages/[locale]/[slug].astro +146 -0
- package/src/pages/[locale].astro +251 -0
- package/src/pages/index.astro +4 -0
- package/src/tests/faq_count.test.ts +19 -0
- package/src/tests/locale_completeness.test.ts +42 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/no_h1_in_components.test.ts +48 -0
- package/src/tests/schemas_fulfillment.test.ts +23 -0
- package/src/tests/seo_length.test.ts +22 -0
- package/src/tests/title_quality.test.ts +55 -0
- package/src/tests/tool_validation.test.ts +17 -0
- package/src/tool/binauralTuner/bibliography.astro +14 -0
- package/src/tool/binauralTuner/component.astro +687 -0
- package/src/tool/binauralTuner/i18n/en.ts +187 -0
- package/src/tool/binauralTuner/i18n/es.ts +187 -0
- package/src/tool/binauralTuner/i18n/fr.ts +187 -0
- package/src/tool/binauralTuner/index.ts +27 -0
- package/src/tool/binauralTuner/seo.astro +14 -0
- package/src/tool/binauralTuner/ui.ts +18 -0
- package/src/tool/bloodUnitConverter/bibliography.astro +14 -0
- package/src/tool/bloodUnitConverter/component.astro +915 -0
- package/src/tool/bloodUnitConverter/i18n/en.ts +227 -0
- package/src/tool/bloodUnitConverter/i18n/es.ts +250 -0
- package/src/tool/bloodUnitConverter/i18n/fr.ts +218 -0
- package/src/tool/bloodUnitConverter/index.ts +27 -0
- package/src/tool/bloodUnitConverter/seo.astro +14 -0
- package/src/tool/bloodUnitConverter/ui.ts +38 -0
- package/src/tool/bmiCalculator/bibliography.astro +14 -0
- package/src/tool/bmiCalculator/component.astro +415 -0
- package/src/tool/bmiCalculator/i18n/en.ts +217 -0
- package/src/tool/bmiCalculator/i18n/es.ts +221 -0
- package/src/tool/bmiCalculator/i18n/fr.ts +217 -0
- package/src/tool/bmiCalculator/index.ts +27 -0
- package/src/tool/bmiCalculator/seo.astro +14 -0
- package/src/tool/bmiCalculator/ui.ts +21 -0
- package/src/tool/breathingVisualizer/bibliography.astro +14 -0
- package/src/tool/breathingVisualizer/component.astro +636 -0
- package/src/tool/breathingVisualizer/i18n/en.ts +206 -0
- package/src/tool/breathingVisualizer/i18n/es.ts +206 -0
- package/src/tool/breathingVisualizer/i18n/fr.ts +206 -0
- package/src/tool/breathingVisualizer/index.ts +27 -0
- package/src/tool/breathingVisualizer/seo.astro +14 -0
- package/src/tool/breathingVisualizer/ui.ts +31 -0
- package/src/tool/caffeineTracker/bibliography.astro +14 -0
- package/src/tool/caffeineTracker/component.astro +1210 -0
- package/src/tool/caffeineTracker/i18n/en.ts +198 -0
- package/src/tool/caffeineTracker/i18n/es.ts +198 -0
- package/src/tool/caffeineTracker/i18n/fr.ts +198 -0
- package/src/tool/caffeineTracker/index.ts +27 -0
- package/src/tool/caffeineTracker/logic.ts +31 -0
- package/src/tool/caffeineTracker/seo.astro +14 -0
- package/src/tool/caffeineTracker/ui.ts +36 -0
- package/src/tool/daltonismSimulator/bibliography.astro +14 -0
- package/src/tool/daltonismSimulator/component.astro +383 -0
- package/src/tool/daltonismSimulator/i18n/en.ts +188 -0
- package/src/tool/daltonismSimulator/i18n/es.ts +218 -0
- package/src/tool/daltonismSimulator/i18n/fr.ts +168 -0
- package/src/tool/daltonismSimulator/index.ts +27 -0
- package/src/tool/daltonismSimulator/seo.astro +14 -0
- package/src/tool/daltonismSimulator/ui.ts +20 -0
- package/src/tool/digestionStopwatch/bibliography.astro +14 -0
- package/src/tool/digestionStopwatch/component.astro +627 -0
- package/src/tool/digestionStopwatch/i18n/en.ts +173 -0
- package/src/tool/digestionStopwatch/i18n/es.ts +173 -0
- package/src/tool/digestionStopwatch/i18n/fr.ts +173 -0
- package/src/tool/digestionStopwatch/index.ts +27 -0
- package/src/tool/digestionStopwatch/logic.ts +63 -0
- package/src/tool/digestionStopwatch/seo.astro +14 -0
- package/src/tool/digestionStopwatch/ui.ts +20 -0
- package/src/tool/epworthSleepinessScale/bibliography.astro +14 -0
- package/src/tool/epworthSleepinessScale/component.astro +528 -0
- package/src/tool/epworthSleepinessScale/i18n/en.ts +217 -0
- package/src/tool/epworthSleepinessScale/i18n/es.ts +217 -0
- package/src/tool/epworthSleepinessScale/i18n/fr.ts +217 -0
- package/src/tool/epworthSleepinessScale/index.ts +27 -0
- package/src/tool/epworthSleepinessScale/seo.astro +14 -0
- package/src/tool/epworthSleepinessScale/ui.ts +27 -0
- package/src/tool/hydrationCalculator/bibliography.astro +14 -0
- package/src/tool/hydrationCalculator/component.astro +694 -0
- package/src/tool/hydrationCalculator/i18n/en.ts +217 -0
- package/src/tool/hydrationCalculator/i18n/es.ts +222 -0
- package/src/tool/hydrationCalculator/i18n/fr.ts +199 -0
- package/src/tool/hydrationCalculator/index.ts +27 -0
- package/src/tool/hydrationCalculator/seo.astro +14 -0
- package/src/tool/hydrationCalculator/ui.ts +28 -0
- package/src/tool/pelliRobsonTest/bibliography.astro +14 -0
- package/src/tool/pelliRobsonTest/component.astro +653 -0
- package/src/tool/pelliRobsonTest/i18n/en.ts +205 -0
- package/src/tool/pelliRobsonTest/i18n/es.ts +205 -0
- package/src/tool/pelliRobsonTest/i18n/fr.ts +205 -0
- package/src/tool/pelliRobsonTest/index.ts +27 -0
- package/src/tool/pelliRobsonTest/seo.astro +14 -0
- package/src/tool/pelliRobsonTest/ui.ts +21 -0
- package/src/tool/peripheralVisionTrainer/bibliography.astro +14 -0
- package/src/tool/peripheralVisionTrainer/component.astro +678 -0
- package/src/tool/peripheralVisionTrainer/i18n/en.ts +224 -0
- package/src/tool/peripheralVisionTrainer/i18n/es.ts +224 -0
- package/src/tool/peripheralVisionTrainer/i18n/fr.ts +211 -0
- package/src/tool/peripheralVisionTrainer/index.ts +27 -0
- package/src/tool/peripheralVisionTrainer/seo.astro +14 -0
- package/src/tool/peripheralVisionTrainer/ui.ts +26 -0
- package/src/tool/readingDistanceCalculator/bibliography.astro +14 -0
- package/src/tool/readingDistanceCalculator/component.astro +588 -0
- package/src/tool/readingDistanceCalculator/i18n/en.ts +202 -0
- package/src/tool/readingDistanceCalculator/i18n/es.ts +215 -0
- package/src/tool/readingDistanceCalculator/i18n/fr.ts +193 -0
- package/src/tool/readingDistanceCalculator/index.ts +31 -0
- package/src/tool/readingDistanceCalculator/seo.astro +14 -0
- package/src/tool/readingDistanceCalculator/ui.ts +18 -0
- package/src/tool/screenDecompressionTime/bibliography.astro +14 -0
- package/src/tool/screenDecompressionTime/component.astro +671 -0
- package/src/tool/screenDecompressionTime/i18n/en.ts +225 -0
- package/src/tool/screenDecompressionTime/i18n/es.ts +247 -0
- package/src/tool/screenDecompressionTime/i18n/fr.ts +225 -0
- package/src/tool/screenDecompressionTime/index.ts +27 -0
- package/src/tool/screenDecompressionTime/seo.astro +14 -0
- package/src/tool/screenDecompressionTime/ui.ts +32 -0
- package/src/tool/tinnitusReliever/bibliography.astro +14 -0
- package/src/tool/tinnitusReliever/component.astro +581 -0
- package/src/tool/tinnitusReliever/i18n/en.ts +161 -0
- package/src/tool/tinnitusReliever/i18n/es.ts +161 -0
- package/src/tool/tinnitusReliever/i18n/fr.ts +161 -0
- package/src/tool/tinnitusReliever/index.ts +27 -0
- package/src/tool/tinnitusReliever/seo.astro +14 -0
- package/src/tool/tinnitusReliever/ui.ts +9 -0
- package/src/tool/ubeCalculator/bibliography.astro +14 -0
- package/src/tool/ubeCalculator/component.astro +683 -0
- package/src/tool/ubeCalculator/i18n/en.ts +200 -0
- package/src/tool/ubeCalculator/i18n/es.ts +200 -0
- package/src/tool/ubeCalculator/i18n/fr.ts +196 -0
- package/src/tool/ubeCalculator/index.ts +27 -0
- package/src/tool/ubeCalculator/seo.astro +14 -0
- package/src/tool/ubeCalculator/ui.ts +26 -0
- package/src/tool/waterPurifier/bibliography.astro +14 -0
- package/src/tool/waterPurifier/component.astro +628 -0
- package/src/tool/waterPurifier/i18n/en.ts +167 -0
- package/src/tool/waterPurifier/i18n/es.ts +167 -0
- package/src/tool/waterPurifier/i18n/fr.ts +167 -0
- package/src/tool/waterPurifier/index.ts +27 -0
- package/src/tool/waterPurifier/seo.astro +14 -0
- package/src/tool/waterPurifier/ui.ts +18 -0
- package/src/tools.ts +19 -0
- package/src/types.ts +72 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication, FAQPage, HowToThing } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { DigestionStopwatchUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'digestion-stopwatch';
|
|
6
|
+
const title = 'Digestion Stopwatch: Physiological Transit Tracker';
|
|
7
|
+
const description =
|
|
8
|
+
'Calculate how long your food takes to digest. Track progress through the stomach, small intestine, and large intestine based on macronutrients.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'How long does a full meal actually take to digest?',
|
|
13
|
+
answer:
|
|
14
|
+
'Total transit usually takes 24 to 72 hours. However, gastric emptying (stomach) occurs within the first 2 to 5 hours, followed by 2 to 6 hours in the small intestine.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'Which foods digest the fastest?',
|
|
18
|
+
answer:
|
|
19
|
+
'Simple carbohydrates (fruits, sugars) and liquids are the fastest. Proteins take longer, and fats remain in the stomach the longest, slowing down the entire process.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'Why does transit time matter?',
|
|
23
|
+
answer:
|
|
24
|
+
'Too-fast transit (diarrhea) prevents proper nutrient absorption. Too-slow transit (constipation) can lead to reabsorption of toxins and general discomfort.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'How does exercise affect digestion?',
|
|
28
|
+
answer:
|
|
29
|
+
'Light exercise (walking) helps intestinal motility. However, intense exercise right after eating can slow digestion by diverting blood flow from digestive organs to muscles.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Select composition',
|
|
36
|
+
text: 'Choose whether your meal was light, normal or heavy, and which macronutrients predominated (fats, proteins or carbohydrates).',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Set the time',
|
|
40
|
+
text: 'Enter the exact time you ate and whether it was today or yesterday for an accurate calculation.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Follow the stages',
|
|
44
|
+
text: 'Watch the progress bar showing which phase of the digestive tract the food bolus is theoretically in.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Real-time updates',
|
|
48
|
+
text: 'The stopwatch updates automatically every minute to reflect the progress of gastrointestinal transit.',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
53
|
+
'@context': 'https://schema.org',
|
|
54
|
+
'@type': 'FAQPage',
|
|
55
|
+
mainEntity: faqData.map((item) => ({
|
|
56
|
+
'@type': 'Question',
|
|
57
|
+
name: item.question,
|
|
58
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
63
|
+
'@context': 'https://schema.org',
|
|
64
|
+
'@type': 'HowTo',
|
|
65
|
+
name: title,
|
|
66
|
+
description,
|
|
67
|
+
step: howToData.map((step, i) => ({
|
|
68
|
+
'@type': 'HowToStep',
|
|
69
|
+
position: i + 1,
|
|
70
|
+
name: step.name,
|
|
71
|
+
text: step.text,
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
76
|
+
'@context': 'https://schema.org',
|
|
77
|
+
'@type': 'SoftwareApplication',
|
|
78
|
+
name: title,
|
|
79
|
+
description,
|
|
80
|
+
applicationCategory: 'HealthApplication',
|
|
81
|
+
operatingSystem: 'Web',
|
|
82
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const content: ToolLocaleContent<DigestionStopwatchUI> = {
|
|
86
|
+
slug,
|
|
87
|
+
title,
|
|
88
|
+
description,
|
|
89
|
+
faqTitle: 'Frequently asked questions about digestion',
|
|
90
|
+
faq: faqData,
|
|
91
|
+
bibliographyTitle: 'Scientific references',
|
|
92
|
+
bibliography: [
|
|
93
|
+
{
|
|
94
|
+
name: 'Intestinal tract motility - University of Cantabria (OCW)',
|
|
95
|
+
url: 'https://ocw.unican.es/mod/page/view.php?id=534',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'Techniques for studying digestive motor activity - ASENEM',
|
|
99
|
+
url: 'https://www.asenem.org/resources/publications/view/tecnicas-para-el-estudio-de-la-actividad-motora-digestiva-protocolos-metodologicos/',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'Intestinal transit time - MedlinePlus / NIH',
|
|
103
|
+
url: 'https://medlineplus.gov/spanish/ency/article/003887.htm',
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
howTo: howToData,
|
|
107
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
108
|
+
ui: {
|
|
109
|
+
labelIngestionDay: 'Day of Intake',
|
|
110
|
+
labelIngestionHour: 'Exact Time',
|
|
111
|
+
dayToday: 'Today',
|
|
112
|
+
dayYesterday: 'Yesterday',
|
|
113
|
+
labelNutritionalComposition: 'Nutritional Composition',
|
|
114
|
+
macroLiquidLabel: 'Liquids',
|
|
115
|
+
macroCarbsLabel: 'Carbs',
|
|
116
|
+
macroProteinLabel: 'Protein',
|
|
117
|
+
macroFatLabel: 'Fats',
|
|
118
|
+
statusTitle: 'Transit Status',
|
|
119
|
+
stageStomach: 'Stomach',
|
|
120
|
+
stageSmallIntestine: 'Small Intestine',
|
|
121
|
+
stageLargeIntestine: 'Large Intestine',
|
|
122
|
+
descWaiting: 'Awaiting arrival...',
|
|
123
|
+
descProcessed: 'Processed.',
|
|
124
|
+
descStomach: 'Acid breakdown in progress.',
|
|
125
|
+
descSmallIntestine: 'Active nutrient absorption.',
|
|
126
|
+
descLargeIntestine: 'Fermentation and water reabsorption.',
|
|
127
|
+
},
|
|
128
|
+
seo: [
|
|
129
|
+
{
|
|
130
|
+
type: 'summary',
|
|
131
|
+
title: 'Digestion Stopwatch',
|
|
132
|
+
items: [
|
|
133
|
+
'<strong>Real-time tracking</strong>: automatic update every minute based on meal time.',
|
|
134
|
+
'<strong>3 physiological stages</strong>: stomach (pH 1.5–3.5), small intestine (pH 6.0–7.4) and large intestine (pH 5.5–7.0).',
|
|
135
|
+
'<strong>Macronutrient adjustment</strong>: liquids speed up transit (×0.5), fats slow it down (×1.5).',
|
|
136
|
+
'<strong>Day selector</strong>: works for meals eaten today or yesterday.',
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
{ type: 'title', text: 'The Physiology of Human Digestion', level: 2 },
|
|
140
|
+
{
|
|
141
|
+
type: 'paragraph',
|
|
142
|
+
html: 'The human digestive system is one of the most sophisticated biological mechanisms in existence. From the moment we ingest food, a cascade of chemical, mechanical and neurological processes begins to extract the nutrients needed to sustain life. Understanding how long each stage takes not only satisfies scientific curiosity, but helps make better decisions about nutrition, exercise and rest.',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: 'paragraph',
|
|
146
|
+
html: 'The <strong>stomach</strong> acts as a high-acidity chemical reactor (pH between 1.5 and 3.5). Hydrochloric acid denatures proteins and activates enzymes like pepsin. Fats spend the most time here, as the body must emulsify them before allowing passage to the small intestine. A high-fat meal can retain chyme in the stomach for up to 4 hours.',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'tip',
|
|
150
|
+
title: 'Factors That Speed Up Digestion',
|
|
151
|
+
html: '<strong>Liquids</strong> pass almost directly to the intestine (30–120 min). <strong>Simple carbohydrates</strong> empty in 1–2 hours. Walking 15–20 minutes after a meal can reduce gastric emptying time by up to 15%. Stress, on the contrary, can halt transit by diverting blood away from digestive organs.',
|
|
152
|
+
},
|
|
153
|
+
{ type: 'title', text: 'The Three Stages of Digestive Transit', level: 2 },
|
|
154
|
+
{
|
|
155
|
+
type: 'list',
|
|
156
|
+
items: [
|
|
157
|
+
'<strong>Stomach (2–5 hours):</strong> acid breakdown with pepsin and gastric lipase. The extremely acidic pH eliminates bacteria and breaks down protein structures.',
|
|
158
|
+
'<strong>Small Intestine (3–5 hours):</strong> massive nutrient absorption. Intestinal villi multiply the contact surface to the equivalent of a tennis court. About 90% of nutrients are absorbed here.',
|
|
159
|
+
'<strong>Large Intestine (10–60 hours):</strong> water and electrolyte reabsorption, fermentation by the microbiota and feces formation. Time in this stage varies enormously based on fiber consumed and each person\'s microbiome.',
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
{ type: 'title', text: 'The Gut-Brain Axis', level: 2 },
|
|
163
|
+
{
|
|
164
|
+
type: 'paragraph',
|
|
165
|
+
html: 'The intestine has its own autonomous nervous system, the <strong>enteric nervous system</strong>, comprising more than 500 million neurons. It produces 95% of the body\'s serotonin, directly connecting how we digest with how we feel. Eating late interferes with the circadian rhythm of digestive organs, raising core body temperature and compromising deep sleep quality.',
|
|
166
|
+
},
|
|
167
|
+
{ type: 'title', text: 'How to Interpret the Results', level: 2 },
|
|
168
|
+
{
|
|
169
|
+
type: 'paragraph',
|
|
170
|
+
html: 'The times shown are <strong>estimates based on physiological averages</strong>. Actual transit varies by age, hydration level, physical activity and individual microbiome composition. A bar at 100% means the food content has theoretically left that stage; a bar in progress indicates the active digestion phase.',
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication, FAQPage, HowToThing } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { DigestionStopwatchUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'cronometro-digestion';
|
|
6
|
+
const title = 'Cronómetro de Digestión: Seguimiento Fisiológico';
|
|
7
|
+
const description =
|
|
8
|
+
'Calcula cuánto tarda en digerirse tu comida. Rastrea el progreso por el estómago, intestino delgado e intestino grueso basándose en macronutrientes.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: '¿Cuánto tarda realmente en digerirse una comida completa?',
|
|
13
|
+
answer:
|
|
14
|
+
'El tránsito total suele durar entre 24 y 72 horas. Sin embargo, el vaciado gástrico (estómago) ocurre en las primeras 2 a 5 horas, seguido de unas 2 a 6 horas en el intestino delgado.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: '¿Qué alimentos se digieren más rápido?',
|
|
18
|
+
answer:
|
|
19
|
+
'Los carbohidratos simples (frutas, azúcares) y líquidos son los más rápidos. Las proteínas tardan más, y las grasas son las que más tiempo permanecen en el estómago, ralentizando todo el proceso.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: '¿Por qué es importante el tiempo de tránsito?',
|
|
23
|
+
answer:
|
|
24
|
+
'Un tránsito demasiado rápido (diarrea) impide la absorción correcta de nutrientes. Un tránsito muy lento (estreñimiento) puede provocar la reabsorción de toxinas y malestar general.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: '¿Cómo afecta el ejercicio a la digestión?',
|
|
28
|
+
answer:
|
|
29
|
+
'El ejercicio ligero (caminar) ayuda a la motilidad intestinal. Sin embargo, el ejercicio intenso justo después de comer puede ralentizar la digestión al desviar el flujo sanguíneo de los órganos digestivos hacia los músculos.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Seleccionar composición',
|
|
36
|
+
text: 'Indica si tu comida ha sido ligera, normal o pesada, y el predominio de macronutrientes (grasas, proteínas o carbohidratos).',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Ajustar la hora',
|
|
40
|
+
text: 'Introduce la hora exacta a la que has comido y si fue hoy o ayer para que el cálculo sea preciso.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Seguir las etapas',
|
|
44
|
+
text: 'Observa la barra de progreso que indica en qué fase del tracto digestivo se encuentra teóricamente el bolo alimenticio.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Actualización en tiempo real',
|
|
48
|
+
text: 'El cronómetro se actualiza automáticamente cada minuto para reflejar el avance del tránsito gastrointestinal.',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
53
|
+
'@context': 'https://schema.org',
|
|
54
|
+
'@type': 'FAQPage',
|
|
55
|
+
mainEntity: faqData.map((item) => ({
|
|
56
|
+
'@type': 'Question',
|
|
57
|
+
name: item.question,
|
|
58
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
63
|
+
'@context': 'https://schema.org',
|
|
64
|
+
'@type': 'HowTo',
|
|
65
|
+
name: title,
|
|
66
|
+
description,
|
|
67
|
+
step: howToData.map((step, i) => ({
|
|
68
|
+
'@type': 'HowToStep',
|
|
69
|
+
position: i + 1,
|
|
70
|
+
name: step.name,
|
|
71
|
+
text: step.text,
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
76
|
+
'@context': 'https://schema.org',
|
|
77
|
+
'@type': 'SoftwareApplication',
|
|
78
|
+
name: title,
|
|
79
|
+
description,
|
|
80
|
+
applicationCategory: 'HealthApplication',
|
|
81
|
+
operatingSystem: 'Web',
|
|
82
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const content: ToolLocaleContent<DigestionStopwatchUI> = {
|
|
86
|
+
slug,
|
|
87
|
+
title,
|
|
88
|
+
description,
|
|
89
|
+
faqTitle: 'Preguntas frecuentes sobre la digestión',
|
|
90
|
+
faq: faqData,
|
|
91
|
+
bibliographyTitle: 'Referencias científicas',
|
|
92
|
+
bibliography: [
|
|
93
|
+
{
|
|
94
|
+
name: 'Motilidad del tracto intestinal - Universidad de Cantabria (OCW)',
|
|
95
|
+
url: 'https://ocw.unican.es/mod/page/view.php?id=534',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'Técnicas para el estudio de la actividad motora digestiva - ASENEM',
|
|
99
|
+
url: 'https://www.asenem.org/resources/publications/view/tecnicas-para-el-estudio-de-la-actividad-motora-digestiva-protocolos-metodologicos/',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'Tiempo del tránsito intestinal - MedlinePlus / NIH',
|
|
103
|
+
url: 'https://medlineplus.gov/spanish/ency/article/003887.htm',
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
howTo: howToData,
|
|
107
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
108
|
+
ui: {
|
|
109
|
+
labelIngestionDay: 'Día de la Ingesta',
|
|
110
|
+
labelIngestionHour: 'Hora Exacta',
|
|
111
|
+
dayToday: 'Hoy',
|
|
112
|
+
dayYesterday: 'Ayer',
|
|
113
|
+
labelNutritionalComposition: 'Composición Nutricional',
|
|
114
|
+
macroLiquidLabel: 'Líquidos',
|
|
115
|
+
macroCarbsLabel: 'Carbos',
|
|
116
|
+
macroProteinLabel: 'Proteína',
|
|
117
|
+
macroFatLabel: 'Grasas',
|
|
118
|
+
statusTitle: 'Estado del Tránsito',
|
|
119
|
+
stageStomach: 'Estómago',
|
|
120
|
+
stageSmallIntestine: 'Intestino Delgado',
|
|
121
|
+
stageLargeIntestine: 'Intestino Grueso',
|
|
122
|
+
descWaiting: 'Esperando llegada...',
|
|
123
|
+
descProcessed: 'Procesado.',
|
|
124
|
+
descStomach: 'Descomposición ácida en curso.',
|
|
125
|
+
descSmallIntestine: 'Absorción de nutrientes activa.',
|
|
126
|
+
descLargeIntestine: 'Fermentación y reabsorción de agua.',
|
|
127
|
+
},
|
|
128
|
+
seo: [
|
|
129
|
+
{
|
|
130
|
+
type: 'summary',
|
|
131
|
+
title: 'Cronómetro de Digestión',
|
|
132
|
+
items: [
|
|
133
|
+
'<strong>Seguimiento en tiempo real</strong>: actualización automática cada minuto según la hora de la ingesta.',
|
|
134
|
+
'<strong>3 etapas fisiológicas</strong>: estómago (pH 1.5–3.5), intestino delgado (pH 6.0–7.4) e intestino grueso (pH 5.5–7.0).',
|
|
135
|
+
'<strong>Personalizable por macronutrientes</strong>: líquidos aceleran el tránsito (×0.5), las grasas lo ralentizan (×1.5).',
|
|
136
|
+
'<strong>Selección de día</strong>: funciona tanto para comidas de hoy como de ayer.',
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
{ type: 'title', text: 'La Fisiología de la Digestión Humana', level: 2 },
|
|
140
|
+
{
|
|
141
|
+
type: 'paragraph',
|
|
142
|
+
html: 'El sistema digestivo humano es uno de los mecanismos biológicos más sofisticados que existen. Desde el momento en que ingerimos alimentos, una cascada de procesos químicos, mecánicos y neurológicos se pone en marcha para extraer los nutrientes necesarios para mantener la vida. Entender cuánto tarda cada etapa no solo satisface la curiosidad científica, sino que ayuda a tomar mejores decisiones sobre alimentación, ejercicio y descanso.',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: 'paragraph',
|
|
146
|
+
html: 'El <strong>estómago</strong> actúa como un reactor químico de alta acidez (pH entre 1.5 y 3.5). El ácido clorhídrico desnaturaliza las proteínas y activa enzimas como la pepsina. Las grasas son las que más tiempo permanecen aquí, ya que el cuerpo debe emulsionarlas antes de permitir su paso al intestino delgado. Una comida rica en grasas puede retener el quimo hasta 4 horas en el estómago.',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'tip',
|
|
150
|
+
title: 'Factores que Aceleran la Digestión',
|
|
151
|
+
html: 'Los <strong>líquidos</strong> pasan casi directamente al intestino (30–120 min). Los <strong>carbohidratos simples</strong> se vacían en 1–2 horas. Caminar 15–20 minutos tras una comida puede reducir el tiempo de vaciado gástrico hasta un 15%. El estrés, por el contrario, puede detener el tránsito al desviar la sangre de los órganos digestivos.',
|
|
152
|
+
},
|
|
153
|
+
{ type: 'title', text: 'Las Tres Etapas del Tránsito Digestivo', level: 2 },
|
|
154
|
+
{
|
|
155
|
+
type: 'list',
|
|
156
|
+
items: [
|
|
157
|
+
'<strong>Estómago (2–5 horas):</strong> descomposición ácida con pepsina y lipasa gástrica. El pH extremadamente ácido elimina bacterias y desintegra las estructuras proteicas.',
|
|
158
|
+
'<strong>Intestino Delgado (3–5 horas):</strong> absorción masiva de nutrientes. Las vellosidades intestinales multiplican la superficie de contacto hasta el equivalente de una pista de tenis. Aquí se absorbe el 90% de los nutrientes.',
|
|
159
|
+
'<strong>Intestino Grueso (10–60 horas):</strong> reabsorción de agua y electrolitos, fermentación por la microbiota y formación de heces. El tiempo en esta etapa varía enormemente según la fibra consumida y la microbiota de cada persona.',
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
{ type: 'title', text: 'El Eje Intestino-Cerebro', level: 2 },
|
|
163
|
+
{
|
|
164
|
+
type: 'paragraph',
|
|
165
|
+
html: 'El intestino posee su propio sistema nervioso autónomo, el <strong>sistema nervioso entérico</strong>, compuesto por más de 500 millones de neuronas. Produce el 95% de la serotonina del cuerpo, conectando directamente cómo digerimos con cómo nos sentimos. Cenar tarde interfiere con el ritmo circadiano de los órganos digestivos, elevando la temperatura corporal y comprometiendo la calidad del sueño profundo.',
|
|
166
|
+
},
|
|
167
|
+
{ type: 'title', text: 'Cómo Interpretar los Resultados', level: 2 },
|
|
168
|
+
{
|
|
169
|
+
type: 'paragraph',
|
|
170
|
+
html: 'Los tiempos mostrados son <strong>estimaciones basadas en promedios fisiológicos</strong>. El tránsito real varía según la edad, el nivel de hidratación, la actividad física y la composición individual de la microbiota. Una barra al 100% indica que teóricamente el contenido alimenticio ya ha abandonado esa etapa; una barra en progreso indica la fase activa de digestión.',
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication, FAQPage, HowToThing } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { DigestionStopwatchUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'chronometre-digestion';
|
|
6
|
+
const title = 'Chronomètre de Digestion: Suivi du Transit Intestinal';
|
|
7
|
+
const description =
|
|
8
|
+
'Calculez combien de temps met votre nourriture à se digérer. Suivez la progression dans l\'estomac, l\'intestin grêle et le gros intestin selon les macronutriments.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'Combien de temps prend réellement la digestion d\'un repas complet?',
|
|
13
|
+
answer:
|
|
14
|
+
'Le transit total dure généralement entre 24 et 72 heures. Cependant, la vidange gastrique (estomac) se produit dans les 2 à 5 premières heures, suivie de 2 à 6 heures dans l\'intestin grêle.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'Quels aliments se digèrent le plus rapidement?',
|
|
18
|
+
answer:
|
|
19
|
+
'Les glucides simples (fruits, sucres) et les liquides sont les plus rapides. Les protéines prennent plus de temps, et les graisses restent le plus longtemps dans l\'estomac, ralentissant tout le processus.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'Pourquoi le temps de transit est-il important?',
|
|
23
|
+
answer:
|
|
24
|
+
'Un transit trop rapide (diarrhée) empêche l\'absorption correcte des nutriments. Un transit trop lent (constipation) peut entraîner la réabsorption de toxines et une gêne générale.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'Comment l\'exercice affecte-t-il la digestion?',
|
|
28
|
+
answer:
|
|
29
|
+
'L\'exercice léger (marche) aide à la motilité intestinale. Cependant, un exercice intense juste après manger peut ralentir la digestion en détournant le flux sanguin des organes digestifs vers les muscles.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Sélectionner la composition',
|
|
36
|
+
text: 'Indiquez si votre repas était léger, normal ou lourd, et le type de macronutriments prédominants (graisses, protéines ou glucides).',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Régler l\'heure',
|
|
40
|
+
text: 'Entrez l\'heure exacte à laquelle vous avez mangé et si c\'était aujourd\'hui ou hier pour un calcul précis.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Suivre les étapes',
|
|
44
|
+
text: 'Observez la barre de progression indiquant dans quelle phase du tractus digestif se trouve théoriquement le bol alimentaire.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Mises à jour en temps réel',
|
|
48
|
+
text: 'Le chronomètre se met à jour automatiquement chaque minute pour refléter l\'avancement du transit gastro-intestinal.',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
53
|
+
'@context': 'https://schema.org',
|
|
54
|
+
'@type': 'FAQPage',
|
|
55
|
+
mainEntity: faqData.map((item) => ({
|
|
56
|
+
'@type': 'Question',
|
|
57
|
+
name: item.question,
|
|
58
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
63
|
+
'@context': 'https://schema.org',
|
|
64
|
+
'@type': 'HowTo',
|
|
65
|
+
name: title,
|
|
66
|
+
description,
|
|
67
|
+
step: howToData.map((step, i) => ({
|
|
68
|
+
'@type': 'HowToStep',
|
|
69
|
+
position: i + 1,
|
|
70
|
+
name: step.name,
|
|
71
|
+
text: step.text,
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
76
|
+
'@context': 'https://schema.org',
|
|
77
|
+
'@type': 'SoftwareApplication',
|
|
78
|
+
name: title,
|
|
79
|
+
description,
|
|
80
|
+
applicationCategory: 'HealthApplication',
|
|
81
|
+
operatingSystem: 'Web',
|
|
82
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const content: ToolLocaleContent<DigestionStopwatchUI> = {
|
|
86
|
+
slug,
|
|
87
|
+
title,
|
|
88
|
+
description,
|
|
89
|
+
faqTitle: 'Questions fréquentes sur la digestion',
|
|
90
|
+
faq: faqData,
|
|
91
|
+
bibliographyTitle: 'Références scientifiques',
|
|
92
|
+
bibliography: [
|
|
93
|
+
{
|
|
94
|
+
name: 'Motilité du tractus intestinal - Université de Cantabrie (OCW)',
|
|
95
|
+
url: 'https://ocw.unican.es/mod/page/view.php?id=534',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "Techniques d'étude de l'activité motrice digestive - ASENEM",
|
|
99
|
+
url: 'https://www.asenem.org/resources/publications/view/tecnicas-para-el-estudio-de-la-actividad-motora-digestiva-protocolos-metodologicos/',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'Temps de transit intestinal - MedlinePlus / NIH',
|
|
103
|
+
url: 'https://medlineplus.gov/spanish/ency/article/003887.htm',
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
howTo: howToData,
|
|
107
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
108
|
+
ui: {
|
|
109
|
+
labelIngestionDay: 'Jour de l\'Ingestion',
|
|
110
|
+
labelIngestionHour: 'Heure Exacte',
|
|
111
|
+
dayToday: 'Aujourd\'hui',
|
|
112
|
+
dayYesterday: 'Hier',
|
|
113
|
+
labelNutritionalComposition: 'Composition Nutritionnelle',
|
|
114
|
+
macroLiquidLabel: 'Liquides',
|
|
115
|
+
macroCarbsLabel: 'Glucides',
|
|
116
|
+
macroProteinLabel: 'Protéines',
|
|
117
|
+
macroFatLabel: 'Graisses',
|
|
118
|
+
statusTitle: 'État du Transit',
|
|
119
|
+
stageStomach: 'Estomac',
|
|
120
|
+
stageSmallIntestine: 'Intestin Grêle',
|
|
121
|
+
stageLargeIntestine: 'Gros Intestin',
|
|
122
|
+
descWaiting: 'En attente d\'arrivée...',
|
|
123
|
+
descProcessed: 'Traité.',
|
|
124
|
+
descStomach: 'Dégradation acide en cours.',
|
|
125
|
+
descSmallIntestine: 'Absorption des nutriments active.',
|
|
126
|
+
descLargeIntestine: 'Fermentation et réabsorption d\'eau.',
|
|
127
|
+
},
|
|
128
|
+
seo: [
|
|
129
|
+
{
|
|
130
|
+
type: 'summary',
|
|
131
|
+
title: 'Chronomètre de Digestion',
|
|
132
|
+
items: [
|
|
133
|
+
'<strong>Suivi en temps réel</strong>: mise à jour automatique chaque minute selon l\'heure du repas.',
|
|
134
|
+
'<strong>3 étapes physiologiques</strong>: estomac (pH 1,5–3,5), intestin grêle (pH 6,0–7,4) et gros intestin (pH 5,5–7,0).',
|
|
135
|
+
'<strong>Personnalisable par macronutriments</strong>: les liquides accélèrent le transit (×0,5), les graisses le ralentissent (×1,5).',
|
|
136
|
+
'<strong>Sélection du jour</strong>: fonctionne pour les repas pris aujourd\'hui ou hier.',
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
{ type: 'title', text: 'La Physiologie de la Digestion Humaine', level: 2 },
|
|
140
|
+
{
|
|
141
|
+
type: 'paragraph',
|
|
142
|
+
html: 'Le système digestif humain est l\'un des mécanismes biologiques les plus sophistiqués qui existent. Dès que nous ingérons des aliments, une cascade de processus chimiques, mécaniques et neurologiques se met en marche pour extraire les nutriments nécessaires au maintien de la vie. Comprendre combien de temps dure chaque étape permet de prendre de meilleures décisions en matière de nutrition, d\'exercice et de repos.',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: 'paragraph',
|
|
146
|
+
html: 'L\'<strong>estomac</strong> agit comme un réacteur chimique à haute acidité (pH entre 1,5 et 3,5). L\'acide chlorhydrique dénature les protéines et active des enzymes comme la pepsine. Les graisses y séjournent le plus longtemps, car le corps doit les émulsifier avant de les laisser passer dans l\'intestin grêle. Un repas riche en graisses peut retenir le chyme dans l\'estomac jusqu\'à 4 heures.',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'tip',
|
|
150
|
+
title: 'Facteurs qui Accélèrent la Digestion',
|
|
151
|
+
html: 'Les <strong>liquides</strong> passent presque directement à l\'intestin (30–120 min). Les <strong>glucides simples</strong> se vident en 1–2 heures. Marcher 15–20 minutes après un repas peut réduire le temps de vidange gastrique jusqu\'à 15%. Le stress, au contraire, peut stopper le transit en détournant le flux sanguin des organes digestifs.',
|
|
152
|
+
},
|
|
153
|
+
{ type: 'title', text: 'Les Trois Étapes du Transit Digestif', level: 2 },
|
|
154
|
+
{
|
|
155
|
+
type: 'list',
|
|
156
|
+
items: [
|
|
157
|
+
'<strong>Estomac (2–5 heures):</strong> dégradation acide avec la pepsine et la lipase gastrique. Le pH extrêmement acide élimine les bactéries et décompose les structures protéiques.',
|
|
158
|
+
"<strong>Intestin Grêle (3–5 heures):</strong> absorption massive des nutriments. Les villosités intestinales multiplient la surface de contact jusqu'à l'équivalent d'un court de tennis. Environ 90% des nutriments sont absorbés ici.",
|
|
159
|
+
"<strong>Gros Intestin (10–60 heures):</strong> réabsorption de l'eau et des électrolytes, fermentation par le microbiote et formation des selles. Le temps dans cette étape varie énormément selon les fibres consommées et le microbiome de chaque personne.",
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
{ type: 'title', text: "L'Axe Intestin-Cerveau", level: 2 },
|
|
163
|
+
{
|
|
164
|
+
type: 'paragraph',
|
|
165
|
+
html: "L'intestin possède son propre système nerveux autonome, le <strong>système nerveux entérique</strong>, composé de plus de 500 millions de neurones. Il produit 95% de la sérotonine du corps, connectant directement comment nous digérons avec comment nous nous sentons. Dîner tard interfère avec le rythme circadien des organes digestifs, élevant la température corporelle et compromettant la qualité du sommeil profond.",
|
|
166
|
+
},
|
|
167
|
+
{ type: 'title', text: 'Comment Interpréter les Résultats', level: 2 },
|
|
168
|
+
{
|
|
169
|
+
type: 'paragraph',
|
|
170
|
+
html: 'Les temps affichés sont des <strong>estimations basées sur des moyennes physiologiques</strong>. Le transit réel varie selon l\'âge, le niveau d\'hydratation, l\'activité physique et la composition individuelle du microbiome. Une barre à 100% indique que le contenu alimentaire a théoriquement quitté cette étape; une barre en progression indique la phase de digestion active.',
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { HealthToolEntry, ToolDefinition } from '../../types';
|
|
2
|
+
import DigestionStopwatchComponent from './component.astro';
|
|
3
|
+
import DigestionStopwatchSEO from './seo.astro';
|
|
4
|
+
import DigestionStopwatchBibliography from './bibliography.astro';
|
|
5
|
+
import type { DigestionStopwatchUI } from './ui';
|
|
6
|
+
|
|
7
|
+
export const digestionStopwatch: HealthToolEntry<DigestionStopwatchUI> = {
|
|
8
|
+
id: 'digestionStopwatch',
|
|
9
|
+
icons: {
|
|
10
|
+
bg: 'mdi:stomach',
|
|
11
|
+
fg: 'mdi:timer-outline',
|
|
12
|
+
},
|
|
13
|
+
i18n: {
|
|
14
|
+
es: () => import('./i18n/es').then((m) => m.content),
|
|
15
|
+
en: () => import('./i18n/en').then((m) => m.content),
|
|
16
|
+
fr: () => import('./i18n/fr').then((m) => m.content),
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { DigestionStopwatchComponent, DigestionStopwatchSEO, DigestionStopwatchBibliography };
|
|
21
|
+
|
|
22
|
+
export const DIGESTION_STOPWATCH_TOOL: ToolDefinition = {
|
|
23
|
+
entry: digestionStopwatch,
|
|
24
|
+
Component: DigestionStopwatchComponent,
|
|
25
|
+
SEOComponent: DigestionStopwatchSEO,
|
|
26
|
+
BibliographyComponent: DigestionStopwatchBibliography,
|
|
27
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export type MacronutrientType = 'carbs' | 'protein' | 'fat' | 'liquid' | 'fiber';
|
|
2
|
+
|
|
3
|
+
export interface DigestionStageResult {
|
|
4
|
+
id: string;
|
|
5
|
+
percentage: number;
|
|
6
|
+
description: string;
|
|
7
|
+
ph: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface StageDescriptions {
|
|
11
|
+
waiting: string;
|
|
12
|
+
processed: string;
|
|
13
|
+
stomach: string;
|
|
14
|
+
smallIntestine: string;
|
|
15
|
+
largeIntestine: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const BASE_STAGES = [
|
|
19
|
+
{ id: 'stomach', baseDuration: 180, ph: '1.5 – 3.5' },
|
|
20
|
+
{ id: 'small_intestine', baseDuration: 240, ph: '6.0 – 7.4' },
|
|
21
|
+
{ id: 'large_intestine', baseDuration: 1440, ph: '5.5 – 7.0' },
|
|
22
|
+
] as const;
|
|
23
|
+
|
|
24
|
+
export function getMultiplier(macros: MacronutrientType[]): number {
|
|
25
|
+
if (macros.includes('liquid')) return 0.5;
|
|
26
|
+
let m = 1.0;
|
|
27
|
+
if (macros.includes('fat')) m += 0.5;
|
|
28
|
+
if (macros.includes('protein')) m += 0.3;
|
|
29
|
+
if (macros.includes('fiber')) m += 0.2;
|
|
30
|
+
if (macros.includes('carbs')) m -= 0.1;
|
|
31
|
+
return Math.max(0.5, m);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function descForStage(id: string, pct: number, desc: StageDescriptions): string {
|
|
35
|
+
if (pct === 0) return desc.waiting;
|
|
36
|
+
if (pct >= 100) return desc.processed;
|
|
37
|
+
if (id === 'stomach') return desc.stomach;
|
|
38
|
+
if (id === 'small_intestine') return desc.smallIntestine;
|
|
39
|
+
return desc.largeIntestine;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function calculateStages(
|
|
43
|
+
startTime: Date,
|
|
44
|
+
macros: MacronutrientType[],
|
|
45
|
+
descriptions: StageDescriptions,
|
|
46
|
+
): DigestionStageResult[] {
|
|
47
|
+
const multiplier = getMultiplier(macros);
|
|
48
|
+
const elapsed = (Date.now() - startTime.getTime()) / 60000;
|
|
49
|
+
let cumulative = 0;
|
|
50
|
+
|
|
51
|
+
return BASE_STAGES.map((stage) => {
|
|
52
|
+
const duration = stage.baseDuration * multiplier;
|
|
53
|
+
const stageElapsed = Math.max(0, Math.min(duration, elapsed - cumulative));
|
|
54
|
+
const percentage = (stageElapsed / duration) * 100;
|
|
55
|
+
cumulative += duration;
|
|
56
|
+
return {
|
|
57
|
+
id: stage.id,
|
|
58
|
+
percentage,
|
|
59
|
+
description: descForStage(stage.id, percentage, descriptions),
|
|
60
|
+
ph: stage.ph,
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { digestionStopwatch } 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 digestionStopwatch.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SEORenderer content={{ locale, sections: content.seo }} />}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface DigestionStopwatchUI extends Record<string, string> {
|
|
2
|
+
labelIngestionDay: string;
|
|
3
|
+
labelIngestionHour: string;
|
|
4
|
+
dayToday: string;
|
|
5
|
+
dayYesterday: string;
|
|
6
|
+
labelNutritionalComposition: string;
|
|
7
|
+
macroLiquidLabel: string;
|
|
8
|
+
macroCarbsLabel: string;
|
|
9
|
+
macroProteinLabel: string;
|
|
10
|
+
macroFatLabel: string;
|
|
11
|
+
statusTitle: string;
|
|
12
|
+
stageStomach: string;
|
|
13
|
+
stageSmallIntestine: string;
|
|
14
|
+
stageLargeIntestine: string;
|
|
15
|
+
descWaiting: string;
|
|
16
|
+
descProcessed: string;
|
|
17
|
+
descStomach: string;
|
|
18
|
+
descSmallIntestine: string;
|
|
19
|
+
descLargeIntestine: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { epworthSleepinessScale } 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 epworthSleepinessScale.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <Bibliography items={content.bibliography} title={content.bibliographyTitle} />}
|