@djvlc/runtime-web 1.0.3 → 1.0.4
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/dist/error-reporter.d.ts +76 -0
- package/dist/error-reporter.d.ts.map +1 -0
- package/dist/index.d.ts +56 -94
- package/dist/index.d.ts.map +1 -1
- package/dist/mount.d.ts +114 -0
- package/dist/mount.d.ts.map +1 -0
- package/dist/performance.d.ts +88 -0
- package/dist/performance.d.ts.map +1 -0
- package/dist/runtime.css +440 -0
- package/dist/runtime.esm.js +5312 -1125
- package/dist/runtime.iife.js +1 -1
- package/dist/storage.d.ts +33 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/tracking.d.ts +87 -0
- package/dist/tracking.d.ts.map +1 -0
- package/dist/utils.d.ts +66 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +2 -3
package/dist/runtime.css
CHANGED
|
@@ -225,6 +225,429 @@
|
|
|
225
225
|
font-size: 14px;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
/* ==================== Skeleton Loading ==================== */
|
|
229
|
+
|
|
230
|
+
.djv-skeleton {
|
|
231
|
+
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
232
|
+
background-size: 200% 100%;
|
|
233
|
+
animation: djv-skeleton-loading 1.5s infinite;
|
|
234
|
+
border-radius: 4px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.djv-skeleton-text {
|
|
238
|
+
height: 1em;
|
|
239
|
+
margin-bottom: 8px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.djv-skeleton-text:last-child {
|
|
243
|
+
width: 60%;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.djv-skeleton-avatar {
|
|
247
|
+
width: 48px;
|
|
248
|
+
height: 48px;
|
|
249
|
+
border-radius: 50%;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.djv-skeleton-button {
|
|
253
|
+
width: 100px;
|
|
254
|
+
height: 36px;
|
|
255
|
+
border-radius: 4px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.djv-skeleton-image {
|
|
259
|
+
width: 100%;
|
|
260
|
+
height: 200px;
|
|
261
|
+
border-radius: 8px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.djv-skeleton-card {
|
|
265
|
+
padding: 16px;
|
|
266
|
+
border-radius: 8px;
|
|
267
|
+
background: #fff;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@keyframes djv-skeleton-loading {
|
|
271
|
+
0% {
|
|
272
|
+
background-position: 200% 0;
|
|
273
|
+
}
|
|
274
|
+
100% {
|
|
275
|
+
background-position: -200% 0;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* ==================== Action Sheet ==================== */
|
|
280
|
+
|
|
281
|
+
.djv-action-sheet-overlay {
|
|
282
|
+
position: fixed;
|
|
283
|
+
inset: 0;
|
|
284
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
285
|
+
z-index: 9998;
|
|
286
|
+
animation: djv-fade-in 0.2s ease-out;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.djv-action-sheet {
|
|
290
|
+
position: fixed;
|
|
291
|
+
bottom: 0;
|
|
292
|
+
left: 0;
|
|
293
|
+
right: 0;
|
|
294
|
+
background-color: #f7f8fa;
|
|
295
|
+
border-radius: 16px 16px 0 0;
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
z-index: 9999;
|
|
298
|
+
animation: djv-slide-up 0.3s ease-out;
|
|
299
|
+
padding-bottom: env(safe-area-inset-bottom, 0);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.djv-action-sheet-item {
|
|
303
|
+
display: flex;
|
|
304
|
+
align-items: center;
|
|
305
|
+
justify-content: center;
|
|
306
|
+
padding: 14px 16px;
|
|
307
|
+
font-size: 16px;
|
|
308
|
+
color: #333;
|
|
309
|
+
background-color: #fff;
|
|
310
|
+
border: none;
|
|
311
|
+
width: 100%;
|
|
312
|
+
cursor: pointer;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.djv-action-sheet-item:not(:last-child) {
|
|
316
|
+
border-bottom: 1px solid #eee;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.djv-action-sheet-item:active {
|
|
320
|
+
background-color: #f5f5f5;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.djv-action-sheet-item--destructive {
|
|
324
|
+
color: #e53e3e;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.djv-action-sheet-cancel {
|
|
328
|
+
margin-top: 8px;
|
|
329
|
+
font-weight: 500;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
@keyframes djv-slide-up {
|
|
333
|
+
from {
|
|
334
|
+
transform: translateY(100%);
|
|
335
|
+
}
|
|
336
|
+
to {
|
|
337
|
+
transform: translateY(0);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* ==================== Image Preview ==================== */
|
|
342
|
+
|
|
343
|
+
.djv-image-preview-overlay {
|
|
344
|
+
position: fixed;
|
|
345
|
+
inset: 0;
|
|
346
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
347
|
+
z-index: 9999;
|
|
348
|
+
display: flex;
|
|
349
|
+
align-items: center;
|
|
350
|
+
justify-content: center;
|
|
351
|
+
animation: djv-fade-in 0.2s ease-out;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.djv-image-preview-container {
|
|
355
|
+
width: 100%;
|
|
356
|
+
height: 100%;
|
|
357
|
+
display: flex;
|
|
358
|
+
align-items: center;
|
|
359
|
+
justify-content: center;
|
|
360
|
+
overflow: hidden;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.djv-image-preview-img {
|
|
364
|
+
max-width: 100%;
|
|
365
|
+
max-height: 100%;
|
|
366
|
+
object-fit: contain;
|
|
367
|
+
user-select: none;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.djv-image-preview-close {
|
|
371
|
+
position: absolute;
|
|
372
|
+
top: 16px;
|
|
373
|
+
right: 16px;
|
|
374
|
+
width: 40px;
|
|
375
|
+
height: 40px;
|
|
376
|
+
border: none;
|
|
377
|
+
background: rgba(255, 255, 255, 0.2);
|
|
378
|
+
border-radius: 50%;
|
|
379
|
+
color: white;
|
|
380
|
+
font-size: 24px;
|
|
381
|
+
cursor: pointer;
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
384
|
+
justify-content: center;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.djv-image-preview-close:hover {
|
|
388
|
+
background: rgba(255, 255, 255, 0.3);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.djv-image-preview-nav {
|
|
392
|
+
position: absolute;
|
|
393
|
+
top: 50%;
|
|
394
|
+
transform: translateY(-50%);
|
|
395
|
+
width: 48px;
|
|
396
|
+
height: 48px;
|
|
397
|
+
border: none;
|
|
398
|
+
background: rgba(255, 255, 255, 0.2);
|
|
399
|
+
border-radius: 50%;
|
|
400
|
+
color: white;
|
|
401
|
+
font-size: 20px;
|
|
402
|
+
cursor: pointer;
|
|
403
|
+
display: flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
justify-content: center;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.djv-image-preview-nav:hover {
|
|
409
|
+
background: rgba(255, 255, 255, 0.3);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.djv-image-preview-prev {
|
|
413
|
+
left: 16px;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.djv-image-preview-next {
|
|
417
|
+
right: 16px;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.djv-image-preview-counter {
|
|
421
|
+
position: absolute;
|
|
422
|
+
bottom: 24px;
|
|
423
|
+
left: 50%;
|
|
424
|
+
transform: translateX(-50%);
|
|
425
|
+
color: white;
|
|
426
|
+
font-size: 14px;
|
|
427
|
+
background: rgba(0, 0, 0, 0.5);
|
|
428
|
+
padding: 4px 12px;
|
|
429
|
+
border-radius: 16px;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/* ==================== Confirm Dialog ==================== */
|
|
433
|
+
|
|
434
|
+
.djv-confirm {
|
|
435
|
+
background: white;
|
|
436
|
+
border-radius: 12px;
|
|
437
|
+
width: 280px;
|
|
438
|
+
max-width: 90vw;
|
|
439
|
+
overflow: hidden;
|
|
440
|
+
animation: djv-scale-in 0.2s ease-out;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.djv-confirm-header {
|
|
444
|
+
padding: 20px 16px 12px;
|
|
445
|
+
text-align: center;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.djv-confirm-title {
|
|
449
|
+
font-size: 17px;
|
|
450
|
+
font-weight: 600;
|
|
451
|
+
color: #333;
|
|
452
|
+
margin: 0;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.djv-confirm-message {
|
|
456
|
+
font-size: 14px;
|
|
457
|
+
color: #666;
|
|
458
|
+
margin: 8px 0 0;
|
|
459
|
+
line-height: 1.5;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.djv-confirm-footer {
|
|
463
|
+
display: flex;
|
|
464
|
+
border-top: 1px solid #eee;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.djv-confirm-btn {
|
|
468
|
+
flex: 1;
|
|
469
|
+
padding: 12px;
|
|
470
|
+
font-size: 16px;
|
|
471
|
+
border: none;
|
|
472
|
+
background: none;
|
|
473
|
+
cursor: pointer;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.djv-confirm-btn:not(:last-child) {
|
|
477
|
+
border-right: 1px solid #eee;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.djv-confirm-btn--cancel {
|
|
481
|
+
color: #666;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.djv-confirm-btn--confirm {
|
|
485
|
+
color: #007bff;
|
|
486
|
+
font-weight: 500;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.djv-confirm-btn--danger {
|
|
490
|
+
color: #e53e3e;
|
|
491
|
+
font-weight: 500;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.djv-confirm-btn:active {
|
|
495
|
+
background-color: #f5f5f5;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/* ==================== Progress Bar ==================== */
|
|
499
|
+
|
|
500
|
+
.djv-progress {
|
|
501
|
+
width: 100%;
|
|
502
|
+
height: 4px;
|
|
503
|
+
background-color: #e5e5e5;
|
|
504
|
+
border-radius: 2px;
|
|
505
|
+
overflow: hidden;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.djv-progress-bar {
|
|
509
|
+
height: 100%;
|
|
510
|
+
background-color: #007bff;
|
|
511
|
+
border-radius: 2px;
|
|
512
|
+
transition: width 0.3s ease;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.djv-progress--indeterminate .djv-progress-bar {
|
|
516
|
+
width: 30%;
|
|
517
|
+
animation: djv-progress-indeterminate 1.5s infinite ease-in-out;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
@keyframes djv-progress-indeterminate {
|
|
521
|
+
0% {
|
|
522
|
+
transform: translateX(-100%);
|
|
523
|
+
}
|
|
524
|
+
100% {
|
|
525
|
+
transform: translateX(400%);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/* ==================== Badge ==================== */
|
|
530
|
+
|
|
531
|
+
.djv-badge {
|
|
532
|
+
display: inline-flex;
|
|
533
|
+
align-items: center;
|
|
534
|
+
justify-content: center;
|
|
535
|
+
min-width: 18px;
|
|
536
|
+
height: 18px;
|
|
537
|
+
padding: 0 6px;
|
|
538
|
+
font-size: 12px;
|
|
539
|
+
font-weight: 500;
|
|
540
|
+
color: white;
|
|
541
|
+
background-color: #e53e3e;
|
|
542
|
+
border-radius: 9px;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.djv-badge--dot {
|
|
546
|
+
min-width: 8px;
|
|
547
|
+
width: 8px;
|
|
548
|
+
height: 8px;
|
|
549
|
+
padding: 0;
|
|
550
|
+
border-radius: 50%;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/* ==================== Dark Theme ==================== */
|
|
554
|
+
|
|
555
|
+
@media (prefers-color-scheme: dark) {
|
|
556
|
+
.djv-runtime {
|
|
557
|
+
color: #e5e5e5;
|
|
558
|
+
background-color: #1a1a1a;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.djv-loading {
|
|
562
|
+
color: #999;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.djv-loading-spinner {
|
|
566
|
+
border-color: #333;
|
|
567
|
+
border-top-color: #007bff;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.djv-error {
|
|
571
|
+
background-color: #2d1f1f;
|
|
572
|
+
border-color: #5c2626;
|
|
573
|
+
color: #fc8181;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.djv-error-retry {
|
|
577
|
+
background-color: #c53030;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.djv-error-retry:hover {
|
|
581
|
+
background-color: #9b2c2c;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.djv-fallback {
|
|
585
|
+
background-color: #1e1e1e;
|
|
586
|
+
border-color: #333;
|
|
587
|
+
color: #888;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.djv-dialog {
|
|
591
|
+
background-color: #2d2d2d;
|
|
592
|
+
color: #e5e5e5;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.djv-loading-overlay {
|
|
596
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.djv-skeleton {
|
|
600
|
+
background: linear-gradient(90deg, #2d2d2d 25%, #3d3d3d 50%, #2d2d2d 75%);
|
|
601
|
+
background-size: 200% 100%;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.djv-action-sheet {
|
|
605
|
+
background-color: #1a1a1a;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.djv-action-sheet-item {
|
|
609
|
+
background-color: #2d2d2d;
|
|
610
|
+
color: #e5e5e5;
|
|
611
|
+
border-bottom-color: #333;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.djv-action-sheet-item:active {
|
|
615
|
+
background-color: #333;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.djv-confirm {
|
|
619
|
+
background-color: #2d2d2d;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.djv-confirm-title {
|
|
623
|
+
color: #e5e5e5;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.djv-confirm-message {
|
|
627
|
+
color: #999;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.djv-confirm-footer {
|
|
631
|
+
border-top-color: #333;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.djv-confirm-btn:not(:last-child) {
|
|
635
|
+
border-right-color: #333;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.djv-confirm-btn--cancel {
|
|
639
|
+
color: #999;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.djv-confirm-btn:active {
|
|
643
|
+
background-color: #333;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.djv-progress {
|
|
647
|
+
background-color: #333;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
228
651
|
/* ==================== Responsive ==================== */
|
|
229
652
|
|
|
230
653
|
@media (max-width: 640px) {
|
|
@@ -243,4 +666,21 @@
|
|
|
243
666
|
margin: 16px;
|
|
244
667
|
max-width: calc(100vw - 32px);
|
|
245
668
|
}
|
|
669
|
+
|
|
670
|
+
.djv-confirm {
|
|
671
|
+
width: 90vw;
|
|
672
|
+
max-width: 320px;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/* ==================== Safe Area ==================== */
|
|
677
|
+
|
|
678
|
+
@supports (padding-bottom: env(safe-area-inset-bottom)) {
|
|
679
|
+
.djv-toast-container {
|
|
680
|
+
bottom: calc(16px + env(safe-area-inset-bottom));
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.djv-action-sheet {
|
|
684
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
685
|
+
}
|
|
246
686
|
}
|