@open-file-viewer/core 0.1.15 → 0.1.16

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/style.css CHANGED
@@ -306,21 +306,39 @@
306
306
  justify-content: center;
307
307
  min-height: min(320px, 55vh);
308
308
  min-width: 0;
309
- overflow: hidden;
309
+ overflow: auto;
310
310
  cursor: grab;
311
311
  touch-action: none;
312
312
  }
313
313
 
314
+ .ofv-image-stage-pages {
315
+ align-items: flex-start;
316
+ justify-content: center;
317
+ overflow: auto;
318
+ padding: 24px;
319
+ }
320
+
314
321
  .ofv-image-stage.is-dragging {
315
322
  cursor: grabbing;
316
323
  }
317
324
 
325
+ .ofv-image-scrollbox {
326
+ display: flex;
327
+ flex: 0 0 auto;
328
+ align-items: center;
329
+ justify-content: center;
330
+ min-width: 0;
331
+ min-height: 0;
332
+ max-width: none;
333
+ max-height: none;
334
+ }
335
+
318
336
  .ofv-image-content {
319
337
  width: auto;
320
338
  height: auto;
321
339
  max-width: 100%;
322
340
  max-height: 100%;
323
- transform-origin: center;
341
+ transform-origin: top left;
324
342
  transition: transform 120ms ease;
325
343
  will-change: transform;
326
344
  user-select: none;
@@ -330,6 +348,41 @@
330
348
  transition: none;
331
349
  }
332
350
 
351
+ .ofv-tiff-pages {
352
+ display: grid;
353
+ gap: 18px;
354
+ width: max-content;
355
+ max-width: 100%;
356
+ height: auto;
357
+ transform-origin: top center;
358
+ }
359
+
360
+ .ofv-tiff-page {
361
+ display: grid;
362
+ gap: 8px;
363
+ margin: 0;
364
+ justify-items: center;
365
+ }
366
+
367
+ .ofv-tiff-canvas {
368
+ display: block;
369
+ max-width: 100%;
370
+ height: auto;
371
+ border: 1px solid var(--ofv-border);
372
+ border-radius: 4px;
373
+ background: var(--ofv-surface);
374
+ box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
375
+ }
376
+
377
+ .ofv-tiff-page figcaption {
378
+ max-width: 100%;
379
+ color: var(--ofv-text-muted);
380
+ font-size: 12px;
381
+ line-height: 1.4;
382
+ text-align: center;
383
+ overflow-wrap: anywhere;
384
+ }
385
+
333
386
  .ofv-image-info {
334
387
  display: flex;
335
388
  flex: 0 0 auto;
@@ -413,7 +466,7 @@
413
466
  min-width: 0;
414
467
  min-height: 100%;
415
468
  padding: 16px;
416
- overflow-x: hidden;
469
+ overflow-x: auto;
417
470
  overflow-y: auto;
418
471
  background: #6b7280;
419
472
  }
@@ -745,6 +798,19 @@
745
798
  overflow-wrap: anywhere;
746
799
  }
747
800
 
801
+ .ofv-docx-chart-preview {
802
+ min-width: 0;
803
+ overflow: hidden;
804
+ background: #fff;
805
+ }
806
+
807
+ .ofv-docx-chart-preview .ofv-chart-svg {
808
+ width: 100%;
809
+ height: 100%;
810
+ min-height: 0;
811
+ padding: 0;
812
+ }
813
+
748
814
  .ofv-docx-fallback-note {
749
815
  margin: 0 0 12px;
750
816
  padding: 8px 10px;
@@ -1402,9 +1468,19 @@
1402
1468
  stroke-width: 1.5;
1403
1469
  }
1404
1470
 
1471
+ .ofv-chart-gridline {
1472
+ stroke: #d9d9d9;
1473
+ stroke-width: 1;
1474
+ }
1475
+
1476
+ .ofv-chart-title {
1477
+ fill: #595959;
1478
+ font: 20px/1 Calibri, Arial, sans-serif;
1479
+ }
1480
+
1405
1481
  .ofv-chart-label {
1406
- fill: var(--ofv-text-muted);
1407
- font: 12px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
1482
+ fill: #595959;
1483
+ font: 12px/1 Calibri, Arial, sans-serif;
1408
1484
  }
