@git-diff-view/react 0.0.38 → 0.0.39
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/dist/cjs/index.development.js +12 -11
- package/dist/cjs/index.development.js.map +1 -1
- package/dist/cjs/index.production.js +12 -11
- package/dist/cjs/index.production.js.map +1 -1
- package/dist/esm/index.mjs +13 -12
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/DiffView.tsx +12 -11
|
@@ -1805,7 +1805,7 @@ const InternalDiffView = (props) => {
|
|
|
1805
1805
|
}, [useDiffContext, wrapperRef]);
|
|
1806
1806
|
const value = React.useMemo(() => ({ useDiffContext }), [useDiffContext]);
|
|
1807
1807
|
return (React__namespace.createElement(DiffViewContext.Provider, { value: value },
|
|
1808
|
-
React__namespace.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0.
|
|
1808
|
+
React__namespace.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0.39", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef },
|
|
1809
1809
|
React__namespace.createElement("div", { className: "diff-style-root", style: {
|
|
1810
1810
|
// @ts-ignore
|
|
1811
1811
|
[diffFontSizeName]: diffViewFontSize + "px",
|
|
@@ -1858,16 +1858,17 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1858
1858
|
if (!diffFile)
|
|
1859
1859
|
return;
|
|
1860
1860
|
if (props.diffViewHighlight) {
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
}
|
|
1867
|
-
else {
|
|
1868
|
-
diffFile.initSyntax({ registerHighlighter: finalHighlighter });
|
|
1869
|
-
if (finalHighlighter.type !== "class")
|
|
1861
|
+
if (registerHighlighter) {
|
|
1862
|
+
if (registerHighlighter.name !== diffFile._getHighlighterName() ||
|
|
1863
|
+
registerHighlighter.type !== diffFile._getHighlighterType() ||
|
|
1864
|
+
registerHighlighter.type !== "class") {
|
|
1865
|
+
diffFile.initSyntax({ registerHighlighter: registerHighlighter });
|
|
1870
1866
|
diffFile.notifyAll();
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
else if (diffFile._getHighlighterType() !== "class") {
|
|
1870
|
+
diffFile.initSyntax();
|
|
1871
|
+
diffFile.notifyAll();
|
|
1871
1872
|
}
|
|
1872
1873
|
}
|
|
1873
1874
|
}, [diffFile, props.diffViewHighlight, registerHighlighter, diffViewTheme]);
|
|
@@ -1893,7 +1894,7 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1893
1894
|
const InnerDiffView = React.forwardRef(DiffViewWithRef);
|
|
1894
1895
|
InnerDiffView.displayName = "DiffView";
|
|
1895
1896
|
const DiffView = InnerDiffView;
|
|
1896
|
-
const version = "0.0.
|
|
1897
|
+
const version = "0.0.39";
|
|
1897
1898
|
|
|
1898
1899
|
Object.defineProperty(exports, "SplitSide", {
|
|
1899
1900
|
enumerable: true,
|