@open-file-viewer/core 0.1.4 → 0.1.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.
package/dist/style.css CHANGED
@@ -1107,6 +1107,16 @@
1107
1107
  overflow-wrap: anywhere;
1108
1108
  }
1109
1109
 
1110
+ .ofv-pptx-viewer svg {
1111
+ width: auto;
1112
+ height: auto;
1113
+ fill: initial;
1114
+ stroke: initial;
1115
+ stroke-linecap: initial;
1116
+ stroke-linejoin: initial;
1117
+ stroke-width: initial;
1118
+ }
1119
+
1110
1120
  .ofv-presentation-summary {
1111
1121
  display: grid;
1112
1122
  min-width: 0;
@@ -1573,58 +1583,60 @@
1573
1583
  margin-top: 12px;
1574
1584
  }
1575
1585
 
1576
- .ofv-ofd-pages {
1577
- display: grid;
1578
- gap: 18px;
1586
+ .ofv-ofd {
1587
+ --ofv-ofd-zoom: 1;
1588
+ --ofv-ofd-rotation: 0deg;
1589
+ height: 100%;
1579
1590
  min-width: 0;
1580
- margin: 12px 0;
1591
+ min-height: 0;
1592
+ padding: 0;
1593
+ overflow: auto;
1594
+ background: var(--ofv-bg);
1581
1595
  }
1582
1596
 
1583
- .ofv-ofd-summary {
1584
- display: flex;
1585
- flex-wrap: wrap;
1586
- gap: 8px 14px;
1587
- min-width: 0;
1588
- margin: 0 0 12px;
1589
- padding: 8px 10px;
1590
- border: 1px solid var(--ofv-border);
1591
- border-radius: 6px;
1592
- background: var(--ofv-surface-muted);
1593
- color: var(--ofv-text-muted);
1594
- font-size: 12px;
1597
+ .ofv-ofd-pages {
1598
+ display: grid;
1599
+ gap: 18px;
1600
+ width: max-content;
1601
+ min-width: 100%;
1602
+ margin: 0;
1603
+ padding: 16px;
1604
+ justify-items: center;
1605
+ overscroll-behavior: contain;
1595
1606
  }
1596
1607
 
1597
- .ofv-ofd-summary > span {
1598
- display: inline-flex;
1599
- gap: 5px;
1608
+ .ofv-ofd-page {
1609
+ width: min(100%, calc(var(--ofv-ofd-page-width, 210mm) * var(--ofv-ofd-zoom)));
1610
+ aspect-ratio: var(--ofv-ofd-page-width, 210mm) / var(--ofv-ofd-page-height, 297mm);
1600
1611
  min-width: 0;
1612
+ margin: 0;
1601
1613
  }
1602
1614
 
1603
- .ofv-ofd-summary strong {
1604
- color: var(--ofv-text);
1605
- font-weight: 600;
1606
- overflow-wrap: anywhere;
1607
- }
1608
-
1609
- .ofv-ofd-page {
1610
- margin: 0;
1615
+ .ofv-ofd.is-ofd-rotated-sideways .ofv-ofd-page {
1616
+ width: min(100%, calc(var(--ofv-ofd-page-height, 297mm) * var(--ofv-ofd-zoom)));
1617
+ aspect-ratio: var(--ofv-ofd-page-height, 297mm) / var(--ofv-ofd-page-width, 210mm);
1611
1618
  }
1612
1619
 
1613
1620
  .ofv-ofd-page svg {
1614
1621
  display: block;
1615
- width: min(100%, 760px);
1622
+ width: 100%;
1616
1623
  max-width: 100%;
1617
- max-height: 760px;
1624
+ height: 100%;
1625
+ max-height: none;
1618
1626
  border: 1px solid var(--ofv-border);
1619
1627
  border-radius: 6px;
1620
1628
  background: #fff;
1621
1629
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
1630
+ transform: rotate(var(--ofv-ofd-rotation));
1631
+ transform-origin: center;
1622
1632
  }
1623
1633
 
1624
- .ofv-ofd-page figcaption {
1625
- margin-top: 8px;
1626
- color: var(--ofv-text-muted);
1627
- font-size: 12px;
1634
+ .ofv-ofd-page svg {
1635
+ fill: revert;
1636
+ stroke: revert;
1637
+ stroke-linecap: revert;
1638
+ stroke-linejoin: revert;
1639
+ stroke-width: revert;
1628
1640
  }
1629
1641
 
1630
1642
  .ofv-model-stage {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-file-viewer/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Framework-agnostic browser file preview core.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,10 +33,6 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "scripts": {
37
- "build": "tsup src/index.ts --format esm,cjs --dts --sourcemap --clean && cp src/style.css dist/style.css",
38
- "typecheck": "tsc --noEmit"
39
- },
40
36
  "peerDependenciesMeta": {
41
37
  "pdfjs-dist": {
42
38
  "optional": true
@@ -74,5 +70,9 @@
74
70
  "three": "^0.184.0",
75
71
  "topojson-client": "^3.1.0",
76
72
  "xlsx": "^0.18.5"
73
+ },
74
+ "scripts": {
75
+ "build": "tsup src/index.ts --format esm,cjs --dts --sourcemap --clean && node ../../scripts/copy-file.mjs src/style.css dist/style.css",
76
+ "typecheck": "tsc --noEmit"
77
77
  }
78
- }
78
+ }