vidply 1.0.3 → 1.0.5

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.
@@ -101,6 +101,16 @@ export const translations = {
101
101
  },
102
102
  speeds: {
103
103
  normal: 'Normal'
104
+ },
105
+ time: {
106
+ display: 'Time display',
107
+ durationPrefix: 'Duration: ',
108
+ hour: '{count} hour',
109
+ hours: '{count} hours',
110
+ minute: '{count} minute',
111
+ minutes: '{count} minutes',
112
+ second: '{count} second',
113
+ seconds: '{count} seconds'
104
114
  }
105
115
  },
106
116
 
@@ -202,6 +212,16 @@ export const translations = {
202
212
  },
203
213
  speeds: {
204
214
  normal: 'Normal'
215
+ },
216
+ time: {
217
+ display: 'Zeitanzeige',
218
+ durationPrefix: 'Dauer: ',
219
+ hour: '{count} Stunde',
220
+ hours: '{count} Stunden',
221
+ minute: '{count} Minute',
222
+ minutes: '{count} Minuten',
223
+ second: '{count} Sekunde',
224
+ seconds: '{count} Sekunden'
205
225
  }
206
226
  },
207
227
 
@@ -303,6 +323,16 @@ export const translations = {
303
323
  },
304
324
  speeds: {
305
325
  normal: 'Normal'
326
+ },
327
+ time: {
328
+ display: 'Visualización de tiempo',
329
+ durationPrefix: 'Duración: ',
330
+ hour: '{count} hora',
331
+ hours: '{count} horas',
332
+ minute: '{count} minuto',
333
+ minutes: '{count} minutos',
334
+ second: '{count} segundo',
335
+ seconds: '{count} segundos'
306
336
  }
307
337
  },
308
338
 
@@ -404,6 +434,16 @@ export const translations = {
404
434
  },
405
435
  speeds: {
406
436
  normal: 'Normal'
437
+ },
438
+ time: {
439
+ display: 'Affichage du temps',
440
+ durationPrefix: 'Durée : ',
441
+ hour: '{count} heure',
442
+ hours: '{count} heures',
443
+ minute: '{count} minute',
444
+ minutes: '{count} minutes',
445
+ second: '{count} seconde',
446
+ seconds: '{count} secondes'
407
447
  }
408
448
  },
409
449
 
@@ -505,6 +545,16 @@ export const translations = {
505
545
  },
506
546
  speeds: {
507
547
  normal: '通常'
548
+ },
549
+ time: {
550
+ display: '時間表示',
551
+ durationPrefix: '再生時間: ',
552
+ hour: '{count}時間',
553
+ hours: '{count}時間',
554
+ minute: '{count}分',
555
+ minutes: '{count}分',
556
+ second: '{count}秒',
557
+ seconds: '{count}秒'
508
558
  }
509
559
  }
510
560
  };
@@ -1387,6 +1387,8 @@
1387
1387
  }
1388
1388
 
1389
1389
  .vidply-playlist-list {
1390
+ list-style: none;
1391
+ margin: 0;
1390
1392
  padding: 4px 0;
1391
1393
  }
1392
1394
 
@@ -1399,6 +1401,7 @@
1399
1401
  display: flex;
1400
1402
  gap: 12px;
1401
1403
  padding: 12px 16px;
1404
+ position: relative;
1402
1405
  transition: all 0.2s ease;
1403
1406
  }
1404
1407
 
@@ -1410,9 +1413,23 @@
1410
1413
  .vidply-playlist-item:focus {
1411
1414
  background: var(--vidply-white-08);
1412
1415
  border-left-color: var(--vidply-primary);
1416
+ outline: 2px solid var(--vidply-primary-light);
1417
+ outline-offset: -2px;
1418
+ z-index: 1;
1419
+ }
1420
+
1421
+ .vidply-playlist-item:focus:not(:focus-visible) {
1413
1422
  outline: none;
1414
1423
  }
1415
1424
 
1425
+ .vidply-playlist-item:focus-visible {
1426
+ background: var(--vidply-white-08);
1427
+ border-left-color: var(--vidply-primary);
1428
+ outline: 2px solid var(--vidply-primary-light);
1429
+ outline-offset: -2px;
1430
+ z-index: 1;
1431
+ }
1432
+
1416
1433
  .vidply-playlist-item-active {
1417
1434
  background: var(--vidply-primary-15);
1418
1435
  border-left-color: var(--vidply-primary);
@@ -1422,6 +1439,13 @@
1422
1439
  background: var(--vidply-primary-20);
1423
1440
  }
1424
1441
 
1442
+ .vidply-playlist-item-active:focus,
1443
+ .vidply-playlist-item-active:focus-visible {
1444
+ background: var(--vidply-primary-20);
1445
+ outline: 2px solid var(--vidply-primary-light);
1446
+ outline-offset: -2px;
1447
+ }
1448
+
1425
1449
  /* Playlist Thumbnail */
1426
1450
  .vidply-playlist-thumbnail {
1427
1451
  align-items: center;
@@ -2,6 +2,8 @@
2
2
  * Time formatting and conversion utilities
3
3
  */
4
4
 
5
+ import {i18n} from '../i18n/i18n.js';
6
+
5
7
  export const TimeUtils = {
6
8
  /**
7
9
  * Format seconds to time string (HH:MM:SS or MM:SS)
@@ -49,7 +51,7 @@ export const TimeUtils = {
49
51
  */
50
52
  formatDuration(seconds) {
51
53
  if (!isFinite(seconds) || seconds < 0) {
52
- return '0 seconds';
54
+ return i18n.t('time.seconds', { count: 0 });
53
55
  }
54
56
 
55
57
  const hours = Math.floor(seconds / 3600);
@@ -59,13 +61,16 @@ export const TimeUtils = {
59
61
  const parts = [];
60
62
 
61
63
  if (hours > 0) {
62
- parts.push(`${hours} hour${hours !== 1 ? 's' : ''}`);
64
+ const key = hours === 1 ? 'time.hour' : 'time.hours';
65
+ parts.push(i18n.t(key, { count: hours }));
63
66
  }
64
67
  if (minutes > 0) {
65
- parts.push(`${minutes} minute${minutes !== 1 ? 's' : ''}`);
68
+ const key = minutes === 1 ? 'time.minute' : 'time.minutes';
69
+ parts.push(i18n.t(key, { count: minutes }));
66
70
  }
67
71
  if (secs > 0 || parts.length === 0) {
68
- parts.push(`${secs} second${secs !== 1 ? 's' : ''}`);
72
+ const key = secs === 1 ? 'time.second' : 'time.seconds';
73
+ parts.push(i18n.t(key, { count: secs }));
69
74
  }
70
75
 
71
76
  return parts.join(', ');