@git-diff-view/react 0.0.39 → 0.1.0
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 -3
- package/dist/cjs/index.development.js.map +1 -1
- package/dist/cjs/index.production.js +4 -3
- package/dist/cjs/index.production.js.map +1 -1
- package/dist/esm/index.mjs +5 -4
- package/dist/esm/index.mjs.map +1 -1
- package/index.d.ts +11 -4
- package/package.json +2 -2
- package/src/components/DiffView.tsx +5 -2
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { SplitSide, DiffLineType, getSyntaxDiffTemplate, getSyntaxLineTemplate, getPlainDiffTemplate, getPlainLineTemplate, checkDiffLineIncludeChange, composeLen, getSplitContentLines, getUnifiedContentLine, _cacheMap, DiffFile } from '@git-diff-view/core';
|
|
2
|
+
import { SplitSide, DiffLineType, getSyntaxDiffTemplate, getSyntaxLineTemplate, getPlainDiffTemplate, getPlainLineTemplate, checkDiffLineIncludeChange, composeLen, getSplitContentLines, getUnifiedContentLine, _cacheMap, DiffFile, highlighter } from '@git-diff-view/core';
|
|
3
3
|
export * from '@git-diff-view/core';
|
|
4
4
|
export { SplitSide } from '@git-diff-view/core';
|
|
5
5
|
import * as React from 'react';
|
|
@@ -1787,7 +1787,7 @@ const InternalDiffView = (props) => {
|
|
|
1787
1787
|
}, [useDiffContext, wrapperRef]);
|
|
1788
1788
|
const value = useMemo(() => ({ useDiffContext }), [useDiffContext]);
|
|
1789
1789
|
return (React.createElement(DiffViewContext.Provider, { value: value },
|
|
1790
|
-
React.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.0
|
|
1790
|
+
React.createElement("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.1.0", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef },
|
|
1791
1791
|
React.createElement("div", { className: "diff-style-root", style: {
|
|
1792
1792
|
// @ts-ignore
|
|
1793
1793
|
[diffFontSizeName]: diffViewFontSize + "px",
|
|
@@ -1848,7 +1848,8 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1848
1848
|
diffFile.notifyAll();
|
|
1849
1849
|
}
|
|
1850
1850
|
}
|
|
1851
|
-
else if (diffFile.
|
|
1851
|
+
else if ((!diffFile._getIsCloned() && diffFile._getHighlighterName() !== highlighter.name) ||
|
|
1852
|
+
diffFile._getHighlighterType() !== "class") {
|
|
1852
1853
|
diffFile.initSyntax();
|
|
1853
1854
|
diffFile.notifyAll();
|
|
1854
1855
|
}
|
|
@@ -1876,7 +1877,7 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1876
1877
|
const InnerDiffView = forwardRef(DiffViewWithRef);
|
|
1877
1878
|
InnerDiffView.displayName = "DiffView";
|
|
1878
1879
|
const DiffView = InnerDiffView;
|
|
1879
|
-
const version = "0.0
|
|
1880
|
+
const version = "0.1.0";
|
|
1880
1881
|
|
|
1881
1882
|
export { DiffModeEnum, DiffView, version };
|
|
1882
1883
|
//# sourceMappingURL=index.mjs.map
|