@jjlmoya/utils-science 1.20.0 → 1.22.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 +2 -1
- package/src/category/i18n/de.ts +1 -1
- package/src/category/i18n/fr.ts +6 -6
- package/src/category/i18n/ru.ts +1 -1
- package/src/category/index.ts +4 -1
- package/src/category/seo.astro +2 -2
- package/src/entries.ts +7 -1
- package/src/index.ts +3 -0
- package/src/pages/[locale]/[slug].astro +5 -4
- package/src/tests/locale_completeness.test.ts +2 -2
- package/src/tests/no_en_dash.test.ts +70 -0
- package/src/tests/seo_length.test.ts +5 -3
- package/src/tests/title_quality.test.ts +1 -1
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/asteroid-impact/bibliography.astro +2 -2
- package/src/tool/asteroid-impact/component.astro +16 -9
- package/src/tool/asteroid-impact/i18n/fr.ts +6 -6
- package/src/tool/asteroid-impact/i18n/ru.ts +4 -4
- package/src/tool/asteroid-impact/index.ts +1 -0
- package/src/tool/asteroid-impact/script.ts +13 -7
- package/src/tool/cellular-renewal/bibliography.astro +2 -2
- package/src/tool/cellular-renewal/i18n/fr.ts +13 -13
- package/src/tool/cellular-renewal/i18n/ru.ts +17 -17
- package/src/tool/cellular-renewal/i18n/zh.ts +9 -9
- package/src/tool/cellular-renewal/index.ts +1 -0
- package/src/tool/colony-counter/bibliography.astro +2 -2
- package/src/tool/colony-counter/i18n/ru.ts +5 -5
- package/src/tool/colony-counter/i18n/zh.ts +2 -2
- package/src/tool/colony-counter/index.ts +1 -0
- package/src/tool/cosmic-inflation/bibliography.astro +14 -0
- package/src/tool/cosmic-inflation/bibliography.ts +12 -0
- package/src/tool/cosmic-inflation/component.astro +270 -0
- package/src/tool/cosmic-inflation/cosmic-inflation-calculator.css +277 -0
- package/src/tool/cosmic-inflation/entry.ts +26 -0
- package/src/tool/cosmic-inflation/i18n/de.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/en.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/es.ts +168 -0
- package/src/tool/cosmic-inflation/i18n/fr.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/id.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/it.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/ja.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/ko.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/nl.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/pl.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/pt.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/ru.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/sv.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/tr.ts +188 -0
- package/src/tool/cosmic-inflation/i18n/zh.ts +188 -0
- package/src/tool/cosmic-inflation/index.ts +11 -0
- package/src/tool/cosmic-inflation/logic/CosmicInflationEngine.ts +21 -0
- package/src/tool/cosmic-inflation/seo.astro +15 -0
- package/src/tool/lorenz-attractor/bibliography.astro +14 -0
- package/src/tool/lorenz-attractor/bibliography.ts +12 -0
- package/src/tool/lorenz-attractor/component.astro +146 -0
- package/src/tool/lorenz-attractor/entry.ts +27 -0
- package/src/tool/lorenz-attractor/i18n/de.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/en.ts +185 -0
- package/src/tool/lorenz-attractor/i18n/es.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/fr.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/id.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/it.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/ja.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/ko.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/nl.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/pl.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/pt.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/ru.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/sv.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/tr.ts +113 -0
- package/src/tool/lorenz-attractor/i18n/zh.ts +113 -0
- package/src/tool/lorenz-attractor/index.ts +9 -0
- package/src/tool/lorenz-attractor/logic/LorenzEngine.ts +32 -0
- package/src/tool/lorenz-attractor/lorenz-attractor.css +335 -0
- package/src/tool/lorenz-attractor/renderer.ts +136 -0
- package/src/tool/lorenz-attractor/script.ts +282 -0
- package/src/tool/lorenz-attractor/seo.astro +15 -0
- package/src/tool/microwave-detector/bibliography.astro +2 -2
- package/src/tool/microwave-detector/component.astro +9 -7
- package/src/tool/microwave-detector/i18n/fr.ts +4 -4
- package/src/tool/microwave-detector/i18n/ru.ts +18 -18
- package/src/tool/microwave-detector/i18n/zh.ts +10 -10
- package/src/tool/microwave-detector/index.ts +1 -0
- package/src/tool/microwave-detector/logic/MicrowaveEngine.ts +5 -1
- package/src/tool/simulation-probability/bibliography.astro +2 -2
- package/src/tool/simulation-probability/i18n/fr.ts +5 -5
- package/src/tool/simulation-probability/i18n/ru.ts +7 -7
- package/src/tool/simulation-probability/i18n/zh.ts +4 -4
- package/src/tool/simulation-probability/index.ts +1 -0
- package/src/tool/temperature-timeline/bibliography.astro +14 -0
- package/src/tool/temperature-timeline/bibliography.ts +12 -0
- package/src/tool/temperature-timeline/component.astro +289 -0
- package/src/tool/temperature-timeline/entry.ts +26 -0
- package/src/tool/temperature-timeline/i18n/de.ts +213 -0
- package/src/tool/temperature-timeline/i18n/en.ts +213 -0
- package/src/tool/temperature-timeline/i18n/es.ts +178 -0
- package/src/tool/temperature-timeline/i18n/fr.ts +213 -0
- package/src/tool/temperature-timeline/i18n/id.ts +213 -0
- package/src/tool/temperature-timeline/i18n/it.ts +213 -0
- package/src/tool/temperature-timeline/i18n/ja.ts +213 -0
- package/src/tool/temperature-timeline/i18n/ko.ts +213 -0
- package/src/tool/temperature-timeline/i18n/nl.ts +213 -0
- package/src/tool/temperature-timeline/i18n/pl.ts +213 -0
- package/src/tool/temperature-timeline/i18n/pt.ts +213 -0
- package/src/tool/temperature-timeline/i18n/ru.ts +213 -0
- package/src/tool/temperature-timeline/i18n/sv.ts +213 -0
- package/src/tool/temperature-timeline/i18n/tr.ts +213 -0
- package/src/tool/temperature-timeline/i18n/zh.ts +213 -0
- package/src/tool/temperature-timeline/index.ts +11 -0
- package/src/tool/temperature-timeline/logic/TemperatureTimelineEngine.ts +58 -0
- package/src/tool/temperature-timeline/planet-temperature-timeline.css +158 -0
- package/src/tool/temperature-timeline/seo.astro +15 -0
- package/src/tools.ts +6 -0
- package/src/types.ts +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface GeologicEpoch {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
ageRange: string;
|
|
5
|
+
avgTemp: number;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class TemperatureTimelineEngine {
|
|
10
|
+
private epochs: GeologicEpoch[] = [
|
|
11
|
+
{
|
|
12
|
+
id: 'archean',
|
|
13
|
+
name: 'Archean Eon',
|
|
14
|
+
ageRange: '4.0 to 2.5 billion years ago',
|
|
15
|
+
avgTemp: 30,
|
|
16
|
+
description: 'Extremely hot earth with a methane and carbon dioxide rich atmosphere. Liquid oceans existed despite a faint young sun due to greenhouse effect.',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: 'proterozoic',
|
|
20
|
+
name: 'Proterozoic Eon',
|
|
21
|
+
ageRange: '2.5 billion to 541 million years ago',
|
|
22
|
+
avgTemp: 12,
|
|
23
|
+
description: 'Rise of oxygen causes the Huronian glaciation, leading to one of the first Snowball Earth periods, followed by stabilization.',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'paleozoic',
|
|
27
|
+
name: 'Paleozoic Era',
|
|
28
|
+
ageRange: '541 to 252 million years ago',
|
|
29
|
+
avgTemp: 20,
|
|
30
|
+
description: 'Explosion of life in oceans and migration to land. Ended with the Permian-Triassic extinction, the warmest phase of this era.',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'mesozoic',
|
|
34
|
+
name: 'Mesozoic Era',
|
|
35
|
+
ageRange: '252 to 66 million years ago',
|
|
36
|
+
avgTemp: 22,
|
|
37
|
+
description: 'The age of dinosaurs. Greenhouse conditions prevailed worldwide with no polar ice caps, resulting in high ocean levels and warm climates.',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 'cenozoic',
|
|
41
|
+
name: 'Cenozoic Era',
|
|
42
|
+
ageRange: '66 million years ago to Present',
|
|
43
|
+
avgTemp: 14,
|
|
44
|
+
description: 'Gradual cooling trend culminating in the Quaternary glaciations (Ice Ages) and the modern Holocene epoch.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'anthropocene',
|
|
48
|
+
name: 'Anthropocene Epoch',
|
|
49
|
+
ageRange: 'Present Day and Future',
|
|
50
|
+
avgTemp: 15.2,
|
|
51
|
+
description: 'Rapid warming driven by greenhouse gas emissions, deviating from the long term natural cooling trend of the late Cenozoic.',
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
public getEpochs(): GeologicEpoch[] {
|
|
56
|
+
return this.epochs;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--timeline-bg: #fff;
|
|
3
|
+
--timeline-border: rgba(0, 0, 0, 0.08);
|
|
4
|
+
--timeline-text: #0f172a;
|
|
5
|
+
--timeline-text-muted: #4b5563;
|
|
6
|
+
--timeline-divider: rgba(0, 0, 0, 0.1);
|
|
7
|
+
--timeline-highlight: #ea580c;
|
|
8
|
+
--timeline-ruler-text: #6b7280;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.theme-dark {
|
|
12
|
+
--timeline-bg: #030712;
|
|
13
|
+
--timeline-border: rgba(255, 255, 255, 0.05);
|
|
14
|
+
--timeline-text: #f3f4f6;
|
|
15
|
+
--timeline-text-muted: #9ca3af;
|
|
16
|
+
--timeline-divider: rgba(255, 255, 255, 0.1);
|
|
17
|
+
--timeline-highlight: #fb923c;
|
|
18
|
+
--timeline-ruler-text: #9ca3af;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.timeline-root {
|
|
22
|
+
position: relative;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
padding: 3rem;
|
|
28
|
+
background: var(--timeline-bg);
|
|
29
|
+
color: var(--timeline-text);
|
|
30
|
+
border-radius: 2rem;
|
|
31
|
+
border: 1px solid var(--timeline-border);
|
|
32
|
+
max-width: 800px;
|
|
33
|
+
margin: 0 auto;
|
|
34
|
+
min-height: 580px;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
user-select: none;
|
|
37
|
+
transition: box-shadow 0.5s ease;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.timeline-canvas-container {
|
|
41
|
+
position: absolute;
|
|
42
|
+
inset: 0;
|
|
43
|
+
z-index: 1;
|
|
44
|
+
cursor: ns-resize;
|
|
45
|
+
pointer-events: auto;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.timeline-canvas-container canvas {
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
display: block;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.timeline-info-panel {
|
|
55
|
+
position: relative;
|
|
56
|
+
z-index: 2;
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
align-items: center;
|
|
60
|
+
text-align: center;
|
|
61
|
+
gap: 1.5rem;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.timeline-meta-header {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
gap: 0.25rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.timeline-age {
|
|
72
|
+
font-size: 0.75rem;
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
text-transform: uppercase;
|
|
75
|
+
letter-spacing: 0.2em;
|
|
76
|
+
color: var(--timeline-text-muted);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.timeline-era-name {
|
|
80
|
+
font-size: clamp(2rem, 5vw, 3rem);
|
|
81
|
+
font-weight: 300;
|
|
82
|
+
margin: 0;
|
|
83
|
+
letter-spacing: -0.01em;
|
|
84
|
+
color: var(--timeline-text);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.timeline-temp {
|
|
88
|
+
font-size: clamp(5rem, 16vw, 8.5rem);
|
|
89
|
+
font-weight: 100;
|
|
90
|
+
line-height: 1;
|
|
91
|
+
letter-spacing: -0.05em;
|
|
92
|
+
color: var(--timeline-text);
|
|
93
|
+
margin: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.timeline-temp-unit {
|
|
97
|
+
font-size: 2.5rem;
|
|
98
|
+
font-weight: 200;
|
|
99
|
+
vertical-align: super;
|
|
100
|
+
margin-left: 0.25rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.timeline-ruler-container {
|
|
104
|
+
position: absolute;
|
|
105
|
+
right: 1.5rem;
|
|
106
|
+
top: 50%;
|
|
107
|
+
transform: translateY(-50%);
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
justify-content: space-between;
|
|
111
|
+
height: 280px;
|
|
112
|
+
align-items: flex-end;
|
|
113
|
+
z-index: 3;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.timeline-ruler-track {
|
|
117
|
+
position: absolute;
|
|
118
|
+
right: 8px;
|
|
119
|
+
top: 0;
|
|
120
|
+
bottom: 0;
|
|
121
|
+
width: 2px;
|
|
122
|
+
background: var(--timeline-divider);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.timeline-ruler-notch {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: 0.5rem;
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
padding: 0.25rem 0.5rem;
|
|
131
|
+
transition: transform 0.2s;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.timeline-notch-label {
|
|
135
|
+
font-size: 0.75rem;
|
|
136
|
+
font-weight: 700;
|
|
137
|
+
color: var(--timeline-ruler-text);
|
|
138
|
+
opacity: 0.5;
|
|
139
|
+
transition: opacity 0.2s, color 0.2s, text-shadow 0.2s;
|
|
140
|
+
letter-spacing: 0.05em;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.timeline-notch-line {
|
|
144
|
+
width: 12px;
|
|
145
|
+
height: 2px;
|
|
146
|
+
background: var(--timeline-divider);
|
|
147
|
+
transition: width 0.2s, background-color 0.2s;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.timeline-ruler-notch.active .timeline-notch-label {
|
|
151
|
+
opacity: 1;
|
|
152
|
+
color: var(--timeline-highlight);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.timeline-ruler-notch.active .timeline-notch-line {
|
|
156
|
+
width: 24px;
|
|
157
|
+
background: var(--timeline-highlight);
|
|
158
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { temperatureTimeline } 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 temperatureTimeline.i18n[locale]?.();
|
|
12
|
+
if (!content) return null;
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
{content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
|
package/src/tools.ts
CHANGED
|
@@ -5,6 +5,9 @@ import { ASTEROID_IMPACT_TOOL } from './tool/asteroid-impact/index';
|
|
|
5
5
|
import { MICROWAVE_DETECTOR_TOOL } from './tool/microwave-detector/index';
|
|
6
6
|
import { SIMULATION_PROBABILITY_TOOL } from './tool/simulation-probability/index';
|
|
7
7
|
import { CELLULAR_RENEWAL_TOOL } from './tool/cellular-renewal/index';
|
|
8
|
+
import { COSMIC_INFLATION_TOOL } from './tool/cosmic-inflation/index';
|
|
9
|
+
import { TEMPERATURE_TIMELINE_TOOL } from './tool/temperature-timeline/index';
|
|
10
|
+
import { LORENZ_ATTRACTOR_TOOL } from './tool/lorenz-attractor/index';
|
|
8
11
|
|
|
9
12
|
export const ALL_TOOLS: ToolDefinition[] = [
|
|
10
13
|
COLONY_COUNTER_TOOL,
|
|
@@ -12,6 +15,9 @@ export const ALL_TOOLS: ToolDefinition[] = [
|
|
|
12
15
|
MICROWAVE_DETECTOR_TOOL,
|
|
13
16
|
SIMULATION_PROBABILITY_TOOL,
|
|
14
17
|
CELLULAR_RENEWAL_TOOL,
|
|
18
|
+
COSMIC_INFLATION_TOOL,
|
|
19
|
+
TEMPERATURE_TIMELINE_TOOL,
|
|
20
|
+
LORENZ_ATTRACTOR_TOOL,
|
|
15
21
|
];
|
|
16
22
|
|
|
17
23
|
|
package/src/types.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type { SEOSection };
|
|
|
5
5
|
|
|
6
6
|
export type KnownLocale =
|
|
7
7
|
| 'ar' | 'da' | 'de' | 'en' | 'es' | 'fi'
|
|
8
|
-
| 'fr' | 'it' | 'ja' | 'ko' | 'nb' | 'nl'
|
|
8
|
+
| 'fr' | 'id' | 'it' | 'ja' | 'ko' | 'nb' | 'nl'
|
|
9
9
|
| 'pl' | 'pt' | 'ru' | 'sv' | 'tr' | 'zh';
|
|
10
10
|
|
|
11
11
|
export interface FAQItem {
|