@jjlmoya/utils-health 1.33.0 → 1.35.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 (55) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +3 -1
  3. package/src/entries.ts +5 -1
  4. package/src/index.ts +2 -0
  5. package/src/tests/locale_completeness.test.ts +1 -1
  6. package/src/tests/tool_validation.test.ts +2 -2
  7. package/src/tool/anionGapCalculator/anion-gap-calculator.css +472 -0
  8. package/src/tool/anionGapCalculator/bibliography.astro +14 -0
  9. package/src/tool/anionGapCalculator/bibliography.ts +28 -0
  10. package/src/tool/anionGapCalculator/component.astro +299 -0
  11. package/src/tool/anionGapCalculator/entry.ts +27 -0
  12. package/src/tool/anionGapCalculator/i18n/de.ts +294 -0
  13. package/src/tool/anionGapCalculator/i18n/en.ts +294 -0
  14. package/src/tool/anionGapCalculator/i18n/es.ts +294 -0
  15. package/src/tool/anionGapCalculator/i18n/fr.ts +294 -0
  16. package/src/tool/anionGapCalculator/i18n/id.ts +294 -0
  17. package/src/tool/anionGapCalculator/i18n/it.ts +294 -0
  18. package/src/tool/anionGapCalculator/i18n/ja.ts +294 -0
  19. package/src/tool/anionGapCalculator/i18n/ko.ts +294 -0
  20. package/src/tool/anionGapCalculator/i18n/nl.ts +294 -0
  21. package/src/tool/anionGapCalculator/i18n/pl.ts +294 -0
  22. package/src/tool/anionGapCalculator/i18n/pt.ts +294 -0
  23. package/src/tool/anionGapCalculator/i18n/ru.ts +294 -0
  24. package/src/tool/anionGapCalculator/i18n/sv.ts +294 -0
  25. package/src/tool/anionGapCalculator/i18n/tr.ts +294 -0
  26. package/src/tool/anionGapCalculator/i18n/zh.ts +294 -0
  27. package/src/tool/anionGapCalculator/index.ts +12 -0
  28. package/src/tool/anionGapCalculator/logic.ts +67 -0
  29. package/src/tool/anionGapCalculator/seo.astro +15 -0
  30. package/src/tool/anionGapCalculator/ui.ts +45 -0
  31. package/src/tool/estimatedBloodVolumeCalculator/bibliography.astro +14 -0
  32. package/src/tool/estimatedBloodVolumeCalculator/bibliography.ts +20 -0
  33. package/src/tool/estimatedBloodVolumeCalculator/component.astro +350 -0
  34. package/src/tool/estimatedBloodVolumeCalculator/entry.ts +27 -0
  35. package/src/tool/estimatedBloodVolumeCalculator/estimated-blood-volume-calculator.css +438 -0
  36. package/src/tool/estimatedBloodVolumeCalculator/i18n/de.ts +352 -0
  37. package/src/tool/estimatedBloodVolumeCalculator/i18n/en.ts +352 -0
  38. package/src/tool/estimatedBloodVolumeCalculator/i18n/es.ts +352 -0
  39. package/src/tool/estimatedBloodVolumeCalculator/i18n/fr.ts +352 -0
  40. package/src/tool/estimatedBloodVolumeCalculator/i18n/id.ts +352 -0
  41. package/src/tool/estimatedBloodVolumeCalculator/i18n/it.ts +352 -0
  42. package/src/tool/estimatedBloodVolumeCalculator/i18n/ja.ts +352 -0
  43. package/src/tool/estimatedBloodVolumeCalculator/i18n/ko.ts +352 -0
  44. package/src/tool/estimatedBloodVolumeCalculator/i18n/nl.ts +352 -0
  45. package/src/tool/estimatedBloodVolumeCalculator/i18n/pl.ts +352 -0
  46. package/src/tool/estimatedBloodVolumeCalculator/i18n/pt.ts +352 -0
  47. package/src/tool/estimatedBloodVolumeCalculator/i18n/ru.ts +352 -0
  48. package/src/tool/estimatedBloodVolumeCalculator/i18n/sv.ts +352 -0
  49. package/src/tool/estimatedBloodVolumeCalculator/i18n/tr.ts +352 -0
  50. package/src/tool/estimatedBloodVolumeCalculator/i18n/zh.ts +352 -0
  51. package/src/tool/estimatedBloodVolumeCalculator/index.ts +12 -0
  52. package/src/tool/estimatedBloodVolumeCalculator/logic.ts +67 -0
  53. package/src/tool/estimatedBloodVolumeCalculator/seo.astro +15 -0
  54. package/src/tool/estimatedBloodVolumeCalculator/ui.ts +45 -0
  55. package/src/tools.ts +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-health",