1409
1485
 
1410
1486
  .ofv-chart-data {
@@ -3370,6 +3446,200 @@
3370
3446
  word-break: break-word;
3371
3447
  }
3372
3448
 
3449
+ .ofv-code-container .token.comment,
3450
+ .ofv-code-container .token.prolog,
3451
+ .ofv-code-container .token.doctype,
3452
+ .ofv-code-container .token.cdata,
3453
+ .ofv-markdown-body pre .token.comment,
3454
+ .ofv-markdown-body pre .token.prolog,
3455
+ .ofv-markdown-body pre .token.doctype,
3456
+ .ofv-markdown-body pre .token.cdata {
3457
+ color: #6b7280;
3458
+ }
3459
+
3460
+ .ofv-code-container .token.punctuation,
3461
+ .ofv-markdown-body pre .token.punctuation {
3462
+ color: #64748b;
3463
+ }
3464
+
3465
+ .ofv-code-container .token.namespace,
3466
+ .ofv-markdown-body pre .token.namespace {
3467
+ opacity: 0.72;
3468
+ }
3469
+
3470
+ .ofv-code-container .token.property,
3471
+ .ofv-code-container .token.tag,
3472
+ .ofv-code-container .token.boolean,
3473
+ .ofv-code-container .token.number,
3474
+ .ofv-code-container .token.constant,
3475
+ .ofv-code-container .token.symbol,
3476
+ .ofv-code-container .token.deleted,
3477
+ .ofv-markdown-body pre .token.property,
3478
+ .ofv-markdown-body pre .token.tag,
3479
+ .ofv-markdown-body pre .token.boolean,
3480
+ .ofv-markdown-body pre .token.number,
3481
+ .ofv-markdown-body pre .token.constant,
3482
+ .ofv-markdown-body pre .token.symbol,
3483
+ .ofv-markdown-body pre .token.deleted {
3484
+ color: #b45309;
3485
+ }
3486
+
3487
+ .ofv-code-container .token.selector,
3488
+ .ofv-code-container .token.attr-name,
3489
+ .ofv-code-container .token.string,
3490
+ .ofv-code-container .token.char,
3491
+ .ofv-code-container .token.builtin,
3492
+ .ofv-code-container .token.inserted,
3493
+ .ofv-markdown-body pre .token.selector,
3494
+ .ofv-markdown-body pre .token.attr-name,
3495
+ .ofv-markdown-body pre .token.string,
3496
+ .ofv-markdown-body pre .token.char,
3497
+ .ofv-markdown-body pre .token.builtin,
3498
+ .ofv-markdown-body pre .token.inserted {
3499
+ color: #15803d;
3500
+ }
3501
+
3502
+ .ofv-code-container .token.operator,
3503
+ .ofv-code-container .token.entity,
3504
+ .ofv-code-container .token.url,
3505
+ .ofv-code-container .language-css .token.string,
3506
+ .ofv-code-container .style .token.string,
3507
+ .ofv-markdown-body pre .token.operator,
3508
+ .ofv-markdown-body pre .token.entity,
3509
+ .ofv-markdown-body pre .token.url,
3510
+ .ofv-markdown-body pre .language-css .token.string,
3511
+ .ofv-markdown-body pre .style .token.string {
3512
+ color: #0369a1;
3513
+ }
3514
+
3515
+ .ofv-code-container .token.atrule,
3516
+ .ofv-code-container .token.attr-value,
3517
+ .ofv-code-container .token.keyword,
3518
+ .ofv-markdown-body pre .token.atrule,
3519
+ .ofv-markdown-body pre .token.attr-value,
3520
+ .ofv-markdown-body pre .token.keyword {
3521
+ color: #7c3aed;
3522
+ }
3523
+
3524
+ .ofv-code-container .token.function,
3525
+ .ofv-code-container .token.class-name,
3526
+ .ofv-markdown-body pre .token.function,
3527
+ .ofv-markdown-body pre .token.class-name {
3528
+ color: #2563eb;
3529
+ }
3530
+
3531
+ .ofv-code-container .token.regex,
3532
+ .ofv-code-container .token.important,
3533
+ .ofv-code-container .token.variable,
3534
+ .ofv-markdown-body pre .token.regex,
3535
+ .ofv-markdown-body pre .token.important,
3536
+ .ofv-markdown-body pre .token.variable {
3537
+ color: #be123c;
3538
+ }
3539
+
3540
+ .ofv-code-container .token.important,
3541
+ .ofv-code-container .token.bold,
3542
+ .ofv-markdown-body pre .token.important,
3543
+ .ofv-markdown-body pre .token.bold {
3544
+ font-weight: 600;
3545
+ }
3546
+
3547
+ .ofv-code-container .token.italic,
3548
+ .ofv-markdown-body pre .token.italic {
3549
+ font-style: italic;
3550
+ }
3551
+
3552
+ .ofv-code-container .token.entity,
3553
+ .ofv-markdown-body pre .token.entity {
3554
+ cursor: help;
3555
+ }
3556
+
3557
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.comment,
3558
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.prolog,
3559
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.doctype,
3560
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.cdata,
3561
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.comment,
3562
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.prolog,
3563
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.doctype,
3564
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.cdata {
3565
+ color: #94a3b8;
3566
+ }
3567
+
3568
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.punctuation,
3569
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.punctuation {
3570
+ color: #cbd5e1;
3571
+ }
3572
+
3573
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.property,
3574
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.tag,
3575
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.boolean,
3576
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.number,
3577
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.constant,
3578
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.symbol,
3579
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.deleted,
3580
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.property,
3581
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.tag,
3582
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.boolean,
3583
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.number,
3584
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.constant,
3585
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.symbol,
3586
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.deleted {
3587
+ color: #fbbf24;
3588
+ }
3589
+
3590
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.selector,
3591
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.attr-name,
3592
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.string,
3593
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.char,
3594
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.builtin,
3595
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.inserted,
3596
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.selector,
3597
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.attr-name,
3598
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.string,
3599
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.char,
3600
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.builtin,
3601
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.inserted {
3602
+ color: #86efac;
3603
+ }
3604
+
3605
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.operator,
3606
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.entity,
3607
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.url,
3608
+ .ofv-root.ofv-theme-dark .ofv-code-container .language-css .token.string,
3609
+ .ofv-root.ofv-theme-dark .ofv-code-container .style .token.string,
3610
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.operator,
3611
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.entity,
3612
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.url,
3613
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .language-css .token.string,
3614
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .style .token.string {
3615
+ color: #7dd3fc;
3616
+ }
3617
+
3618
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.atrule,
3619
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.attr-value,
3620
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.keyword,
3621
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.atrule,
3622
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.attr-value,
3623
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.keyword {
3624
+ color: #c4b5fd;
3625
+ }
3626
+
3627
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.function,
3628
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.class-name,
3629
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.function,
3630
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.class-name {
3631
+ color: #93c5fd;
3632
+ }
3633
+
3634
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.regex,
3635
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.important,
3636
+ .ofv-root.ofv-theme-dark .ofv-code-container .token.variable,
3637
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.regex,
3638
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.important,
3639
+ .ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.variable {
3640
+ color: #fda4af;
3641
+ }
3642
+
3373
3643
  @media (max-width: 640px) {
3374
3644
  .ofv-code-header {
3375
3645
  align-items: stretch;
@@ -3549,7 +3819,6 @@
3549
3819
  /* PDF lazy loading elements */
3550
3820
  .ofv-pdf-page-wrapper {
3551
3821
  margin: 16px auto;
3552
- max-width: 100%;
3553
3822
  min-width: 0;
3554
3823
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
3555
3824
  border: 1px solid var(--ofv-border);
@@ -3632,12 +3901,15 @@
3632
3901
  line-height: 1;
3633
3902
  pointer-events: none;
3634
3903
  user-select: text;
3904
+ -webkit-text-size-adjust: none;
3905
+ text-size-adjust: none;
3635
3906
  }
3636
3907
 
3637
3908
  .ofv-pdf-text-layer span {
3638
3909
  color: transparent;
3639
3910
  position: absolute;
3640
3911
  white-space: pre;
3912
+ line-height: 1;
3641
3913
  cursor: text;
3642
3914
  transform-origin: 0% 0%;
3643
3915
  pointer-events: auto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-file-viewer/core",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Framework-agnostic browser file preview core.",
5
5
  "license": "MIT",
6
6
  "type": "module",