@glandais/vcyclist-elevation-wasm 0.0.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/demo.css ADDED
@@ -0,0 +1,596 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
4
+
5
+ body {
6
+ margin: 0;
7
+ padding: 8px;
8
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
9
+ background: #f8f9fa;
10
+ overflow-x: hidden;
11
+ }
12
+
13
+ .app-container {
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 12px;
17
+ height: 100vh;
18
+ max-height: calc(100vh - 16px);
19
+ }
20
+
21
+ .header {
22
+ text-align: center;
23
+ padding: 8px 0;
24
+ background: white;
25
+ border-radius: 8px;
26
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
27
+ }
28
+
29
+ .header h1 {
30
+ margin: 0;
31
+ font-size: 1.5rem;
32
+ color: #333;
33
+ }
34
+
35
+ .header .info {
36
+ margin: 4px 0 0 0;
37
+ font-size: 0.9rem;
38
+ color: #666;
39
+ }
40
+
41
+ .controls-panel {
42
+ background: white;
43
+ border-radius: 8px;
44
+ padding: 12px;
45
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
46
+ }
47
+
48
+ .controls-row {
49
+ display: flex;
50
+ gap: 20px;
51
+ align-items: flex-start;
52
+ flex-wrap: wrap;
53
+ }
54
+
55
+ .section {
56
+ display: flex;
57
+ flex-direction: column;
58
+ gap: 6px;
59
+ min-width: 140px;
60
+ }
61
+
62
+ .section strong {
63
+ font-size: 0.9rem;
64
+ color: #333;
65
+ margin-bottom: 4px;
66
+ }
67
+
68
+ .control-line {
69
+ display: flex;
70
+ align-items: center;
71
+ gap: 8px;
72
+ font-size: 0.85rem;
73
+ }
74
+
75
+ .control-line input[type='range'] {
76
+ width: 80px;
77
+ }
78
+
79
+ .control-line input[type='number'] {
80
+ width: 50px;
81
+ padding: 2px 4px;
82
+ border: 1px solid #ddd;
83
+ border-radius: 3px;
84
+ font-size: 0.8rem;
85
+ }
86
+
87
+ .control-line label {
88
+ font-size: 0.8rem;
89
+ color: #666;
90
+ }
91
+
92
+ .map-container {
93
+ background: white;
94
+ border-radius: 8px;
95
+ padding: 8px;
96
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
97
+ display: flex;
98
+ flex-direction: column;
99
+ flex: 1;
100
+ }
101
+
102
+ .chart-panel {
103
+ background: white;
104
+ border-radius: 8px;
105
+ padding: 12px;
106
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
107
+ }
108
+
109
+ #map {
110
+ flex: 1;
111
+ min-height: 400px;
112
+ border: 2px solid #ddd;
113
+ border-radius: 6px;
114
+ }
115
+
116
+ .status-bar {
117
+ margin-top: 8px;
118
+ padding: 8px;
119
+ background: #f8f9fa;
120
+ border-radius: 4px;
121
+ font-size: 0.85rem;
122
+ }
123
+
124
+ /* Mobile responsive */
125
+ @media (max-width: 768px) {
126
+ body {
127
+ padding: 4px;
128
+ }
129
+
130
+ #map {
131
+ min-height: 300px;
132
+ }
133
+ }
134
+
135
+ h3 {
136
+ font-size: 1rem;
137
+ margin: 0 0 12px 0;
138
+ color: #333;
139
+ border-bottom: 2px solid #eee;
140
+ padding-bottom: 6px;
141
+ }
142
+
143
+ .button-group {
144
+ display: flex;
145
+ gap: 8px;
146
+ margin-bottom: 12px;
147
+ flex-wrap: wrap;
148
+ }
149
+
150
+ .filter-controls {
151
+ margin-bottom: 20px;
152
+ padding-bottom: 16px;
153
+ border-bottom: 1px solid #eee;
154
+ }
155
+
156
+ .filter-controls:last-child {
157
+ border-bottom: none;
158
+ margin-bottom: 0;
159
+ }
160
+
161
+ .filter-checkbox {
162
+ margin-bottom: 12px;
163
+ }
164
+
165
+ .filter-checkbox input[type='checkbox'] {
166
+ margin-right: 8px;
167
+ }
168
+
169
+ .filter-checkbox label {
170
+ font-size: 0.9rem;
171
+ color: #555;
172
+ cursor: pointer;
173
+ }
174
+
175
+ .filter-group {
176
+ margin-bottom: 10px;
177
+ }
178
+
179
+ .filter-value {
180
+ display: flex;
181
+ align-items: center;
182
+ gap: 8px;
183
+ margin-top: 4px;
184
+ }
185
+
186
+ .filter-value input[type='range'] {
187
+ flex: 1;
188
+ min-width: 100px;
189
+ }
190
+
191
+ .filter-value input[type='number'] {
192
+ width: 70px;
193
+ padding: 4px 6px;
194
+ border: 1px solid #ddd;
195
+ border-radius: 4px;
196
+ font-size: 0.9rem;
197
+ }
198
+
199
+ .elevation-display {
200
+ font-weight: 600;
201
+ color: #2c5aa0;
202
+ margin-bottom: 4px;
203
+ }
204
+
205
+ .coordinates {
206
+ font-size: 0.85rem;
207
+ color: #666;
208
+ }
209
+
210
+ .elevation-info {
211
+ background: #f5f5f5;
212
+ padding: 15px;
213
+ border-radius: 8px;
214
+ border: 1px solid #ddd;
215
+ }
216
+
217
+ .elevation-display {
218
+ font-size: 18px;
219
+ font-weight: bold;
220
+ color: #2c5aa0;
221
+ margin-bottom: 10px;
222
+ }
223
+
224
+ .coordinates {
225
+ color: #666;
226
+ font-size: 14px;
227
+ }
228
+
229
+ @media (max-width: 768px) {
230
+ .elevation-info {
231
+ padding: 12px;
232
+ }
233
+
234
+ .elevation-display {
235
+ font-size: 16px;
236
+ }
237
+
238
+ .coordinates {
239
+ font-size: 13px;
240
+ }
241
+ }
242
+
243
+ @media (max-width: 480px) {
244
+ .elevation-info {
245
+ padding: 10px;
246
+ }
247
+
248
+ .elevation-display {
249
+ font-size: 15px;
250
+ margin-bottom: 8px;
251
+ }
252
+
253
+ .coordinates {
254
+ font-size: 12px;
255
+ }
256
+ }
257
+
258
+ .loading {
259
+ color: #ff9800;
260
+ font-style: italic;
261
+ }
262
+
263
+ .error {
264
+ color: #f44336;
265
+ }
266
+
267
+ .success {
268
+ color: #4caf50;
269
+ }
270
+
271
+ .info a {
272
+ color: #2c5aa0;
273
+ text-decoration: none;
274
+ font-weight: 500;
275
+ }
276
+
277
+ .info a:hover {
278
+ text-decoration: underline;
279
+ }
280
+
281
+ .controls {
282
+ background: #f0f8ff;
283
+ padding: 15px;
284
+ border-radius: 8px;
285
+ border: 1px solid #ddd;
286
+ margin-bottom: 20px;
287
+ }
288
+
289
+ .filter-controls {
290
+ background: #fff5f5;
291
+ padding: 15px;
292
+ border-radius: 8px;
293
+ border: 1px solid #ddd;
294
+ margin-bottom: 20px;
295
+ }
296
+
297
+ .filter-group {
298
+ display: grid;
299
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
300
+ gap: 15px;
301
+ margin-bottom: 15px;
302
+ }
303
+
304
+ .filter-option {
305
+ display: flex;
306
+ flex-direction: column;
307
+ gap: 5px;
308
+ }
309
+
310
+ .filter-option label {
311
+ font-size: 14px;
312
+ font-weight: 500;
313
+ color: #333;
314
+ }
315
+
316
+ .filter-option input[type='range'] {
317
+ width: 100%;
318
+ height: 6px;
319
+ background: #ddd;
320
+ border-radius: 3px;
321
+ outline: none;
322
+ }
323
+
324
+ .filter-option input[type='range']::-webkit-slider-thumb {
325
+ appearance: none;
326
+ width: 18px;
327
+ height: 18px;
328
+ background: #2c5aa0;
329
+ border-radius: 50%;
330
+ cursor: pointer;
331
+ }
332
+
333
+ .filter-option input[type='range']::-moz-range-thumb {
334
+ width: 18px;
335
+ height: 18px;
336
+ background: #2c5aa0;
337
+ border-radius: 50%;
338
+ border: none;
339
+ cursor: pointer;
340
+ }
341
+
342
+ .filter-value {
343
+ display: flex;
344
+ align-items: center;
345
+ gap: 10px;
346
+ }
347
+
348
+ .filter-value input[type='number'] {
349
+ width: 80px;
350
+ padding: 4px 8px;
351
+ border: 1px solid #ddd;
352
+ border-radius: 4px;
353
+ font-size: 14px;
354
+ }
355
+
356
+ .filter-checkbox {
357
+ display: flex;
358
+ align-items: center;
359
+ gap: 8px;
360
+ margin-bottom: 10px;
361
+ }
362
+
363
+ .filter-checkbox input[type='checkbox'] {
364
+ width: 18px;
365
+ height: 18px;
366
+ cursor: pointer;
367
+ }
368
+
369
+ .controls h3 {
370
+ margin: 0 0 10px 0;
371
+ color: #333;
372
+ }
373
+
374
+ @media (max-width: 768px) {
375
+ .controls {
376
+ padding: 12px;
377
+ margin-bottom: 15px;
378
+ }
379
+
380
+ .controls h3 {
381
+ font-size: 1.1em;
382
+ margin-bottom: 8px;
383
+ }
384
+ }
385
+
386
+ @media (max-width: 480px) {
387
+ .controls {
388
+ padding: 10px;
389
+ }
390
+
391
+ .controls h3 {
392
+ font-size: 1em;
393
+ }
394
+ }
395
+
396
+ .button-group {
397
+ display: flex;
398
+ gap: 10px;
399
+ flex-wrap: wrap;
400
+ margin-bottom: 10px;
401
+ }
402
+
403
+ @media (max-width: 480px) {
404
+ .button-group {
405
+ flex-direction: column;
406
+ gap: 8px;
407
+ }
408
+
409
+ button {
410
+ width: 100%;
411
+ }
412
+ }
413
+
414
+ button {
415
+ padding: 8px 16px;
416
+ border: none;
417
+ border-radius: 4px;
418
+ cursor: pointer;
419
+ font-size: 14px;
420
+ font-weight: 500;
421
+ transition: background-color 0.2s;
422
+ }
423
+
424
+ button.primary {
425
+ background: #2c5aa0;
426
+ color: white;
427
+ }
428
+
429
+ button.primary:hover {
430
+ background: #1a4480;
431
+ }
432
+
433
+ button.secondary {
434
+ background: #666;
435
+ color: white;
436
+ }
437
+
438
+ button.secondary:hover {
439
+ background: #444;
440
+ }
441
+
442
+ button.danger {
443
+ background: #f44336;
444
+ color: white;
445
+ }
446
+
447
+ button.danger:hover {
448
+ background: #d32f2f;
449
+ }
450
+
451
+ button:disabled {
452
+ background: #ccc;
453
+ cursor: not-allowed;
454
+ }
455
+
456
+ .mode-info {
457
+ font-size: 11px;
458
+ color: #666;
459
+ margin-top: 6px;
460
+ font-style: italic;
461
+ }
462
+
463
+ #chart-container {
464
+ display: none;
465
+ }
466
+
467
+ #chart-container.visible {
468
+ display: block;
469
+ }
470
+
471
+ #chart-container h3 {
472
+ margin: 0 0 15px 0;
473
+ color: #333;
474
+ }
475
+
476
+ #elevation-chart {
477
+ max-height: 400px;
478
+ }
479
+
480
+ @media (max-width: 768px) {
481
+ #chart-container {
482
+ padding: 15px;
483
+ margin-bottom: 15px;
484
+ }
485
+
486
+ #chart-container h3 {
487
+ font-size: 1.1em;
488
+ margin-bottom: 12px;
489
+ }
490
+
491
+ #elevation-chart {
492
+ max-height: 300px;
493
+ }
494
+ }
495
+
496
+ @media (max-width: 480px) {
497
+ #chart-container {
498
+ padding: 10px;
499
+ }
500
+
501
+ #chart-container h3 {
502
+ font-size: 1em;
503
+ margin-bottom: 10px;
504
+ }
505
+
506
+ #elevation-chart {
507
+ max-height: 250px;
508
+ }
509
+ }
510
+
511
+ .chart-info {
512
+ margin-top: 15px;
513
+ padding: 10px;
514
+ background: #f9f9f9;
515
+ border-radius: 4px;
516
+ font-size: 14px;
517
+ }
518
+
519
+ .stats {
520
+ display: grid;
521
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
522
+ gap: 10px;
523
+ margin-top: 10px;
524
+ }
525
+
526
+ @media (max-width: 768px) {
527
+ .stats {
528
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
529
+ gap: 8px;
530
+ }
531
+ }
532
+
533
+ @media (max-width: 480px) {
534
+ .stats {
535
+ grid-template-columns: repeat(2, 1fr);
536
+ gap: 6px;
537
+ }
538
+
539
+ .stat-value {
540
+ font-size: 16px;
541
+ }
542
+
543
+ .stat-label {
544
+ font-size: 11px;
545
+ }
546
+ }
547
+
548
+ .stat {
549
+ text-align: center;
550
+ padding: 10px;
551
+ background: white;
552
+ border-radius: 4px;
553
+ border: 1px solid #e0e0e0;
554
+ }
555
+
556
+ .stat-value {
557
+ font-size: 18px;
558
+ font-weight: bold;
559
+ color: #2c5aa0;
560
+ }
561
+
562
+ .stat-label {
563
+ font-size: 12px;
564
+ color: #666;
565
+ margin-top: 2px;
566
+ }
567
+
568
+ /* GPX Upload Styles */
569
+ .gpx-status {
570
+ font-size: 0.8rem;
571
+ margin-top: 4px;
572
+ min-height: 1rem;
573
+ color: #666;
574
+ }
575
+
576
+ .gpx-status.loading {
577
+ color: #ff9800;
578
+ font-style: italic;
579
+ }
580
+
581
+ .gpx-status.success {
582
+ color: #4caf50;
583
+ font-weight: 500;
584
+ }
585
+
586
+ .gpx-status.error {
587
+ color: #f44336;
588
+ font-weight: 500;
589
+ }
590
+
591
+ /* Mobile responsive for GPX controls */
592
+ @media (max-width: 480px) {
593
+ .gpx-status {
594
+ font-size: 0.75rem;
595
+ }
596
+ }