3
- "version": "1.33.0",
3
+ "version": "1.35.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -29,10 +29,12 @@ import { correctedSodiumHyperglycemiaCalculator } from '../tool/correctedSodiumH
29
29
  import { fractionalExcretionSodiumCalculator } from '../tool/fractionalExcretionSodiumCalculator/entry';
30
30
  import { targetHeightEstimator } from '../tool/targetHeightEstimator/entry';
31
31
  import { correctedReticulocyteIndex } from '../tool/correctedReticulocyteIndex/entry';
32
+ import { estimatedBloodVolumeCalculator } from '../tool/estimatedBloodVolumeCalculator/entry';
33
+ import { anionGapCalculator } from '../tool/anionGapCalculator/entry';
32
34
 
33
35
  export const healthCategory: HealthCategoryEntry = {
34
36
  icon: 'mdi:heart-pulse',
35
- tools: [bmiCalculator, amputationAdjustedBmiCalculator, bodyAdiposityIndexCalculator, bodyFatPercentageCalculator, waistHipRatioCalculator, waistHeightRatioCalculator, leanBodyMassCalculator, metabolicAgeCalculator, caloricDeficitCalculator, dailyProteinCalculator, macronutrientCalculator, tdeeCalculator, bunCreatinineCalculator, serumOsmolalityCalculator, meanArterialPressureCalculator, correctedSodiumHyperglycemiaCalculator, fractionalExcretionSodiumCalculator, correctedReticulocyteIndex, targetHeightEstimator, daltonismSimulator, tinnitusReliever, parametricNoiseSynthesizer, breathingVisualizer, caffeineTracker, waterPurifier, digestionStopwatch, binauralTuner, pelliRobsonTest, peripheralVisionTrainer, epworthSleepinessScale],
37
+ tools: [bmiCalculator, amputationAdjustedBmiCalculator, bodyAdiposityIndexCalculator, bodyFatPercentageCalculator, waistHipRatioCalculator, waistHeightRatioCalculator, leanBodyMassCalculator, metabolicAgeCalculator, caloricDeficitCalculator, dailyProteinCalculator, macronutrientCalculator, tdeeCalculator, bunCreatinineCalculator, serumOsmolalityCalculator, meanArterialPressureCalculator, correctedSodiumHyperglycemiaCalculator, fractionalExcretionSodiumCalculator, correctedReticulocyteIndex, estimatedBloodVolumeCalculator, anionGapCalculator, targetHeightEstimator, daltonismSimulator, tinnitusReliever, parametricNoiseSynthesizer, breathingVisualizer, caffeineTracker, waterPurifier, digestionStopwatch, binauralTuner, pelliRobsonTest, peripheralVisionTrainer, epworthSleepinessScale],
36
38
  i18n: {
37
39
  en: () => import('./i18n/en').then((m) => m.content),
38
40
  es: () => import('./i18n/es').then((m) => m.content),
package/src/entries.ts CHANGED
@@ -25,6 +25,8 @@ export { correctedSodiumHyperglycemiaCalculator } from './tool/correctedSodiumHy
25
25
  export { fractionalExcretionSodiumCalculator } from './tool/fractionalExcretionSodiumCalculator/entry';
26
26
  export { targetHeightEstimator } from './tool/targetHeightEstimator/entry';
27
27
  export { correctedReticulocyteIndex } from './tool/correctedReticulocyteIndex/entry';
28
+ export { estimatedBloodVolumeCalculator } from './tool/estimatedBloodVolumeCalculator/entry';
29
+ export { anionGapCalculator } from './tool/anionGapCalculator/entry';
28
30
  export { pelliRobsonTest } from './tool/pelliRobsonTest/entry';
29
31
  export { peripheralVisionTrainer } from './tool/peripheralVisionTrainer/entry';
30
32
  export { readingDistanceCalculator } from './tool/readingDistanceCalculator/entry';
@@ -61,6 +63,8 @@ import { correctedSodiumHyperglycemiaCalculator } from './tool/correctedSodiumHy
61
63
  import { fractionalExcretionSodiumCalculator } from './tool/fractionalExcretionSodiumCalculator/entry';
62
64
  import { targetHeightEstimator } from './tool/targetHeightEstimator/entry';
63
65
  import { correctedReticulocyteIndex } from './tool/correctedReticulocyteIndex/entry';
66
+ import { estimatedBloodVolumeCalculator } from './tool/estimatedBloodVolumeCalculator/entry';
67
+ import { anionGapCalculator } from './tool/anionGapCalculator/entry';
64
68
  import { pelliRobsonTest } from './tool/pelliRobsonTest/entry';
65
69
  import { peripheralVisionTrainer } from './tool/peripheralVisionTrainer/entry';
66
70
  import { readingDistanceCalculator } from './tool/readingDistanceCalculator/entry';
@@ -69,4 +73,4 @@ import { tinnitusReliever } from './tool/tinnitusReliever/entry';
69
73
  import { parametricNoiseSynthesizer } from './tool/parametricNoiseSynthesizer/entry';
70
74
  import { ubeCalculator } from './tool/ubeCalculator/entry';
71
75
  import { waterPurifier } from './tool/waterPurifier/entry';
72
- export const ALL_ENTRIES = [binauralTuner, bloodUnitConverter, bmiCalculator, amputationAdjustedBmiCalculator, bodyAdiposityIndexCalculator, bodyFatPercentageCalculator, waistHipRatioCalculator, waistHeightRatioCalculator, breathingVisualizer, caffeineTracker, caloricDeficitCalculator, dailyProteinCalculator, macronutrientCalculator, tdeeCalculator, bunCreatinineCalculator, serumOsmolalityCalculator, meanArterialPressureCalculator, correctedSodiumHyperglycemiaCalculator, fractionalExcretionSodiumCalculator, correctedReticulocyteIndex, targetHeightEstimator, daltonismSimulator, digestionStopwatch, epworthSleepinessScale, hydrationCalculator, leanBodyMassCalculator, metabolicAgeCalculator, pelliRobsonTest, peripheralVisionTrainer, readingDistanceCalculator, screenDecompressionTime, tinnitusReliever, parametricNoiseSynthesizer, ubeCalculator, waterPurifier];
76
+ export const ALL_ENTRIES = [binauralTuner, bloodUnitConverter, bmiCalculator, amputationAdjustedBmiCalculator, bodyAdiposityIndexCalculator, bodyFatPercentageCalculator, waistHipRatioCalculator, waistHeightRatioCalculator, breathingVisualizer, caffeineTracker, caloricDeficitCalculator, dailyProteinCalculator, macronutrientCalculator, tdeeCalculator, bunCreatinineCalculator, serumOsmolalityCalculator, meanArterialPressureCalculator, correctedSodiumHyperglycemiaCalculator, fractionalExcretionSodiumCalculator, correctedReticulocyteIndex, estimatedBloodVolumeCalculator, anionGapCalculator, targetHeightEstimator, daltonismSimulator, digestionStopwatch, epworthSleepinessScale, hydrationCalculator, leanBodyMassCalculator, metabolicAgeCalculator, pelliRobsonTest, peripheralVisionTrainer, readingDistanceCalculator, screenDecompressionTime, tinnitusReliever, parametricNoiseSynthesizer, ubeCalculator, waterPurifier];
package/src/index.ts CHANGED
@@ -33,6 +33,8 @@ export * from './tool/correctedSodiumHyperglycemiaCalculator';
33
33
  export * from './tool/fractionalExcretionSodiumCalculator';
34
34
  export * from './tool/targetHeightEstimator';
35
35
  export * from './tool/correctedReticulocyteIndex';
36
+ export * from './tool/estimatedBloodVolumeCalculator';
37
+ export * from './tool/anionGapCalculator';
36
38
 
37
39
  export { healthCategory } from './category';
38
40
  export const healthCategorySEO = () => import('./category/seo.astro').then((m) => m.default);
@@ -36,6 +36,6 @@ describe('Locale Completeness Validation', () => {
36
36
  });
37
37
 
38
38
  it('all tools registered', () => {
39
- expect(ALL_TOOLS.length).toBe(35);
39
+ expect(ALL_TOOLS.length).toBe(37);
40
40
  });
41
41
  });
