@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
package/dist/esm/index.mjs
CHANGED
|
@@ -1804,7 +1804,7 @@ const InternalDiffView = (props) => {
|
|
|
1804
1804
|
]);
|
|
1805
1805
|
const value = useMemo(() => ({ useDiffContext }), [useDiffContext]);
|
|
1806
1806
|
return (React.createElement(DiffViewContext.Provider, { value: value },
|
|
1807
|
-
React.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0.
|
|
1807
|
+
React.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 },
|
|
1808
1808
|
React.createElement("div", { className: "diff-style-root", style: {
|
|
1809
1809
|
// @ts-ignore
|
|
1810
1810
|
[diffFontSizeName]: diffViewFontSize + "px",
|
|
@@ -1862,6 +1862,8 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1862
1862
|
}
|
|
1863
1863
|
}, [diffFile, props.diffViewHighlight, registerHighlighter]);
|
|
1864
1864
|
useEffect(() => {
|
|
1865
|
+
if (!diffFile)
|
|
1866
|
+
return;
|
|
1865
1867
|
const init = () => {
|
|
1866
1868
|
var _a, _b;
|
|
1867
1869
|
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.setAttribute("data-theme", diffFile._getTheme() || "light");
|
|
@@ -1881,7 +1883,7 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1881
1883
|
const InnerDiffView = forwardRef(DiffViewWithRef);
|
|
1882
1884
|
InnerDiffView.displayName = "DiffView";
|
|
1883
1885
|
const DiffView = InnerDiffView;
|
|
1884
|
-
const version = "0.0.
|
|
1886
|
+
const version = "0.0.30";
|
|
1885
1887
|
|
|
1886
1888
|
export { DiffModeEnum, DiffView, version };
|
|
1887
1889
|
//# sourceMappingURL=index.mjs.map
|