@youtyan/code-viewer 0.1.32 → 0.1.33

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.32",
3
+ "version": "0.1.33",
4
4
  "description": "Local browser-based code and git diff viewer",
5
5
  "type": "module",
6
6
  "bin": {
package/web/app.js CHANGED
@@ -8644,9 +8644,12 @@ ${frontmatter.yaml}
8644
8644
  return false;
8645
8645
  clearDiffLineFocus();
8646
8646
  row.classList.add("gdp-diff-line-target");
8647
- row.scrollIntoView({ behavior: "smooth", block: "center" });
8647
+ scrollDiffElementIntoView(row, "center");
8648
8648
  return true;
8649
8649
  }
8650
+ function scrollDiffElementIntoView(element, block2) {
8651
+ element.scrollIntoView({ behavior: "auto", block: block2 });
8652
+ }
8650
8653
  function applyDiffRouteFocus(card) {
8651
8654
  if (STATE.route.screen !== "diff" || !STATE.route.path || !STATE.route.line)
8652
8655
  return false;
@@ -8674,7 +8677,7 @@ ${frontmatter.yaml}
8674
8677
  enqueueLoad(f2, card, 10);
8675
8678
  }
8676
8679
  if (!line || !focusDiffLine(card, line)) {
8677
- card.scrollIntoView({ behavior: "smooth", block: "start" });
8680
+ scrollDiffElementIntoView(card, "start");
8678
8681
  }
8679
8682
  }
8680
8683
  function sidebarAncestorDirs(path) {
package/web/style.css CHANGED
@@ -1640,6 +1640,12 @@ body.gdp-help-page #content {
1640
1640
 
1641
1641
  #diff > *:first-child { margin-top: 0; }
1642
1642
 
1643
+ body:not(.gdp-file-detail-page) #diff::after {
1644
+ content: "";
1645
+ display: block;
1646
+ height: calc(100vh - var(--chrome-h) - 40px);
1647
+ }
1648
+
1643
1649
  .empty {
1644
1650
  display: flex; flex-direction: column; align-items: center; justify-content: center;
1645
1651
  padding: 80px 16px; color: var(--fg-muted); text-align: center;