@git-diff-view/react 0.0.29 → 0.0.30
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 +4 -2
- package/dist/cjs/index.development.js.map +1 -1
- package/dist/cjs/index.production.js +4 -2
- package/dist/cjs/index.production.js.map +1 -1
- package/dist/esm/index.mjs +4 -2
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +2 -2
- package/readme.md +3 -3
- package/src/components/DiffView.tsx +3 -0
|
@@ -1822,7 +1822,7 @@ const InternalDiffView = (props) => {
|
|
|
1822
1822
|
]);
|
|
1823
1823
|
const value = React.useMemo(() => ({ useDiffContext }), [useDiffContext]);
|
|
1824
1824
|
return (React__namespace.createElement(DiffViewContext.Provider, { value: value },
|
|
1825
|
-
React__namespace.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0.
|
|
1825
|
+
React__namespace.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0.30", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef },
|
|
1826
1826
|
React__namespace.createElement("div", { className: "diff-style-root", style: {
|
|
1827
1827
|
// @ts-ignore
|
|
1828
1828
|
[diffFontSizeName]: diffViewFontSize + "px",
|
|
@@ -1880,6 +1880,8 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1880
1880
|
}
|
|
1881
1881
|
}, [diffFile, props.diffViewHighlight, registerHighlighter]);
|
|
1882
1882
|
React.useEffect(() => {
|
|
1883
|
+
if (!diffFile)
|
|
1884
|
+
return;
|
|
1883
1885
|
const init = () => {
|
|
1884
1886
|
var _a, _b;
|
|
1885
1887
|
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.setAttribute("data-theme", diffFile._getTheme() || "light");
|
|
@@ -1899,7 +1901,7 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1899
1901
|
const InnerDiffView = React.forwardRef(DiffViewWithRef);
|
|
1900
1902
|
InnerDiffView.displayName = "DiffView";
|
|
1901
1903
|
const DiffView = InnerDiffView;
|
|
1902
|
-
const version = "0.0.
|
|
1904
|
+
const version = "0.0.30";
|
|
1903
1905
|
|
|
1904
1906
|
Object.defineProperty(exports, "SplitSide", {
|
|
1905
1907
|
enumerable: true,
|