@@ -4,8 +4,8 @@ import { healthCategory } from '../data';
4
4
 
5
5
  describe('Tool Validation Suite', () => {
6
6
  describe('Library Registration', () => {
7
- it('should have 33 tools in ALL_TOOLS', () => {
8
- expect(ALL_TOOLS.length).toBe(35);
7
+ it('should have 37 tools in ALL_TOOLS', () => {
8
+ expect(ALL_TOOLS.length).toBe(37);
9
9
  });
10
10
 
11
11
  it('healthCategory should be defined', () => {
@@ -0,0 +1,472 @@
1
+ .agap {
2
+ --agap-ink: #172033;
3
+ --agap-muted: #667085;
4
+ --agap-line: #dbe4ef;
5
+ --agap-panel: #fff;
6
+ --agap-soft: #f6f8fb;
7
+ --agap-na: #2563eb;
8
+ --agap-k: #8b5cf6;
9
+ --agap-cl: #059669;
10
+ --agap-hco3: #0891b2;
11
+ --agap-gap: #f59e0b;
12
+ --agap-danger: #d92d20;
13
+ --agap-ok: #079455;
14
+
15
+ background: linear-gradient(135deg, #f8fbff, #fff8ed);
16
+ border: 1px solid var(--agap-line);
17
+ border-radius: 8px;
18
+ color: var(--agap-ink);
19
+ display: grid;
20
+ gap: 8px;
21
+ padding: 8px;
22
+ width: 100%;
23
+ }
24
+
25
+ .theme-dark .agap {
26
+ --agap-ink: #eef4ff;
27
+ --agap-muted: #a7b2c5;
28
+ --agap-line: #334155;
29
+ --agap-panel: #101827;
30
+ --agap-soft: #172235;
31
+ --agap-na: #78a9ff;
32
+ --agap-k: #b69aff;
33
+ --agap-cl: #4bd49d;
34
+ --agap-hco3: #4ecfe5;
35
+ --agap-gap: #ffc15a;
36
+ --agap-danger: #ff6b5f;
37
+ --agap-ok: #4bd49d;
38
+
39
+ background: linear-gradient(135deg, #101827, #151f2e);
40
+ }
41
+
42
+ .agap__warning {
43
+ background: linear-gradient(90deg, rgba(217, 45, 32, 0.12), rgba(245, 158, 11, 0.1)), var(--agap-panel);
44
+ border: 2px solid var(--agap-danger);
45
+ border-radius: 8px;
46
+ display: grid;
47
+ gap: 3px;
48
+ padding: 8px 10px;
49
+ }
50
+
51
+ .agap__warning strong {
52
+ color: var(--agap-danger);
53
+ font-size: 0.82rem;
54
+ font-weight: 950;
55
+ letter-spacing: 0.02em;
56
+ line-height: 1.15;
57
+ text-transform: uppercase;
58
+ }
59
+
60
+ .agap__warning span {
61
+ color: var(--agap-ink);
62
+ font-size: 0.78rem;
63
+ font-weight: 750;
64
+ line-height: 1.3;
65
+ }
66
+
67
+ .agap__shell {
68
+ align-items: start;
69
+ display: grid;
70
+ gap: 10px;
71
+ }
72
+
73
+ .agap__hero,
74
+ .agap__workbench {
75
+ background: color-mix(in srgb, var(--agap-panel) 92%, transparent);
76
+ border: 1px solid var(--agap-line);
77
+ border-radius: 8px;
78
+ }
79
+
80
+ .agap__hero {
81
+ display: grid;
82
+ gap: 8px;
83
+ grid-template-columns: 1fr 1fr;
84
+ padding: 10px;
85
+ }
86
+
87
+ .agap__score {
88
+ background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(8, 145, 178, 0.08)), var(--agap-soft);
89
+ border: 1px solid color-mix(in srgb, var(--agap-na) 26%, var(--agap-line));
90
+ border-radius: 8px;
91
+ min-width: 0;
92
+ padding: 10px 12px;
93
+ }
94
+
95
+ .agap__score--corrected {
96
+ background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(139, 92, 246, 0.08)), var(--agap-soft);
97
+ border-color: color-mix(in srgb, var(--agap-gap) 34%, var(--agap-line));
98
+ }
99
+
100
+ .agap__score span,
101
+ .agap__score small {
102
+ color: var(--agap-muted);
103
+ display: block;
104
+ font-size: 0.76rem;
105
+ font-weight: 900;
106
+ line-height: 1.2;
107
+ text-transform: uppercase;
108
+ }
109
+
110
+ .agap__score strong {
111
+ color: var(--agap-na);
112
+ display: block;
113
+ font-size: clamp(3rem, 9vw, 5.5rem);
114
+ font-weight: 950;
115
+ letter-spacing: 0;
116
+ line-height: 0.9;
117
+ margin: 8px 0 6px;
118
+ }
119
+
120
+ .agap__score--corrected strong {
121
+ color: var(--agap-gap);
122
+ }
123
+
124
+ .agap__range {
125
+ background: var(--agap-soft);
126
+ border: 1px solid var(--agap-line);
127
+ border-radius: 8px;
128
+ display: grid;
129
+ gap: 7px;
130
+ grid-column: 1 / -1;
131
+ padding: 9px 10px;
132
+ }
133
+
134
+ .agap__range > span,
135
+ .agap__range-labels {
136
+ color: var(--agap-muted);
137
+ font-size: 0.74rem;
138
+ font-weight: 900;
139
+ }
140
+
141
+ .agap__track {
142
+ background: linear-gradient(90deg, var(--agap-na) 0 28%, var(--agap-ok) 28% 54%, var(--agap-danger) 54% 100%);
143
+ border-radius: 999px;
144
+ height: 14px;
145
+ position: relative;
146
+ }
147
+
148
+ .agap__track i {
149
+ background: rgba(255, 255, 255, 0.72);
150
+ border-radius: inherit;
151
+ bottom: 3px;
152
+ left: 28%;
153
+ position: absolute;
154
+ top: 3px;
155
+ width: 26%;
156
+ }
157
+
158
+ .agap__track b {
159
+ background: var(--agap-ink);
160
+ border: 2px solid var(--agap-panel);
161
+ border-radius: 999px;
162
+ height: 24px;
163
+ position: absolute;
164
+ top: 50%;
165
+ transform: translate(-50%, -50%);
166
+ transition: left 0.2s ease;
167
+ width: 12px;
168
+ }
169
+
170
+ .agap__range-labels {
171
+ display: flex;
172
+ justify-content: space-between;
173
+ }
174
+
175
+ .agap__workbench {
176
+ display: grid;
177
+ gap: 9px;
178
+ padding: 9px;
179
+ }
180
+
181
+ .agap__inputs {
182
+ display: grid;
183
+ gap: 7px;
184
+ grid-template-columns: 1fr 1fr;
185
+ }
186
+
187
+ .agap__field {
188
+ background: var(--agap-panel);
189
+ border: 1px solid var(--agap-line);
190
+ border-radius: 8px;
191
+ display: grid;
192
+ gap: 3px;
193
+ min-width: 0;
194
+ padding: 8px 10px;
195
+ }
196
+
197
+ .agap__field:focus-within {
198
+ border-color: var(--agap-na);
199
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--agap-na) 17%, transparent);
200
+ }
201
+
202
+ .agap__field span {
203
+ color: var(--agap-muted);
204
+ font-size: 0.72rem;
205
+ font-weight: 950;
206
+ line-height: 1.1;
207
+ }
208
+
209
+ .agap__field input {
210
+ background: transparent;
211
+ border: 0;
212
+ color: var(--agap-ink);
213
+ font: inherit;
214
+ font-size: 1.16rem;
215
+ font-weight: 950;
216
+ min-width: 0;
217
+ outline: 0;
218
+ padding: 0;
219
+ }
220
+
221
+ .agap__field small {
222
+ color: var(--agap-muted);
223
+ font-size: 0.72rem;
224
+ font-weight: 900;
225
+ }
226
+
227
+ .agap__field--albumin {
228
+ grid-column: 1 / -1;
229
+ grid-template-columns: minmax(0, 1fr) auto;
230
+ }
231
+
232
+ .agap__field--albumin span,
233
+ .agap__field--albumin input {
234
+ grid-column: 1;
235
+ }
236
+
237
+ .agap__units {
238
+ align-self: center;
239
+ background: var(--agap-soft);
240
+ border: 1px solid var(--agap-line);
241
+ border-radius: 7px;
242
+ display: flex;
243
+ grid-column: 2;
244
+ grid-row: 1 / span 2;
245
+ overflow: hidden;
246
+ }
247
+
248
+ .agap__unit {
249
+ background: transparent;
250
+ border: 0;
251
+ color: var(--agap-muted);
252
+ cursor: pointer;
253
+ font: inherit;
254
+ font-size: 0.72rem;
255
+ font-weight: 950;
256
+ padding: 8px 10px;
257
+ }
258
+
259
+ .agap__unit--active {
260
+ background: var(--agap-ink);
261
+ color: var(--agap-panel);
262
+ }
263
+
264
+ .agap__switch {
265
+ align-items: center;
266
+ background: var(--agap-soft);
267
+ border: 1px solid var(--agap-line);
268
+ border-radius: 8px;
269
+ display: flex;
270
+ gap: 9px;
271
+ grid-column: 1 / -1;
272
+ min-height: 42px;
273
+ padding: 8px 10px;
274
+ }
275
+
276
+ .agap__switch input {
277
+ accent-color: var(--agap-na);
278
+ height: 18px;
279
+ width: 18px;
280
+ }
281
+
282
+ .agap__switch span {
283
+ font-size: 0.82rem;
284
+ font-weight: 900;
285
+ }
286
+
287
+ .agap__visual {
288
+ display: grid;
289
+ gap: 9px;
290
+ }
291
+
292
+ .agap__formula {
293
+ align-items: center;
294
+ background: var(--agap-soft);
295
+ border: 1px solid var(--agap-line);
296
+ border-radius: 8px;
297
+ display: grid;
298
+ gap: 8px;
299
+ grid-template-columns: auto minmax(0, 1fr);
300
+ padding: 8px 10px;
301
+ }
302
+
303
+ .agap__formula span {
304
+ color: var(--agap-muted);
305
+ font-size: 0.72rem;
306
+ font-weight: 950;
307
+ text-transform: uppercase;
308
+ }
309
+
310
+ .agap__formula code {
311
+ background: var(--agap-panel);
312
+ border: 1px solid var(--agap-line);
313
+ border-radius: 6px;
314
+ color: var(--agap-ink);
315
+ font-size: 0.86rem;
316
+ font-weight: 900;
317
+ padding: 7px 8px;
318
+ white-space: normal;
319
+ }
320
+
321
+ .agap__bars {
322
+ display: grid;
323
+ gap: 8px;
324
+ }
325
+
326
+ .agap__bar-row {
327
+ display: grid;
328
+ gap: 6px;
329
+ }
330
+
331
+ .agap__bar-head {
332
+ align-items: baseline;
333
+ display: flex;
334
+ justify-content: space-between;
335
+ }
336
+
337
+ .agap__bar-head b {
338
+ color: var(--agap-muted);
339
+ font-size: 0.74rem;
340
+ font-weight: 950;
341
+ text-transform: uppercase;
342
+ }
343
+
344
+ .agap__bar-head span {
345
+ color: var(--agap-ink);
346
+ font-size: 0.84rem;
347
+ font-weight: 950;
348
+ }
349
+
350
+ .agap__bar {
351
+ background: var(--agap-soft);
352
+ border: 1px solid var(--agap-line);
353
+ border-radius: 8px;
354
+ display: flex;
355
+ height: 44px;
356
+ overflow: hidden;
357
+ }
358
+
359
+ .agap__part {
360
+ align-items: center;
361
+ color: #fff;
362
+ display: flex;
363
+ font-size: 0.78rem;
364
+ font-weight: 950;
365
+ justify-content: center;
366
+ min-width: 0;
367
+ overflow: hidden;
368
+ padding: 0 8px;
369
+ text-overflow: ellipsis;
370
+ transition: width 0.22s ease;
371
+ white-space: nowrap;
372
+ }
373
+
374
+ .agap__part--na { background: var(--agap-na); }
375
+ .agap__part--k { background: var(--agap-k); }
376
+ .agap__part--cl { background: var(--agap-cl); }
377
+ .agap__part--hco3 { background: var(--agap-hco3); }
378
+ .agap__part--gap {
379
+ background:
380
+ repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2) 8px, transparent 8px, transparent 16px),
381
+ var(--agap-gap);
382
+ color: #2c1c00;
383
+ }
384
+
385
+ .agap__interpretation {
386
+ background: color-mix(in srgb, var(--agap-ok) 10%, var(--agap-panel));
387
+ border: 1px solid color-mix(in srgb, var(--agap-ok) 38%, var(--agap-line));
388
+ border-radius: 8px;
389
+ padding: 10px;
390
+ }
391
+
392
+ .agap__interpretation--hero {
393
+ grid-column: 1 / -1;
394
+ }
395
+
396
+ .agap__interpretation[data-state='low'] {
397
+ background: color-mix(in srgb, var(--agap-na) 10%, var(--agap-panel));
398
+ border-color: color-mix(in srgb, var(--agap-na) 38%, var(--agap-line));
399
+ }
400
+
401
+ .agap__interpretation[data-state='high'] {
402
+ background: color-mix(in srgb, var(--agap-danger) 10%, var(--agap-panel));
403
+ border-color: color-mix(in srgb, var(--agap-danger) 42%, var(--agap-line));
404
+ }
405
+
406
+ .agap__interpretation b {
407
+ display: block;
408
+ font-size: 1rem;
409
+ margin-bottom: 4px;
410
+ }
411
+
412
+ .agap__interpretation p {
413
+ color: var(--agap-muted);
414
+ font-size: 0.86rem;
415
+ font-weight: 650;
416
+ line-height: 1.35;
417
+ margin: 0;
418
+ }
419
+
420
+ @media (min-width: 780px) {
421
+ .agap {
422
+ padding: 10px;
423
+ }
424
+
425
+ .agap__shell {
426
+ grid-template-columns: minmax(290px, 0.74fr) minmax(0, 1.26fr);
427
+ }
428
+
429
+ .agap__hero {
430
+ align-content: start;
431
+ align-self: start;
432
+ }
433
+
434
+ .agap__workbench {
435
+ grid-template-columns: 310px minmax(0, 1fr);
436
+ }
437
+ }
438
+
439
+ @media (min-width: 1120px) {
440
+ .agap__inputs {
441
+ grid-template-columns: repeat(4, minmax(0, 1fr));
442
+ }
443
+
444
+ .agap__field--albumin,
445
+ .agap__switch {
446
+ grid-column: span 2;
447
+ }
448
+
449
+ .agap__workbench {
450
+ grid-template-columns: 1fr;
451
+ }
452
+ }
453
+
454
+ @media (max-width: 520px) {
455
+ .agap__hero,
456
+ .agap__inputs {
457
+ grid-template-columns: 1fr;
458
+ }
459
+
460
+ .agap__field--albumin,
461
+ .agap__switch {
462
+ grid-column: auto;
463
+ }
464
+
465
+ .agap__formula {
466
+ grid-template-columns: 1fr;
467
+ }
468
+
469
+ .agap__bar {
470
+ height: 42px;
471
+ }
472
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { Bibliography } from '@jjlmoya/utils-shared';
3
+ import { anionGapCalculator } from './index';
4
+ import type { KnownLocale } from '../../types';
5
+
6
+ interface Props {
7
+ locale?: KnownLocale;
8
+ }
9
+
10
+ const { locale = 'en' } = Astro.props;
11
+ const content = await anionGapCalculator.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <Bibliography links={content.bibliography} />}
@@ -0,0 +1,28 @@
1
+ import type { BibliographyEntry } from '../../types';
2
+
3
+ export const bibliography: BibliographyEntry[] = [
4
+ {
5
+ name: 'Emmett M, Narins RG. Clinical use of the anion gap. Medicine. 1977.',
6
+ url: 'https://pubmed.ncbi.nlm.nih.gov/896161/',
7
+ },
8
+ {
9
+ name: 'Figge J, et al. Anion gap and hypoalbuminemia. Critical Care Medicine. 1998.',
10
+ url: 'https://pubmed.ncbi.nlm.nih.gov/9824071/',
11
+ },
12
+ {
13
+ name: 'Kraut JA, Madias NE. Serum anion gap: its uses and limitations in clinical medicine. Clinical Journal of the American Society of Nephrology. 2007.',
14
+ url: 'https://pubmed.ncbi.nlm.nih.gov/17699401/',
15
+ },
16
+ {
17
+ name: 'Berend K. Diagnostic use of base excess in acid-base disorders. New England Journal of Medicine. 2018.',
18
+ url: 'https://pubmed.ncbi.nlm.nih.gov/30044931/',
19
+ },
20
+ {
21
+ name: 'Merck Manual Professional: Metabolic Acidosis',
22
+ url: 'https://www.merckmanuals.com/professional/endocrine-and-metabolic-disorders/acid-base-regulation-and-disorders/metabolic-acidosis',
23
+ },
24
+ {
25
+ name: 'Wikipedia: Anion gap',
26
+ url: 'https://en.wikipedia.org/wiki/Anion_gap',
27
+ },
28
+ ];