@jjlmoya/utils-chrono 1.18.0 → 1.19.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 +1 -1
- package/src/category/index.ts +2 -0
- package/src/entries.ts +4 -1
- package/src/index.ts +1 -0
- package/src/tests/locale_completeness.test.ts +1 -1
- package/src/tests/tool_validation.test.ts +1 -1
- package/src/tool/mainspring-finder/bibliography.astro +16 -0
- package/src/tool/mainspring-finder/bibliography.ts +16 -0
- package/src/tool/mainspring-finder/client.ts +89 -0
- package/src/tool/mainspring-finder/component.astro +72 -0
- package/src/tool/mainspring-finder/entry.ts +50 -0
- package/src/tool/mainspring-finder/helpers.ts +52 -0
- package/src/tool/mainspring-finder/i18n/de.ts +212 -0
- package/src/tool/mainspring-finder/i18n/en.ts +212 -0
- package/src/tool/mainspring-finder/i18n/es.ts +212 -0
- package/src/tool/mainspring-finder/i18n/fr.ts +212 -0
- package/src/tool/mainspring-finder/i18n/id.ts +212 -0
- package/src/tool/mainspring-finder/i18n/it.ts +212 -0
- package/src/tool/mainspring-finder/i18n/ja.ts +212 -0
- package/src/tool/mainspring-finder/i18n/ko.ts +212 -0
- package/src/tool/mainspring-finder/i18n/nl.ts +212 -0
- package/src/tool/mainspring-finder/i18n/pl.ts +212 -0
- package/src/tool/mainspring-finder/i18n/pt.ts +212 -0
- package/src/tool/mainspring-finder/i18n/ru.ts +212 -0
- package/src/tool/mainspring-finder/i18n/sv.ts +212 -0
- package/src/tool/mainspring-finder/i18n/tr.ts +212 -0
- package/src/tool/mainspring-finder/i18n/zh.ts +212 -0
- package/src/tool/mainspring-finder/index.ts +11 -0
- package/src/tool/mainspring-finder/mainspring-finder.css +242 -0
- package/src/tool/mainspring-finder/seo.astro +16 -0
- package/src/tools.ts +2 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
.msf {
|
|
2
|
+
background: var(--bg-surface, #fff);
|
|
3
|
+
border: 1px solid var(--border-color, #e2e8f0);
|
|
4
|
+
border-radius: 1.25rem;
|
|
5
|
+
padding: 1.5rem;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: 1rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.msf-top {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.msf-h {
|
|
18
|
+
font-size: 1.1rem;
|
|
19
|
+
font-weight: 800;
|
|
20
|
+
margin: 0;
|
|
21
|
+
background: linear-gradient(135deg, var(--text-base, #0f172a) 0%, color-mix(in srgb, var(--text-base, #0f172a) 65%, var(--accent, #6366f1)) 100%);
|
|
22
|
+
-webkit-background-clip: text;
|
|
23
|
+
-webkit-text-fill-color: transparent;
|
|
24
|
+
letter-spacing: -0.02em;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.msf-u {
|
|
28
|
+
display: flex;
|
|
29
|
+
background: var(--bg-muted, #f1f5f9);
|
|
30
|
+
border: 1px solid var(--border-color, #e2e8f0);
|
|
31
|
+
border-radius: 0.45rem;
|
|
32
|
+
padding: 0.1rem;
|
|
33
|
+
gap: 0.1rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.msf-u-btn {
|
|
37
|
+
padding: 0.25rem 0.55rem;
|
|
38
|
+
border: none;
|
|
39
|
+
border-radius: 0.35rem;
|
|
40
|
+
background: transparent;
|
|
41
|
+
color: var(--text-muted, #475569);
|
|
42
|
+
font-size: 0.7rem;
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
transition: all 0.2s;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.msf-u-on {
|
|
49
|
+
background: var(--accent, #6366f1);
|
|
50
|
+
color: var(--color-white, #fff);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.msf-grid {
|
|
54
|
+
display: grid;
|
|
55
|
+
grid-template-columns: repeat(4, 1fr);
|
|
56
|
+
gap: 0.5rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (max-width: 480px) { .msf-grid { grid-template-columns: repeat(2, 1fr); } }
|
|
60
|
+
|
|
61
|
+
.msf-f {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 0.25rem;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.msf-f-l {
|
|
69
|
+
font-size: 0.6rem;
|
|
70
|
+
font-weight: 700;
|
|
71
|
+
text-transform: uppercase;
|
|
72
|
+
letter-spacing: 0.06em;
|
|
73
|
+
color: var(--text-base, #0f172a);
|
|
74
|
+
opacity: 0.5;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.msf-f-i {
|
|
78
|
+
padding: 0.55rem 0.7rem;
|
|
79
|
+
border: 1px solid var(--border-color, #e2e8f0);
|
|
80
|
+
border-radius: 0.65rem;
|
|
81
|
+
background: var(--bg-page, #f8fafc);
|
|
82
|
+
color: var(--text-base, #0f172a);
|
|
83
|
+
font-size: 0.85rem;
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
width: 100%;
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
transition: all 0.2s;
|
|
88
|
+
font-variant-numeric: tabular-nums;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.msf-f-i:focus {
|
|
92
|
+
outline: none;
|
|
93
|
+
border-color: var(--accent, #6366f1);
|
|
94
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #6366f1) 15%, transparent);
|
|
95
|
+
background: var(--bg-surface, #fff);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.msf-r {
|
|
99
|
+
display: none;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
gap: 0.75rem;
|
|
102
|
+
background: color-mix(in srgb, var(--bg-page, #f8fafc) 50%, var(--bg-surface, #fff));
|
|
103
|
+
border: 1px solid var(--border-color, #e2e8f0);
|
|
104
|
+
border-radius: 1rem;
|
|
105
|
+
padding: 1rem;
|
|
106
|
+
animation: msf-in 0.25s ease;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@keyframes msf-in {
|
|
110
|
+
from {
|
|
111
|
+
opacity: 0;
|
|
112
|
+
transform: translateY(4px);
|
|
113
|
+
}
|
|
114
|
+
to {
|
|
115
|
+
opacity: 1;
|
|
116
|
+
transform: translateY(0);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.msf-r-grid {
|
|
121
|
+
display: grid;
|
|
122
|
+
grid-template-columns: repeat(3, 1fr);
|
|
123
|
+
gap: 0.5rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (max-width: 400px) { .msf-r-grid { grid-template-columns: 1fr; } }
|
|
127
|
+
|
|
128
|
+
.msf-r-c {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
align-items: center;
|
|
132
|
+
gap: 0.15rem;
|
|
133
|
+
padding: 0.6rem 0.4rem;
|
|
134
|
+
background: var(--bg-surface, #fff);
|
|
135
|
+
border: 1px solid var(--border-color, #e2e8f0);
|
|
136
|
+
border-radius: 0.75rem;
|
|
137
|
+
text-align: center;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.msf-r-c-l {
|
|
141
|
+
font-size: 0.55rem;
|
|
142
|
+
font-weight: 700;
|
|
143
|
+
text-transform: uppercase;
|
|
144
|
+
letter-spacing: 0.05em;
|
|
145
|
+
opacity: 0.45;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.msf-r-c-v {
|
|
149
|
+
font-size: 1rem;
|
|
150
|
+
font-weight: 800;
|
|
151
|
+
font-variant-numeric: tabular-nums;
|
|
152
|
+
color: var(--text-base, #0f172a);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.msf-r-bot {
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
justify-content: space-between;
|
|
159
|
+
gap: 0.75rem;
|
|
160
|
+
padding-top: 0.6rem;
|
|
161
|
+
border-top: 1px solid var(--border-color, #e2e8f0);
|
|
162
|
+
flex-wrap: wrap;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.msf-r-bot-i {
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
gap: 0.4rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.msf-r-bot-l {
|
|
172
|
+
font-size: 0.6rem;
|
|
173
|
+
font-weight: 700;
|
|
174
|
+
text-transform: uppercase;
|
|
175
|
+
letter-spacing: 0.05em;
|
|
176
|
+
opacity: 0.45;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.msf-badge {
|
|
180
|
+
padding: 0.15rem 0.5rem;
|
|
181
|
+
border-radius: 99px;
|
|
182
|
+
font-size: 0.68rem;
|
|
183
|
+
font-weight: 700;
|
|
184
|
+
color: var(--color-white, #fff);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.msf-r-bot-v {
|
|
188
|
+
font-size: 0.78rem;
|
|
189
|
+
font-weight: 700;
|
|
190
|
+
font-variant-numeric: tabular-nums;
|
|
191
|
+
opacity: 0.85;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.msf-steps {
|
|
195
|
+
display: flex;
|
|
196
|
+
flex-direction: column;
|
|
197
|
+
gap: 0.4rem;
|
|
198
|
+
padding: 0.85rem;
|
|
199
|
+
background: var(--bg-page, #f8fafc);
|
|
200
|
+
border: 1px solid var(--border-color, #e2e8f0);
|
|
201
|
+
border-radius: 0.75rem;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.msf-step {
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
gap: 0.5rem;
|
|
208
|
+
font-size: 0.75rem;
|
|
209
|
+
line-height: 1.35;
|
|
210
|
+
color: var(--text-base, #0f172a);
|
|
211
|
+
opacity: 0.7;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.msf-step-n {
|
|
215
|
+
width: 1.3rem;
|
|
216
|
+
height: 1.3rem;
|
|
217
|
+
border-radius: 50%;
|
|
218
|
+
background: color-mix(in srgb, var(--accent, #6366f1) 15%, var(--bg-surface, #fff));
|
|
219
|
+
color: var(--accent, #6366f1);
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
font-size: 0.6rem;
|
|
224
|
+
font-weight: 800;
|
|
225
|
+
flex-shrink: 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.msf-tip {
|
|
229
|
+
display: flex;
|
|
230
|
+
align-items: flex-start;
|
|
231
|
+
gap: 0.4rem;
|
|
232
|
+
padding: 0.6rem 0.75rem;
|
|
233
|
+
background: color-mix(in srgb, var(--color-warning, #f59e0b) 8%, var(--bg-surface, #fff));
|
|
234
|
+
border: 1px solid color-mix(in srgb, var(--color-warning, #f59e0b) 18%, var(--border-color, #e2e8f0));
|
|
235
|
+
border-radius: 0.6rem;
|
|
236
|
+
font-size: 0.72rem;
|
|
237
|
+
line-height: 1.35;
|
|
238
|
+
color: var(--text-base, #0f172a);
|
|
239
|
+
opacity: 0.8;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.msf-tip svg { color: var(--color-warning, #f59e0b); }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { mainspringFinder } 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 loader = mainspringFinder.i18n[locale] || mainspringFinder.i18n.en;
|
|
12
|
+
const content = await loader?.();
|
|
13
|
+
if (!content) return null;
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
{content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
|
package/src/tools.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { PERPETUAL_CALENDAR_TOOL } from './tool/perpetual-calendar';
|
|
|
22
22
|
import { TOURBILLON_VISUALIZER_TOOL } from './tool/tourbillon-visualizer';
|
|
23
23
|
import { GMT_WORLD_TIMER_TOOL } from './tool/gmt-world-timer';
|
|
24
24
|
import { QUARTZ_BATTERY_HEALTH_TOOL } from './tool/quartz-battery-health';
|
|
25
|
+
import { MAINSPRING_FINDER_TOOL } from './tool/mainspring-finder';
|
|
25
26
|
|
|
26
27
|
export const ALL_TOOLS: ToolDefinition[] = [
|
|
27
28
|
WATCH_ACCURACY_TRACKER_TOOL,
|
|
@@ -46,6 +47,7 @@ export const ALL_TOOLS: ToolDefinition[] = [
|
|
|
46
47
|
TOURBILLON_VISUALIZER_TOOL,
|
|
47
48
|
GMT_WORLD_TIMER_TOOL,
|
|
48
49
|
QUARTZ_BATTERY_HEALTH_TOOL,
|
|
50
|
+
MAINSPRING_FINDER_TOOL,
|
|
49
51
|
];
|
|
50
52
|
|
|
51
53
|
|