@jjlmoya/utils-travel 1.11.0 → 1.13.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-travel",
3
- "version": "1.11.0",
3
+ "version": "1.13.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -10,7 +10,8 @@
10
10
  "./entries": "./src/entries.ts"
11
11
  },
12
12
  "files": [
13
- "src"
13
+ "src",
14
+ "scripts"
14
15
  ],
15
16
  "publishConfig": {
16
17
  "access": "public"
@@ -29,7 +30,8 @@
29
30
  "postversion": "git push && git push --tags",
30
31
  "patch": "npm version patch",
31
32
  "minor": "npm version minor",
32
- "major": "npm version major"
33
+ "major": "npm version major",
34
+ "postinstall": "node scripts/postinstall.mjs"
33
35
  },
34
36
  "lint-staged": {
35
37
  "*.{ts,tsx,astro}": [
@@ -0,0 +1,27 @@
1
+ import { readFileSync, writeFileSync, mkdirSync, readdirSync } from 'fs';
2
+ import { join, dirname } from 'path';
3
+ import { fileURLToPath } from 'url';
4
+
5
+ const libDir = dirname(fileURLToPath(import.meta.url));
6
+ const toolsDir = join(libDir, '../src/tool');
7
+
8
+ const inNodeModules = libDir.includes('node_modules');
9
+ if (!inNodeModules) process.exit(0);
10
+
11
+ const projectRoot = join(libDir, '../../../..');
12
+ const categoryKey = JSON.parse(readFileSync(join(libDir, '../package.json'), 'utf8')).name.replace('@jjlmoya/utils-', '');
13
+ const destDir = join(projectRoot, `public/styles/lib/${categoryKey}`);
14
+
15
+ mkdirSync(destDir, { recursive: true });
16
+
17
+ const tools = readdirSync(toolsDir, { withFileTypes: true }).filter(d => d.isDirectory());
18
+ for (const tool of tools) {
19
+ const toolDir = join(toolsDir, tool.name);
20
+ let files;
21
+ try { files = readdirSync(toolDir).filter(f => f.endsWith('.css')); }
22
+ catch { continue; }
23
+ for (const file of files) {
24
+ writeFileSync(join(destDir, file), readFileSync(join(toolDir, file)));
25
+ console.log(`[@jjlmoya/utils-${categoryKey}] copied ${file}`);
26
+ }
27
+ }
@@ -0,0 +1,379 @@
1
+ .luggage-calculator {
2
+ --lc-primary: #3b82f6;
3
+ --lc-border: #e2e8f0;
4
+ --lc-text: #1e293b;
5
+ --lc-text-muted: #64748b;
6
+ --lc-card-bg: #fff;
7
+ --lc-input-bg: #f8fafc;
8
+ --lc-item-bg: #f1f5f9;
9
+ --lc-modal-bg: #fff;
10
+ --lc-note-bg: #eff6ff;
11
+ --lc-note-border: #dbeafe;
12
+ --lc-note-text: #1d4ed8;
13
+ --lc-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
14
+ }
15
+
16
+ .theme-dark .luggage-calculator {
17
+ --lc-border: #334155;
18
+ --lc-text: #f1f5f9;
19
+ --lc-text-muted: #94a3b8;
20
+ --lc-card-bg: #1e293b;
21
+ --lc-input-bg: #0f172a;
22
+ --lc-item-bg: #0f172a;
23
+ --lc-modal-bg: #1e293b;
24
+ --lc-note-bg: rgba(30, 58, 138, 0.3);
25
+ --lc-note-border: rgba(30, 58, 138, 0.6);
26
+ --lc-note-text: #bfdbfe;
27
+ --lc-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
28
+ --lc-primary: #60a5fa;
29
+ }
30
+
31
+ .lc-card {
32
+ background: var(--lc-card-bg);
33
+ border: 1px solid var(--lc-border);
34
+ border-radius: 2.5rem;
35
+ padding: 3rem;
36
+ box-shadow: var(--lc-shadow);
37
+ max-width: 900px;
38
+ margin: 2rem auto;
39
+ position: relative;
40
+ overflow: hidden;
41
+ }
42
+
43
+ .lc-header {
44
+ display: flex;
45
+ justify-content: space-between;
46
+ align-items: center;
47
+ margin-bottom: 2.5rem;
48
+ position: relative;
49
+ z-index: 2;
50
+ }
51
+
52
+ .lc-title {
53
+ font-size: 2rem;
54
+ font-weight: 900;
55
+ letter-spacing: -0.02em;
56
+ color: var(--lc-text);
57
+ margin: 0;
58
+ }
59
+
60
+ .lc-badge {
61
+ padding: 0.6rem 1.25rem;
62
+ background: var(--lc-primary);
63
+ color: white;
64
+ border-radius: 1rem;
65
+ font-size: 0.7rem;
66
+ font-weight: 800;
67
+ text-transform: uppercase;
68
+ letter-spacing: 0.1em;
69
+ box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
70
+ }
71
+
72
+ .search-section {
73
+ margin-bottom: 2.5rem;
74
+ position: relative;
75
+ z-index: 2;
76
+ }
77
+
78
+ .search-container {
79
+ position: relative;
80
+ width: 100%;
81
+ }
82
+
83
+ .search-input {
84
+ width: 100%;
85
+ padding: 1.25rem 1.5rem 1.25rem 3.5rem;
86
+ background: var(--lc-input-bg);
87
+ border: 2px solid var(--lc-border);
88
+ border-radius: 1.5rem;
89
+ font-size: 1.05rem;
90
+ color: var(--lc-text);
91
+ transition: all 0.3s ease;
92
+ outline: none;
93
+ }
94
+
95
+ .search-input:focus {
96
+ border-color: var(--lc-primary);
97
+ background: var(--lc-card-bg);
98
+ box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
99
+ }
100
+
101
+ .search-icon {
102
+ position: absolute;
103
+ left: 1.5rem;
104
+ top: 50%;
105
+ transform: translateY(-50%);
106
+ color: var(--lc-text-muted);
107
+ width: 20px;
108
+ height: 20px;
109
+ }
110
+
111
+ .results-grid {
112
+ display: grid;
113
+ grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
114
+ gap: 1.5rem;
115
+ position: relative;
116
+ z-index: 2;
117
+ }
118
+
119
+ .airline-card {
120
+ background: var(--lc-card-bg);
121
+ border: 1px solid var(--lc-border);
122
+ border-radius: 1.5rem;
123
+ padding: 1.5rem;
124
+ transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
125
+ cursor: pointer;
126
+ display: flex;
127
+ flex-direction: column;
128
+ }
129
+
130
+ .airline-card:hover {
131
+ transform: scale(1.02);
132
+ border-color: var(--lc-primary);
133
+ box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.1);
134
+ }
135
+
136
+ .airline-header {
137
+ display: flex;
138
+ align-items: center;
139
+ gap: 1rem;
140
+ margin-bottom: 1.25rem;
141
+ }
142
+
143
+ .airline-icon {
144
+ width: 28px;
145
+ height: 28px;
146
+ color: var(--lc-primary);
147
+ background: var(--lc-note-bg);
148
+ padding: 0.4rem;
149
+ border-radius: 0.75rem;
150
+ }
151
+
152
+ .airline-name {
153
+ font-size: 1.25rem;
154
+ font-weight: 800;
155
+ color: var(--lc-text);
156
+ }
157
+
158
+ .luggage-types {
159
+ display: flex;
160
+ flex-direction: column;
161
+ gap: 1rem;
162
+ }
163
+
164
+ .luggage-item {
165
+ padding: 1rem;
166
+ background: var(--lc-input-bg);
167
+ border-radius: 1.25rem;
168
+ display: flex;
169
+ align-items: center;
170
+ gap: 0.75rem;
171
+ border: 1px solid transparent;
172
+ transition: border-color 0.2s;
173
+ }
174
+
175
+ .airline-card:hover .luggage-item {
176
+ border-color: var(--lc-border);
177
+ }
178
+
179
+ .luggage-icon {
180
+ width: 28px;
181
+ height: 28px;
182
+ color: var(--lc-primary);
183
+ flex-shrink: 0;
184
+ }
185
+
186
+ .luggage-info {
187
+ display: flex;
188
+ flex-direction: column;
189
+ }
190
+
191
+ .luggage-label {
192
+ font-size: 0.7rem;
193
+ font-weight: 700;
194
+ color: var(--lc-text-muted);
195
+ text-transform: uppercase;
196
+ letter-spacing: 0.05em;
197
+ margin-bottom: 0.1rem;
198
+ }
199
+
200
+ .luggage-measure {
201
+ font-size: 1rem;
202
+ font-weight: 800;
203
+ color: var(--lc-text);
204
+ }
205
+
206
+ .luggage-weight {
207
+ font-size: 0.85rem;
208
+ color: var(--lc-primary);
209
+ font-weight: 700;
210
+ }
211
+
212
+ .no-results {
213
+ grid-column: 1 / -1;
214
+ text-align: center;
215
+ padding: 4rem;
216
+ color: var(--lc-text-muted);
217
+ font-size: 1.1rem;
218
+ font-weight: 600;
219
+ }
220
+
221
+ .detail-overlay {
222
+ position: fixed;
223
+ top: 0;
224
+ left: 0;
225
+ width: 100%;
226
+ height: 100%;
227
+ background: rgba(15, 23, 42, 0.8);
228
+ backdrop-filter: blur(12px);
229
+ display: flex;
230
+ align-items: center;
231
+ justify-content: center;
232
+ z-index: 1000;
233
+ opacity: 0;
234
+ pointer-events: none;
235
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
236
+ }
237
+
238
+ .detail-overlay.active {
239
+ opacity: 1;
240
+ pointer-events: auto;
241
+ }
242
+
243
+ .detail-modal {
244
+ background: var(--lc-modal-bg);
245
+ width: 90%;
246
+ max-width: 550px;
247
+ border-radius: 3rem;
248
+ padding: 3rem;
249
+ position: relative;
250
+ transform: translateY(30px) scale(0.95);
251
+ transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
252
+ box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
253
+ border: 1px solid var(--lc-border);
254
+ }
255
+
256
+ .detail-overlay.active .detail-modal {
257
+ transform: translateY(0) scale(1);
258
+ }
259
+
260
+ .close-btn {
261
+ position: absolute;
262
+ top: 2rem;
263
+ right: 2rem;
264
+ background: var(--lc-input-bg);
265
+ border: none;
266
+ width: 44px;
267
+ height: 44px;
268
+ border-radius: 50%;
269
+ cursor: pointer;
270
+ display: flex;
271
+ align-items: center;
272
+ justify-content: center;
273
+ color: var(--lc-text);
274
+ transition: all 0.3s;
275
+ }
276
+
277
+ .close-btn:hover {
278
+ background: var(--lc-primary);
279
+ color: white;
280
+ transform: rotate(90deg);
281
+ }
282
+
283
+ .modal-title {
284
+ font-size: 2.25rem;
285
+ font-weight: 900;
286
+ margin-bottom: 2rem;
287
+ text-align: center;
288
+ letter-spacing: -0.03em;
289
+ }
290
+
291
+ .detail-props {
292
+ display: grid;
293
+ grid-template-columns: 1fr 1fr;
294
+ gap: 1.5rem;
295
+ }
296
+
297
+ .prop-card {
298
+ background: var(--lc-input-bg);
299
+ padding: 1.5rem;
300
+ border-radius: 2rem;
301
+ text-align: center;
302
+ border: 1px solid var(--lc-border);
303
+ }
304
+
305
+ .prop-label {
306
+ font-size: 0.85rem;
307
+ color: var(--lc-text-muted);
308
+ font-weight: 700;
309
+ text-transform: uppercase;
310
+ margin-bottom: 0.75rem;
311
+ display: block;
312
+ }
313
+
314
+ .prop-value {
315
+ font-size: 1.5rem;
316
+ font-weight: 900;
317
+ color: var(--lc-text);
318
+ }
319
+
320
+ .luggage-weight-detail {
321
+ font-size: 0.95rem;
322
+ margin-top: 0.75rem;
323
+ color: var(--lc-primary);
324
+ font-weight: 800;
325
+ }
326
+
327
+ .modal-note {
328
+ margin-top: 2rem;
329
+ padding: 1.5rem;
330
+ background: var(--lc-note-bg);
331
+ border-radius: 1.5rem;
332
+ border: 1px solid var(--lc-note-border);
333
+ }
334
+
335
+ .modal-note-text {
336
+ font-size: 0.95rem;
337
+ color: var(--lc-note-text);
338
+ line-height: 1.6;
339
+ margin: 0;
340
+ }
341
+
342
+ .modal-note-strong {
343
+ font-weight: 900;
344
+ text-transform: uppercase;
345
+ font-size: 0.8rem;
346
+ display: block;
347
+ margin-bottom: 0.4rem;
348
+ }
349
+
350
+ @media (max-width: 640px) {
351
+ .lc-card {
352
+ padding: 2rem 1.5rem;
353
+ border-radius: 2rem;
354
+ margin: 1rem;
355
+ }
356
+
357
+ .lc-header {
358
+ flex-direction: column;
359
+ align-items: flex-start;
360
+ gap: 1rem;
361
+ }
362
+
363
+ .lc-title {
364
+ font-size: 1.5rem;
365
+ }
366
+
367
+ .results-grid {
368
+ grid-template-columns: 1fr;
369
+ }
370
+
371
+ .detail-props {
372
+ grid-template-columns: 1fr;
373
+ }
374
+
375
+ .detail-modal {
376
+ padding: 2rem;
377
+ border-radius: 2rem;
378
+ }
379
+ }