@git-diff-view/react 0.0.35 → 0.0.37

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.
@@ -150,8 +150,6 @@ const expandLineNumberBGName = "--diff-expand-lineNumber--";
150
150
  const hunkContentBGName = "--diff-hunk-content--";
151
151
  const hunkContentColorName = "--diff-hunk-content-color--";
152
152
  const hunkLineNumberBGName = "--diff-hunk-lineNumber--";
153
- const addContentHighlightBGName = "--diff-add-content-highlight--";
154
- const delContentHighlightBGName = "--diff-del-content-highlight--";
155
153
  const addWidgetBGName = "--diff-add-widget--";
156
154
  const addWidgetColorName = "--diff-add-widget-color--";
157
155
  const emptyBGName = "--diff-empty-content--";
@@ -175,10 +173,8 @@ const getLineNumberBG = (isAdded, isDelete, hasDiff) => {
175
173
  };
176
174
 
177
175
  const removeAllSelection = () => {
178
- const selection = window.getSelection();
179
- for (let i = 0; i < selection.rangeCount; i++) {
180
- selection.removeRange(selection.getRangeAt(i));
181
- }
176
+ var _a;
177
+ (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
182
178
  };
183
179
  const syncScroll = (left, right) => {
184
180
  const onScroll = function (event) {
@@ -260,18 +256,6 @@ var NewLineSymbol;
260
256
  NewLineSymbol[NewLineSymbol["NORMAL"] = 5] = "NORMAL";
261
257
  NewLineSymbol[NewLineSymbol["NULL"] = 6] = "NULL";
262
258
  })(NewLineSymbol || (NewLineSymbol = {}));
263
- const getSymbol = (symbol) => {
264
- switch (symbol) {
265
- case NewLineSymbol.LF:
266
- return "␊";
267
- case NewLineSymbol.CR:
268
- return "␍";
269
- case NewLineSymbol.CRLF:
270
- return "␍␊";
271
- default:
272
- return "";
273
- }
274
- };
275
259
  exports.DiffModeEnum = void 0;
276
260
  (function (DiffModeEnum) {
277
261
  // github like
@@ -315,7 +299,7 @@ const useTextWidth = ({ text, font, }) => {
315
299
  };
316
300
 
317
301
  const DiffSplitAddWidget = ({ side, className, lineNumber, onWidgetClick, onOpenAddWidget, }) => {
318
- return (React__namespace.createElement("div", { className: "diff-add-widget-wrapper invisible select-none transition-transform hover:scale-110 group-hover:visible" +
302
+ return (React__namespace.createElement("div", { "data-add-widget": core.SplitSide[side], className: "diff-add-widget-wrapper invisible select-none transition-transform hover:scale-110 group-hover:visible" +
319
303
  (className ? " " + className : ""), style: {
320
304
  width: `calc(var(${diffFontSizeName}) * 1.4)`,
321
305
  height: `calc(var(${diffFontSizeName}) * 1.4)`,
@@ -330,7 +314,7 @@ const DiffSplitAddWidget = ({ side, className, lineNumber, onWidgetClick, onOpen
330
314
  } }, "+")));
331
315
  };
332
316
  const DiffUnifiedAddWidget = ({ lineNumber, side, onWidgetClick, onOpenAddWidget, }) => {
333
- return (React__namespace.createElement("div", { className: "diff-add-widget-wrapper invisible absolute left-[100%] translate-x-[-50%] select-none transition-transform hover:scale-110 group-hover:visible", style: {
317
+ return (React__namespace.createElement("div", { "data-add-widget": core.SplitSide[side], className: "diff-add-widget-wrapper invisible absolute left-[100%] translate-x-[-50%] select-none transition-transform hover:scale-110 group-hover:visible", style: {
334
318
  width: `calc(var(${diffFontSizeName}) * 1.4)`,
335
319
  height: `calc(var(${diffFontSizeName}) * 1.4)`,
336
320
  top: `calc(var(${diffFontSizeName}) * 0.1)`,
@@ -377,14 +361,14 @@ const getStyleObjectFromString = memoFunc((str) => {
377
361
  });
378
362
  return style;
379
363
  });
380
- const DiffString = ({ rawLine, diffLine, operator, plainLine, enableWrap, enableTemplate, }) => {
364
+ const DiffString = ({ rawLine, diffLine, operator, plainLine, enableWrap, }) => {
381
365
  const changes = diffLine === null || diffLine === void 0 ? void 0 : diffLine.changes;
382
366
  if (changes === null || changes === void 0 ? void 0 : changes.hasLineChange) {
383
367
  const isNewLineSymbolChanged = changes.newLineSymbol;
384
- if (enableTemplate && !(diffLine === null || diffLine === void 0 ? void 0 : diffLine.plainTemplate) && typeof core.getPlainDiffTemplate === "function") {
368
+ if (!(diffLine === null || diffLine === void 0 ? void 0 : diffLine.plainTemplate) && typeof core.getPlainDiffTemplate === "function") {
385
369
  core.getPlainDiffTemplate({ diffLine, rawLine, operator });
386
370
  }
387
- if (enableTemplate && (diffLine === null || diffLine === void 0 ? void 0 : diffLine.plainTemplate)) {
371
+ if (diffLine === null || diffLine === void 0 ? void 0 : diffLine.plainTemplate) {
388
372
  return (React__namespace.createElement("span", { className: "diff-line-content-raw" },
389
373
  React__namespace.createElement("span", { "data-template": true, dangerouslySetInnerHTML: { __html: diffLine.plainTemplate } }),
390
374
  isNewLineSymbolChanged === NewLineSymbol.NEWLINE && (React__namespace.createElement("span", { "data-no-newline-at-end-of-file-symbol": true, className: enableWrap ? "block !text-red-500" : "inline-block align-middle !text-red-500", style: {
@@ -393,51 +377,28 @@ const DiffString = ({ rawLine, diffLine, operator, plainLine, enableWrap, enable
393
377
  } },
394
378
  React__namespace.createElement(DiffNoNewLine, null)))));
395
379
  }
396
- else {
397
- // TODO remove
398
- const range = changes.range;
399
- const str1 = rawLine.slice(0, range.location);
400
- const str2 = rawLine.slice(range.location, range.location + range.length);
401
- const str3 = rawLine.slice(range.location + range.length);
402
- const isLast = str2.includes("\n");
403
- const _str2 = isLast ? str2.replace("\n", "").replace("\r", "") : str2;
404
- return (React__namespace.createElement("span", { className: "diff-line-content-raw" },
405
- React__namespace.createElement("span", { "data-range-start": range.location, "data-range-end": range.location + range.length },
406
- str1,
407
- React__namespace.createElement("span", { "data-diff-highlight": true, className: "rounded-[0.2em]", style: {
408
- backgroundColor: operator === "add" ? `var(${addContentHighlightBGName})` : `var(${delContentHighlightBGName})`,
409
- } }, isLast ? (React__namespace.createElement(React__namespace.Fragment, null,
410
- _str2,
411
- React__namespace.createElement("span", { "data-newline-symbol": true }, getSymbol(isNewLineSymbolChanged)))) : (str2)),
412
- str3),
413
- isNewLineSymbolChanged === NewLineSymbol.NEWLINE && (React__namespace.createElement("span", { "data-no-newline-at-end-of-file-symbol": true, className: enableWrap ? "block !text-red-500" : "inline-block align-middle !text-red-500", style: {
414
- width: `var(${diffFontSizeName})`,
415
- height: `var(${diffFontSizeName})`,
416
- } },
417
- React__namespace.createElement(DiffNoNewLine, null)))));
418
- }
419
380
  }
420
- if (enableTemplate && plainLine && !(plainLine === null || plainLine === void 0 ? void 0 : plainLine.template)) {
381
+ if (plainLine && !(plainLine === null || plainLine === void 0 ? void 0 : plainLine.template)) {
421
382
  plainLine.template = core.getPlainLineTemplate(plainLine.value);
422
383
  }
423
- if (enableTemplate && (plainLine === null || plainLine === void 0 ? void 0 : plainLine.template)) {
384
+ if (plainLine === null || plainLine === void 0 ? void 0 : plainLine.template) {
424
385
  return (React__namespace.createElement("span", { className: "diff-line-content-raw" },
425
386
  React__namespace.createElement("span", { "data-template": true, dangerouslySetInnerHTML: { __html: plainLine.template } })));
426
387
  }
427
388
  return React__namespace.createElement("span", { className: "diff-line-content-raw" }, rawLine);
428
389
  };
429
- const DiffSyntax = ({ rawLine, diffLine, operator, syntaxLine, enableWrap, enableTemplate, }) => {
430
- var _a, _b;
390
+ const DiffSyntax = ({ rawLine, diffFile, diffLine, operator, syntaxLine, enableWrap, }) => {
391
+ var _a;
431
392
  if (!syntaxLine) {
432
- return (React__namespace.createElement(DiffString, { rawLine: rawLine, diffLine: diffLine, operator: operator, enableWrap: enableWrap, enableTemplate: enableTemplate }));
393
+ return React__namespace.createElement(DiffString, { rawLine: rawLine, diffLine: diffLine, operator: operator, enableWrap: enableWrap });
433
394
  }
434
395
  const changes = diffLine === null || diffLine === void 0 ? void 0 : diffLine.changes;
435
396
  if (changes === null || changes === void 0 ? void 0 : changes.hasLineChange) {
436
397
  const isNewLineSymbolChanged = changes.newLineSymbol;
437
- if (enableTemplate && !(diffLine === null || diffLine === void 0 ? void 0 : diffLine.syntaxTemplate) && typeof core.getSyntaxDiffTemplate === "function") {
438
- core.getSyntaxDiffTemplate({ diffLine, syntaxLine, operator });
398
+ if (!(diffLine === null || diffLine === void 0 ? void 0 : diffLine.syntaxTemplate) && typeof core.getSyntaxDiffTemplate === "function") {
399
+ core.getSyntaxDiffTemplate({ diffFile, diffLine, syntaxLine, operator });
439
400
  }
440
- if (enableTemplate && (diffLine === null || diffLine === void 0 ? void 0 : diffLine.syntaxTemplate)) {
401
+ if (diffLine === null || diffLine === void 0 ? void 0 : diffLine.syntaxTemplate) {
441
402
  return (React__namespace.createElement("span", { className: "diff-line-syntax-raw" },
442
403
  React__namespace.createElement("span", { "data-template": true, dangerouslySetInnerHTML: { __html: diffLine.syntaxTemplate } }),
443
404
  isNewLineSymbolChanged === NewLineSymbol.NEWLINE && (React__namespace.createElement("span", { "data-no-newline-at-end-of-file-symbol": true, className: enableWrap ? "block !text-red-500" : "inline-block align-middle !text-red-500", style: {
@@ -446,66 +407,24 @@ const DiffSyntax = ({ rawLine, diffLine, operator, syntaxLine, enableWrap, enabl
446
407
  } },
447
408
  React__namespace.createElement(DiffNoNewLine, null)))));
448
409
  }
449
- else {
450
- // TODO remove
451
- const range = changes.range;
452
- return (React__namespace.createElement("span", { className: "diff-line-syntax-raw" },
453
- React__namespace.createElement("span", { "data-range-start": range.location, "data-range-end": range.location + range.length }, (_a = syntaxLine.nodeList) === null || _a === void 0 ? void 0 : _a.map(({ node, wrapper }, index) => {
454
- var _a, _b, _c, _d, _e, _f;
455
- if (node.endIndex < range.location || range.location + range.length < node.startIndex) {
456
- return (React__namespace.createElement("span", { key: index, "data-start": node.startIndex, "data-end": node.endIndex, className: (_b = (_a = wrapper === null || wrapper === void 0 ? void 0 : wrapper.properties) === null || _a === void 0 ? void 0 : _a.className) === null || _b === void 0 ? void 0 : _b.join(" "), style: getStyleObjectFromString(((_c = wrapper === null || wrapper === void 0 ? void 0 : wrapper.properties) === null || _c === void 0 ? void 0 : _c.style) || "") }, node.value));
457
- }
458
- else {
459
- const index1 = range.location - node.startIndex;
460
- const index2 = index1 < 0 ? 0 : index1;
461
- const str1 = node.value.slice(0, index2);
462
- const str2 = node.value.slice(index2, index1 + range.length);
463
- const str3 = node.value.slice(index1 + range.length);
464
- const isStart = str1.length || range.location === node.startIndex;
465
- const isEnd = str3.length || node.endIndex === range.location + range.length - 1;
466
- const isLast = str2.includes("\n");
467
- const _str2 = isLast ? str2.replace("\n", "").replace("\r", "") : str2;
468
- return (React__namespace.createElement("span", { key: index, "data-start": node.startIndex, "data-end": node.endIndex, className: (_e = (_d = wrapper === null || wrapper === void 0 ? void 0 : wrapper.properties) === null || _d === void 0 ? void 0 : _d.className) === null || _e === void 0 ? void 0 : _e.join(" "), style: getStyleObjectFromString(((_f = wrapper === null || wrapper === void 0 ? void 0 : wrapper.properties) === null || _f === void 0 ? void 0 : _f.style) || "") },
469
- str1,
470
- React__namespace.createElement("span", { "data-diff-highlight": true, style: {
471
- backgroundColor: operator === "add"
472
- ? `var(${addContentHighlightBGName})`
473
- : `var(${delContentHighlightBGName})`,
474
- borderTopLeftRadius: isStart ? "0.2em" : undefined,
475
- borderBottomLeftRadius: isStart ? "0.2em" : undefined,
476
- borderTopRightRadius: isEnd || isLast ? "0.2em" : undefined,
477
- borderBottomRightRadius: isEnd || isLast ? "0.2em" : undefined,
478
- } }, isLast ? (React__namespace.createElement(React__namespace.Fragment, null,
479
- _str2,
480
- React__namespace.createElement("span", { "data-newline-symbol": true }, getSymbol(isNewLineSymbolChanged)))) : (str2)),
481
- str3));
482
- }
483
- })),
484
- isNewLineSymbolChanged === NewLineSymbol.NEWLINE && (React__namespace.createElement("span", { "data-no-newline-at-end-of-file-symbol": true, className: enableWrap ? "block !text-red-500" : "inline-block align-middle !text-red-500", style: {
485
- width: `var(${diffFontSizeName})`,
486
- height: `var(${diffFontSizeName})`,
487
- } },
488
- React__namespace.createElement(DiffNoNewLine, null)))));
489
- }
490
410
  }
491
- if (enableTemplate && !syntaxLine.template) {
411
+ if (!syntaxLine.template) {
492
412
  syntaxLine.template = core.getSyntaxLineTemplate(syntaxLine);
493
413
  }
494
- if (enableTemplate && (syntaxLine === null || syntaxLine === void 0 ? void 0 : syntaxLine.template)) {
414
+ if (syntaxLine === null || syntaxLine === void 0 ? void 0 : syntaxLine.template) {
495
415
  return (React__namespace.createElement("span", { className: "diff-line-syntax-raw" },
496
416
  React__namespace.createElement("span", { "data-template": true, dangerouslySetInnerHTML: { __html: syntaxLine.template } })));
497
417
  }
498
- return (React__namespace.createElement("span", { className: "diff-line-syntax-raw" }, (_b = syntaxLine === null || syntaxLine === void 0 ? void 0 : syntaxLine.nodeList) === null || _b === void 0 ? void 0 : _b.map(({ node, wrapper }, index) => {
418
+ return (React__namespace.createElement("span", { className: "diff-line-syntax-raw" }, (_a = syntaxLine === null || syntaxLine === void 0 ? void 0 : syntaxLine.nodeList) === null || _a === void 0 ? void 0 : _a.map(({ node, wrapper }, index) => {
499
419
  var _a, _b, _c;
500
420
  return (React__namespace.createElement("span", { key: index, "data-start": node.startIndex, "data-end": node.endIndex, className: (_b = (_a = wrapper === null || wrapper === void 0 ? void 0 : wrapper.properties) === null || _a === void 0 ? void 0 : _a.className) === null || _b === void 0 ? void 0 : _b.join(" "), style: getStyleObjectFromString(((_c = wrapper === null || wrapper === void 0 ? void 0 : wrapper.properties) === null || _c === void 0 ? void 0 : _c.style) || "") }, node.value));
501
421
  })));
502
422
  };
503
- const DiffContent = ({ diffLine, diffFile, rawLine, plainLine, syntaxLine, enableWrap, enableHighlight, }) => {
504
- var _a, _b, _c;
423
+ const DiffContent = ({ diffFile, diffLine, rawLine, plainLine, syntaxLine, enableWrap, enableHighlight, }) => {
424
+ var _a;
505
425
  const isAdded = (diffLine === null || diffLine === void 0 ? void 0 : diffLine.type) === core.DiffLineType.Add;
506
426
  const isDelete = (diffLine === null || diffLine === void 0 ? void 0 : diffLine.type) === core.DiffLineType.Delete;
507
427
  const isMaxLineLengthToIgnoreSyntax = ((_a = syntaxLine === null || syntaxLine === void 0 ? void 0 : syntaxLine.nodeList) === null || _a === void 0 ? void 0 : _a.length) > 150;
508
- const isEnableTemplate = (_c = (_b = diffFile.getIsEnableTemplate) === null || _b === void 0 ? void 0 : _b.call(diffFile)) !== null && _c !== void 0 ? _c : true;
509
428
  return (React__namespace.createElement("div", { className: "diff-line-content-item pl-[2.0em]",
510
429
  // data-val={rawLine}
511
430
  style: {
@@ -513,7 +432,7 @@ const DiffContent = ({ diffLine, diffFile, rawLine, plainLine, syntaxLine, enabl
513
432
  wordBreak: enableWrap ? "break-all" : "initial",
514
433
  } },
515
434
  React__namespace.createElement("span", { "data-operator": isAdded ? "+" : isDelete ? "-" : undefined, className: "diff-line-content-operator ml-[-1.5em] inline-block w-[1.5em] select-none indent-[0.2em]" }, isAdded ? "+" : isDelete ? "-" : " "),
516
- enableHighlight && syntaxLine && !isMaxLineLengthToIgnoreSyntax ? (React__namespace.createElement(DiffSyntax, { operator: isAdded ? "add" : isDelete ? "del" : undefined, rawLine: rawLine, diffLine: diffLine, syntaxLine: syntaxLine, enableWrap: enableWrap, enableTemplate: isEnableTemplate })) : (React__namespace.createElement(DiffString, { operator: isAdded ? "add" : isDelete ? "del" : undefined, rawLine: rawLine, diffLine: diffLine, plainLine: plainLine, enableWrap: enableWrap, enableTemplate: isEnableTemplate }))));
435
+ enableHighlight && syntaxLine && !isMaxLineLengthToIgnoreSyntax ? (React__namespace.createElement(DiffSyntax, { operator: isAdded ? "add" : isDelete ? "del" : undefined, rawLine: rawLine, diffFile: diffFile, diffLine: diffLine, syntaxLine: syntaxLine, enableWrap: enableWrap })) : (React__namespace.createElement(DiffString, { operator: isAdded ? "add" : isDelete ? "del" : undefined, rawLine: rawLine, diffLine: diffLine, plainLine: plainLine, enableWrap: enableWrap }))));
517
436
  };
518
437
 
519
438
  const DiffViewContext = React.createContext(null);
@@ -1519,7 +1438,7 @@ const DiffUnifiedNewLine = ({ index, diffLine, rawLine, plainLine, syntaxLine, l
1519
1438
  React__namespace.createElement("td", { className: "diff-line-content pr-[10px] align-top", style: { backgroundColor: `var(${addContentBGName})` } },
1520
1439
  React__namespace.createElement(DiffContent, { enableWrap: enableWrap, diffFile: diffFile, enableHighlight: enableHighlight, rawLine: rawLine, diffLine: diffLine, plainLine: plainLine, syntaxLine: syntaxLine }))));
1521
1440
  };
1522
- const _DiffUnifiedLine = React.memo(({ index, diffFile, lineNumber, enableWrap, enableAddWidget, enableHighlight, }) => {
1441
+ const InternalDiffUnifiedLine = ({ index, diffFile, lineNumber, enableWrap, enableAddWidget, enableHighlight, }) => {
1523
1442
  const unifiedLine = diffFile.getUnifiedLine(index);
1524
1443
  const { useDiffContext } = useDiffViewContext();
1525
1444
  const onAddWidgetClick = useDiffContext.getReadonlyState().onAddWidgetClick;
@@ -1568,13 +1487,12 @@ const _DiffUnifiedLine = React.memo(({ index, diffFile, lineNumber, enableWrap,
1568
1487
  } },
1569
1488
  React__namespace.createElement(DiffContent, { enableWrap: enableWrap, diffFile: diffFile, enableHighlight: enableHighlight, rawLine: rawLine, diffLine: diffLine, plainLine: plainLine, syntaxLine: syntaxLine }))));
1570
1489
  }
1571
- });
1572
- _DiffUnifiedLine.displayName = "_DiffUnifiedLine";
1490
+ };
1573
1491
  const DiffUnifiedContentLine = ({ index, diffFile, lineNumber, enableWrap, enableHighlight, enableAddWidget, }) => {
1574
1492
  const unifiedLine = diffFile.getUnifiedLine(index);
1575
1493
  if (unifiedLine === null || unifiedLine === void 0 ? void 0 : unifiedLine.isHidden)
1576
1494
  return null;
1577
- return (React__namespace.createElement(_DiffUnifiedLine, { index: index, diffFile: diffFile, lineNumber: lineNumber, enableWrap: enableWrap, enableHighlight: enableHighlight, enableAddWidget: enableAddWidget }));
1495
+ return (React__namespace.createElement(InternalDiffUnifiedLine, { index: index, diffFile: diffFile, lineNumber: lineNumber, enableWrap: enableWrap, enableHighlight: enableHighlight, enableAddWidget: enableAddWidget }));
1578
1496
  };
1579
1497
 
1580
1498
  const InternalDiffUnifiedExtendLine = ({ index, diffFile, lineNumber, enableWrap, oldLineExtend, newLineExtend, }) => {
@@ -1887,7 +1805,7 @@ const InternalDiffView = (props) => {
1887
1805
  }, [useDiffContext, wrapperRef]);
1888
1806
  const value = React.useMemo(() => ({ useDiffContext }), [useDiffContext]);
1889
1807
  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.35", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef },
1808
+ React__namespace.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0.37", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef },
1891
1809
  React__namespace.createElement("div", { className: "diff-style-root", style: {
1892
1810
  // @ts-ignore
1893
1811
  [diffFontSizeName]: diffViewFontSize + "px",
@@ -1940,9 +1858,18 @@ const DiffViewWithRef = (props, ref) => {
1940
1858
  if (!diffFile)
1941
1859
  return;
1942
1860
  if (props.diffViewHighlight) {
1943
- diffFile.initSyntax({ registerHighlighter });
1861
+ const finalHighlighter = registerHighlighter || core.highlighter;
1862
+ if (finalHighlighter.name !== diffFile._getHighlighterName() ||
1863
+ finalHighlighter.type !== diffFile._getHighlighterType()) {
1864
+ diffFile.initSyntax({ registerHighlighter: finalHighlighter });
1865
+ diffFile.notifyAll();
1866
+ }
1867
+ else {
1868
+ diffFile.initSyntax({ registerHighlighter: finalHighlighter });
1869
+ if (finalHighlighter.type !== "class")
1870
+ diffFile.notifyAll();
1871
+ }
1944
1872
  }
1945
- diffFile.notifyAll();
1946
1873
  }, [diffFile, props.diffViewHighlight, registerHighlighter, diffViewTheme]);
1947
1874
  React.useEffect(() => {
1948
1875
  if (!diffFile)
@@ -1955,7 +1882,7 @@ const DiffViewWithRef = (props, ref) => {
1955
1882
  init();
1956
1883
  const cb = diffFile.subscribe(init);
1957
1884
  return cb;
1958
- }, [diffFile]);
1885
+ }, [diffFile, diffViewTheme]);
1959
1886
  // fix react strict mode error
1960
1887
  useUnmount(() => { var _a; return ((_a = diffFile === null || diffFile === void 0 ? void 0 : diffFile._destroy) === null || _a === void 0 ? void 0 : _a.call(diffFile) ); }, [diffFile]);
1961
1888
  React.useImperativeHandle(ref, () => ({ getDiffFileInstance: () => diffFile }), [diffFile]);
@@ -1966,7 +1893,7 @@ const DiffViewWithRef = (props, ref) => {
1966
1893
  const InnerDiffView = React.forwardRef(DiffViewWithRef);
1967
1894
  InnerDiffView.displayName = "DiffView";
1968
1895
  const DiffView = InnerDiffView;
1969
- const version = "0.0.35";
1896
+ const version = "0.0.37";
1970
1897
 
1971
1898
  Object.defineProperty(exports, "SplitSide", {
1972
1899
  enumerable: true,