@git-diff-view/react 0.0.33 → 0.0.34

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.
@@ -197,11 +197,12 @@ const getElementRoot = (element) => {
197
197
  return document;
198
198
  };
199
199
  const getDiffIdFromElement = (element) => {
200
+ var _a, _b;
200
201
  if (element) {
201
202
  if (typeof element.closest === "function") {
202
203
  const diffRoot = element.closest('[data-component="git-diff-view"]');
203
- const ele = diffRoot.querySelector(".diff-view-wrapper");
204
- return ele.getAttribute("id");
204
+ const ele = (_a = diffRoot === null || diffRoot === void 0 ? void 0 : diffRoot.querySelector) === null || _a === void 0 ? void 0 : _a.call(diffRoot, ".diff-view-wrapper");
205
+ return (_b = ele === null || ele === void 0 ? void 0 : ele.getAttribute) === null || _b === void 0 ? void 0 : _b.call(ele, "id");
205
206
  }
206
207
  else {
207
208
  let el = element;
@@ -1868,7 +1869,7 @@ const InternalDiffView = (props) => {
1868
1869
  }, [useDiffContext, wrapperRef]);
1869
1870
  const value = useMemo(() => ({ useDiffContext }), [useDiffContext]);
1870
1871
  return (React.createElement(DiffViewContext.Provider, { value: value },
1871
- React.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0.33", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef },
1872
+ React.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 },
1872
1873
  React.createElement("div", { className: "diff-style-root", style: {
1873
1874
  // @ts-ignore
1874
1875
  [diffFontSizeName]: diffViewFontSize + "px",
@@ -1947,7 +1948,7 @@ const DiffViewWithRef = (props, ref) => {
1947
1948
  const InnerDiffView = forwardRef(DiffViewWithRef);
1948
1949
  InnerDiffView.displayName = "DiffView";
1949
1950
  const DiffView = InnerDiffView;
1950
- const version = "0.0.33";
1951
+ const version = "0.0.34";
1951
1952
 
1952
1953
  export { DiffModeEnum, DiffView, version };
1953
1954
  //# sourceMappingURL=index.mjs.map