@git-diff-view/react 0.0.34 → 0.0.35

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.
@@ -784,8 +784,8 @@ const InternalDiffSplitHunkLineGitLab = ({ index, diffFile, side, lineNumber, })
784
784
  const expandEnabled = diffFile.getExpandEnabled();
785
785
  useSyncHeight({
786
786
  selector: `tr[data-line="${lineNumber}-hunk"]`,
787
- side: core.SplitSide[side],
788
- enable: true,
787
+ side: core.SplitSide[core.SplitSide.old],
788
+ enable: side === core.SplitSide.new,
789
789
  });
790
790
  const couldExpand = expandEnabled && currentHunk && currentHunk.splitInfo;
791
791
  const isExpandAll = currentHunk &&
@@ -1584,7 +1584,7 @@ const InternalDiffUnifiedExtendLine = ({ index, diffFile, lineNumber, enableWrap
1584
1584
  // TODO use css variable to get width
1585
1585
  const width = useDomWidth({
1586
1586
  selector: ".unified-diff-table-wrapper",
1587
- enable: typeof renderExtendLine === "function" && !enableWrap,
1587
+ enable: typeof renderExtendLine === "function",
1588
1588
  });
1589
1589
  if (!renderExtendLine)
1590
1590
  return null;
@@ -1687,7 +1687,7 @@ const InternalDiffUnifiedWidgetLine = ({ index, diffFile, lineNumber, enableWrap
1687
1687
  const renderWidgetLine = useDiffContext.useShallowStableSelector((s) => s.renderWidgetLine);
1688
1688
  const width = useDomWidth({
1689
1689
  selector: ".unified-diff-table-wrapper",
1690
- enable: typeof renderWidgetLine === "function" && !enableWrap,
1690
+ enable: typeof renderWidgetLine === "function",
1691
1691
  });
1692
1692
  if (!renderWidgetLine)
1693
1693
  return null;
@@ -1887,7 +1887,7 @@ const InternalDiffView = (props) => {
1887
1887
  }, [useDiffContext, wrapperRef]);
1888
1888
  const value = React.useMemo(() => ({ useDiffContext }), [useDiffContext]);
1889
1889
  return (React__namespace.createElement(DiffViewContext.Provider, { value: value },
1890
- React__namespace.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0.34", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef },
1890
+ React__namespace.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0.35", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef },
1891
1891
  React__namespace.createElement("div", { className: "diff-style-root", style: {
1892
1892
  // @ts-ignore
1893
1893
  [diffFontSizeName]: diffViewFontSize + "px",
@@ -1966,7 +1966,7 @@ const DiffViewWithRef = (props, ref) => {
1966
1966
  const InnerDiffView = React.forwardRef(DiffViewWithRef);
1967
1967
  InnerDiffView.displayName = "DiffView";
1968
1968
  const DiffView = InnerDiffView;
1969
- const version = "0.0.34";
1969
+ const version = "0.0.35";
1970
1970
 
1971
1971
  Object.defineProperty(exports, "SplitSide", {
1972
1972
  enumerable: true,