@jjlmoya/utils-nautical 1.12.0 → 1.14.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.
@@ -1,54 +1,5 @@
1
- import type { NauticalToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
-
3
- export interface UnderKeelUI {
4
- [key: string]: string;
5
- parametersLabel: string;
6
- boatDraftLabel: string;
7
- chartDepthLabel: string;
8
- safetyMarginLabel: string;
9
- highTideLabel: string;
10
- lowTideLabel: string;
11
- metersLabel: string;
12
- passWindowLabel: string;
13
- neededLabel: string;
14
- tideRequiredLabel: string;
15
- statusNeverLabel: string;
16
- statusAlwaysLabel: string;
17
- statusFromLabel: string;
18
- statusUntilLabel: string;
19
- bottomLabel: string;
20
- faqTitle: string;
21
- bibliographyTitle: string;
22
- }
23
-
24
- export type UnderKeelLocaleContent = ToolLocaleContent<UnderKeelUI>;
25
-
26
- export const underKeel: NauticalToolEntry<UnderKeelUI> = {
27
- id: 'under-keel',
28
- icons: {
29
- bg: 'mdi:ferry',
30
- fg: 'mdi:anchor',
31
- },
32
- i18n: {
33
- es: () => import('./i18n/es').then((m) => m.content),
34
- en: () => import('./i18n/en').then((m) => m.content),
35
- fr: () => import('./i18n/fr').then((m) => m.content),
36
- de: () => import('./i18n/de').then((m) => m.content),
37
- id: () => import('./i18n/id').then((m) => m.content),
38
- it: () => import('./i18n/it').then((m) => m.content),
39
- ja: () => import('./i18n/ja').then((m) => m.content),
40
- ko: () => import('./i18n/ko').then((m) => m.content),
41
- nl: () => import('./i18n/nl').then((m) => m.content),
42
- pl: () => import('./i18n/pl').then((m) => m.content),
43
- pt: () => import('./i18n/pt').then((m) => m.content),
44
- ru: () => import('./i18n/ru').then((m) => m.content),
45
- sv: () => import('./i18n/sv').then((m) => m.content),
46
- tr: () => import('./i18n/tr').then((m) => m.content),
47
- zh: () => import('./i18n/zh').then((m) => m.content),
48
- },
49
- };
50
-
51
-
1
+ import { underKeel } from './entry';
2
+ export * from './entry';
52
3
  export const UNDER_KEEL_TOOL: ToolDefinition = {
53
4
  entry: underKeel,
54
5
  Component: () => import('./component.astro'),
@@ -0,0 +1,318 @@
1
+ .under-keel-calculator {
2
+ --n-bg: #fff;
3
+ --n-bg-muted: #f1f5f9;
4
+ --n-text: #0f172a;
5
+ --n-text-muted: #475569;
6
+ --n-text-dim: #64748b;
7
+ --n-border: #e2e8f0;
8
+ --n-shadow: rgba(0, 0, 0, 0.05);
9
+ --n-primary: #3b82f6;
10
+ --n-primary-on: #fff;
11
+ --n-accent: #6366f1;
12
+ --n-cyan: #0891b2;
13
+ --n-success: #10b981;
14
+ --n-warning: #f59e0b;
15
+ --n-error: #f43f5e;
16
+ --ukc-label-size: 0.75rem;
17
+ --ukc-label-weight: 800;
18
+ --ukc-label-spacing: 0.06em;
19
+
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: 1.5rem;
23
+ max-width: 1000px;
24
+ margin: 0 auto;
25
+ }
26
+
27
+ :global(.theme-dark) .under-keel-calculator {
28
+ --n-bg: #0f172a;
29
+ --n-bg-muted: #1e293b;
30
+ --n-text: #f8fafc;
31
+ --n-text-muted: #94a3b8;
32
+ --n-text-dim: #64748b;
33
+ --n-border: #334155;
34
+ --n-shadow: rgba(0, 0, 0, 0.3);
35
+ --n-primary: #60a5fa;
36
+ --n-primary-on: #fff;
37
+ --n-accent: #818cf8;
38
+ --n-cyan: #22d3ee;
39
+ --n-success: #34d399;
40
+ --n-warning: #fbbf24;
41
+ --n-error: #fb7185;
42
+ }
43
+
44
+ .ukc-main-card {
45
+ background: var(--n-bg);
46
+ border: 1px solid var(--n-border);
47
+ border-radius: 2rem;
48
+ display: grid;
49
+ grid-template-columns: 320px 1fr;
50
+ overflow: hidden;
51
+ box-shadow: 0 20px 40px var(--n-shadow);
52
+ }
53
+
54
+ @media (max-width: 850px) {
55
+ .ukc-main-card {
56
+ grid-template-columns: 1fr;
57
+ }
58
+ }
59
+
60
+ .ukc-calc-sidebar {
61
+ background: var(--n-primary);
62
+ color: var(--n-primary-on);
63
+ padding: 2rem;
64
+ display: flex;
65
+ flex-direction: column;
66
+ gap: 2rem;
67
+ }
68
+
69
+ .ukc-sidebar-header h3 {
70
+ font-size: 1.1rem;
71
+ margin: 0;
72
+ font-weight: 700;
73
+ text-transform: uppercase;
74
+ letter-spacing: 0.05em;
75
+ opacity: 0.9;
76
+ }
77
+
78
+ .ukc-input-set {
79
+ display: flex;
80
+ flex-direction: column;
81
+ gap: 1.2rem;
82
+ }
83
+
84
+ .ukc-input-block {
85
+ display: flex;
86
+ flex-direction: column;
87
+ gap: 0.4rem;
88
+ }
89
+
90
+ .ukc-input-block label {
91
+ font-size: var(--ukc-label-size);
92
+ font-weight: var(--ukc-label-weight);
93
+ color: var(--n-primary-on);
94
+ opacity: 0.9;
95
+ text-transform: uppercase;
96
+ letter-spacing: var(--ukc-label-spacing);
97
+ }
98
+
99
+ .ukc-unit-input {
100
+ position: relative;
101
+ display: flex;
102
+ align-items: center;
103
+ }
104
+
105
+ .ukc-unit-input input {
106
+ width: 100%;
107
+ background: rgba(255, 255, 255, 0.1);
108
+ border: 1px solid rgba(255, 255, 255, 0.2);
109
+ border-radius: 0.8rem;
110
+ padding: 0.7rem 2.5rem 0.7rem 1rem;
111
+ color: var(--n-primary-on);
112
+ font-size: 1rem;
113
+ outline: none;
114
+ }
115
+
116
+ .ukc-unit-input span {
117
+ position: absolute;
118
+ right: 12px;
119
+ font-size: 0.85rem;
120
+ font-weight: 700;
121
+ opacity: 0.6;
122
+ }
123
+
124
+ .ukc-hr-divider {
125
+ height: 1px;
126
+ background: rgba(255, 255, 255, 0.1);
127
+ margin: 0.5rem 0;
128
+ }
129
+
130
+ .ukc-row {
131
+ display: flex;
132
+ gap: 0.5rem;
133
+ }
134
+
135
+ .under-keel-calculator input[type='time'],
136
+ .under-keel-calculator input[type='number'] {
137
+ background: rgba(255, 255, 255, 0.1);
138
+ border: 1px solid rgba(255, 255, 255, 0.2);
139
+ border-radius: 0.8rem;
140
+ padding: 0.7rem;
141
+ color: var(--n-primary-on);
142
+ font-size: 1rem;
143
+ outline: none;
144
+ }
145
+
146
+ .ukc-mini-num {
147
+ width: 80px;
148
+ }
149
+
150
+ .ukc-calc-content {
151
+ padding: 2.5rem;
152
+ display: flex;
153
+ flex-direction: column;
154
+ gap: 2rem;
155
+ background: var(--n-bg-muted);
156
+ }
157
+
158
+ .ukc-top-row {
159
+ display: flex;
160
+ justify-content: space-between;
161
+ align-items: flex-start;
162
+ }
163
+
164
+ .ukc-result-display {
165
+ display: flex;
166
+ flex-direction: column;
167
+ gap: 0.5rem;
168
+ }
169
+
170
+ .ukc-result-display .label {
171
+ font-size: 0.85rem;
172
+ font-weight: 600;
173
+ color: var(--n-text-muted);
174
+ text-transform: uppercase;
175
+ letter-spacing: 0.05em;
176
+ }
177
+
178
+ .ukc-time-range {
179
+ display: flex;
180
+ align-items: center;
181
+ gap: 1.5rem;
182
+ font-size: 3.5rem;
183
+ font-weight: 800;
184
+ color: var(--n-text);
185
+ line-height: 1;
186
+ }
187
+
188
+ .ukc-arrow-sep {
189
+ color: var(--n-cyan);
190
+ opacity: 0.4;
191
+ }
192
+
193
+ .ukc-status-indicator {
194
+ padding: 0.4rem 1.2rem;
195
+ border-radius: 2rem;
196
+ font-size: 0.9rem;
197
+ font-weight: 700;
198
+ width: fit-content;
199
+ background: var(--n-bg-muted);
200
+ color: var(--n-text-dim);
201
+ }
202
+
203
+ .ukc-status-indicator.success {
204
+ background: color-mix(in srgb, var(--n-success), transparent 80%);
205
+ color: var(--n-success);
206
+ }
207
+
208
+ .ukc-status-indicator.warning {
209
+ background: color-mix(in srgb, var(--n-warning), transparent 80%);
210
+ color: var(--n-warning);
211
+ }
212
+
213
+ .ukc-status-indicator.danger {
214
+ background: color-mix(in srgb, var(--n-error), transparent 80%);
215
+ color: var(--n-error);
216
+ }
217
+
218
+ .ukc-data-group {
219
+ display: flex;
220
+ flex-direction: column;
221
+ gap: 0.8rem;
222
+ }
223
+
224
+ .ukc-stat-pill {
225
+ background: var(--n-bg);
226
+ padding: 0.5rem 1rem;
227
+ border-radius: 0.8rem;
228
+ border: 1px solid var(--n-border);
229
+ display: flex;
230
+ justify-content: space-between;
231
+ gap: 2rem;
232
+ font-size: 0.9rem;
233
+ }
234
+
235
+ .ukc-stat-pill span {
236
+ color: var(--n-text-muted);
237
+ font-weight: 500;
238
+ }
239
+
240
+ .ukc-stat-pill strong {
241
+ color: var(--n-text);
242
+ font-weight: 700;
243
+ }
244
+
245
+ .ukc-visual-container {
246
+ background: var(--n-bg);
247
+ border: 1px solid var(--n-border);
248
+ border-radius: 1.5rem;
249
+ padding: 2rem;
250
+ height: 300px;
251
+ display: flex;
252
+ justify-content: center;
253
+ position: relative;
254
+ }
255
+
256
+ .ukc-ocean-frame {
257
+ width: 200px;
258
+ height: 100%;
259
+ background: var(--n-bg-muted);
260
+ border: 4px solid var(--n-border);
261
+ border-radius: 1rem;
262
+ position: relative;
263
+ overflow: hidden;
264
+ }
265
+
266
+ .ukc-water-volume {
267
+ position: absolute;
268
+ bottom: 0;
269
+ width: 100%;
270
+ background: linear-gradient(to top, var(--n-primary), var(--n-cyan));
271
+ opacity: 0.6;
272
+ transition: height 0.6s ease;
273
+ }
274
+
275
+ .ukc-surface-line {
276
+ position: absolute;
277
+ top: 0;
278
+ width: 100%;
279
+ height: 3px;
280
+ background: var(--n-cyan);
281
+ }
282
+
283
+ .ukc-ship-silhouette {
284
+ position: absolute;
285
+ left: 20px;
286
+ right: 20px;
287
+ height: 30px;
288
+ color: var(--n-text);
289
+ z-index: 10;
290
+ transition: bottom 0.6s ease;
291
+ }
292
+
293
+ .ukc-sand-bottom {
294
+ position: absolute;
295
+ bottom: 0;
296
+ width: 100%;
297
+ height: 40px;
298
+ background: color-mix(in srgb, var(--n-warning), transparent 40%);
299
+ display: flex;
300
+ align-items: center;
301
+ justify-content: center;
302
+ font-size: 0.7rem;
303
+ font-weight: 800;
304
+ color: var(--n-text);
305
+ letter-spacing: 0.2em;
306
+ z-index: 5;
307
+ }
308
+
309
+ @media (max-width: 640px) {
310
+ .ukc-time-range {
311
+ font-size: 2.2rem;
312
+ }
313
+
314
+ .ukc-top-row {
315
+ flex-direction: column;
316
+ gap: 2rem;
317
+ }
318
+ }
package/src/tools.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { ALL_ENTRIES } from './entries';
1
2
  import { TIDE_CALCULATOR_TOOL } from './tool/tideCalculator';
2
3
  import { UNDER_KEEL_TOOL } from './tool/underKeel';
3
4
  import { NAUTICAL_CONVERTER_TOOL } from './tool/nauticalConverter';
@@ -24,4 +25,3 @@ export {
24
25
  ENDURANCE_TOOL,
25
26
  };
26
27
 
27
- export const ALL_ENTRIES = ALL_TOOLS.map(t => t.entry);