@youtyan/code-viewer 0.1.50 → 0.1.51

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youtyan/code-viewer",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "description": "Local browser-based code and git diff viewer",
5
5
  "type": "module",
6
6
  "bin": {
package/web/app.js CHANGED
@@ -15310,6 +15310,7 @@ ${frontmatter.yaml}
15310
15310
  const isStandalone = card.classList.contains("gdp-standalone-source");
15311
15311
  const view = document.createElement("div");
15312
15312
  view.className = "gdp-source-viewer media";
15313
+ view.classList.add(mediaKind);
15313
15314
  if (!isStandalone) {
15314
15315
  const meta = document.createElement("div");
15315
15316
  meta.className = "gdp-source-meta";
package/web/style.css CHANGED
@@ -2546,6 +2546,11 @@ table.d2h-diff-table td.d2h-code-side-linenumber {
2546
2546
  .gdp-source-viewer.media {
2547
2547
  padding: 16px;
2548
2548
  }
2549
+ .gdp-source-viewer.media.pdf {
2550
+ display: flex;
2551
+ flex-direction: column;
2552
+ overflow: hidden;
2553
+ }
2549
2554
  .gdp-source-file-info {
2550
2555
  display: flex;
2551
2556
  flex-wrap: wrap;
@@ -2579,6 +2584,11 @@ table.d2h-diff-table td.d2h-code-side-linenumber {
2579
2584
  border: 0;
2580
2585
  background: var(--bg);
2581
2586
  }
2587
+ .gdp-source-viewer.media.pdf iframe {
2588
+ flex: 1 1 auto;
2589
+ height: max(520px, calc(100vh - var(--global-header-h) - 164px));
2590
+ min-height: 0;
2591
+ }
2582
2592
  .gdp-source-meta {
2583
2593
  padding: 8px 12px;
2584
2594
  border-bottom: 1px solid var(--border-muted);