@git-diff-view/react 0.1.4 → 0.1.5
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.
|
@@ -1585,7 +1585,7 @@ const InternalDiffView = (props) => {
|
|
|
1585
1585
|
}
|
|
1586
1586
|
}, [useDiffContext, wrapperRef]);
|
|
1587
1587
|
const value = React.useMemo(() => ({ useDiffContext }), [useDiffContext]);
|
|
1588
|
-
return (jsxRuntime.jsx(DiffViewContext.Provider, { value: value, children: jsxRuntime.jsx("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.1.
|
|
1588
|
+
return (jsxRuntime.jsx(DiffViewContext.Provider, { value: value, children: jsxRuntime.jsx("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.1.5", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef, children: jsxRuntime.jsx("div", { className: "diff-style-root", style: {
|
|
1589
1589
|
// @ts-ignore
|
|
1590
1590
|
[diffFontSizeName]: diffViewFontSize + "px",
|
|
1591
1591
|
}, children: jsxRuntime.jsx("div", { id: isMounted ? `diff-root${diffFileId}` : undefined, className: "diff-view-wrapper" + (className ? ` ${className}` : ""), style: style, children: diffViewMode & exports.DiffModeEnum.Split ? (jsxRuntime.jsx(DiffSplitView, { diffFile: diffFile })) : (jsxRuntime.jsx(DiffUnifiedView, { diffFile: diffFile })) }) }) }) }));
|
|
@@ -1675,7 +1675,7 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1675
1675
|
const InnerDiffView = React.forwardRef(DiffViewWithRef);
|
|
1676
1676
|
InnerDiffView.displayName = "DiffView";
|
|
1677
1677
|
const DiffView = InnerDiffView;
|
|
1678
|
-
const version = "0.1.
|
|
1678
|
+
const version = "0.1.5";
|
|
1679
1679
|
|
|
1680
1680
|
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
|
|
1681
1681
|
const useCallbackRef = (cb) => {
|
|
@@ -1585,7 +1585,7 @@ const InternalDiffView = (props) => {
|
|
|
1585
1585
|
}
|
|
1586
1586
|
}, [useDiffContext, wrapperRef]);
|
|
1587
1587
|
const value = React.useMemo(() => ({ useDiffContext }), [useDiffContext]);
|
|
1588
|
-
return (jsxRuntime.jsx(DiffViewContext.Provider, { value: value, children: jsxRuntime.jsx("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.1.
|
|
1588
|
+
return (jsxRuntime.jsx(DiffViewContext.Provider, { value: value, children: jsxRuntime.jsx("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.1.5", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef, children: jsxRuntime.jsx("div", { className: "diff-style-root", style: {
|
|
1589
1589
|
// @ts-ignore
|
|
1590
1590
|
[diffFontSizeName]: diffViewFontSize + "px",
|
|
1591
1591
|
}, children: jsxRuntime.jsx("div", { id: isMounted ? `diff-root${diffFileId}` : undefined, className: "diff-view-wrapper" + (className ? ` ${className}` : ""), style: style, children: diffViewMode & exports.DiffModeEnum.Split ? (jsxRuntime.jsx(DiffSplitView, { diffFile: diffFile })) : (jsxRuntime.jsx(DiffUnifiedView, { diffFile: diffFile })) }) }) }) }));
|
|
@@ -1675,7 +1675,7 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1675
1675
|
const InnerDiffView = React.forwardRef(DiffViewWithRef);
|
|
1676
1676
|
InnerDiffView.displayName = "DiffView";
|
|
1677
1677
|
const DiffView = InnerDiffView;
|
|
1678
|
-
const version = "0.1.
|
|
1678
|
+
const version = "0.1.5";
|
|
1679
1679
|
|
|
1680
1680
|
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
|
|
1681
1681
|
const useCallbackRef = (cb) => {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1567,7 +1567,7 @@ const InternalDiffView = (props) => {
|
|
|
1567
1567
|
}
|
|
1568
1568
|
}, [useDiffContext, wrapperRef]);
|
|
1569
1569
|
const value = useMemo(() => ({ useDiffContext }), [useDiffContext]);
|
|
1570
|
-
return (jsx(DiffViewContext.Provider, { value: value, children: jsx("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.1.
|
|
1570
|
+
return (jsx(DiffViewContext.Provider, { value: value, children: jsx("div", { className: "diff-tailwindcss-wrapper", "data-component": "git-diff-view", "data-theme": diffFile._getTheme() || "light", "data-version": "0.1.5", "data-highlighter": diffFile._getHighlighterName(), ref: wrapperRef, children: jsx("div", { className: "diff-style-root", style: {
|
|
1571
1571
|
// @ts-ignore
|
|
1572
1572
|
[diffFontSizeName]: diffViewFontSize + "px",
|
|
1573
1573
|
}, children: jsx("div", { id: isMounted ? `diff-root${diffFileId}` : undefined, className: "diff-view-wrapper" + (className ? ` ${className}` : ""), style: style, children: diffViewMode & DiffModeEnum.Split ? (jsx(DiffSplitView, { diffFile: diffFile })) : (jsx(DiffUnifiedView, { diffFile: diffFile })) }) }) }) }));
|
|
@@ -1657,7 +1657,7 @@ const DiffViewWithRef = (props, ref) => {
|
|
|
1657
1657
|
const InnerDiffView = forwardRef(DiffViewWithRef);
|
|
1658
1658
|
InnerDiffView.displayName = "DiffView";
|
|
1659
1659
|
const DiffView = InnerDiffView;
|
|
1660
|
-
const version = "0.1.
|
|
1660
|
+
const version = "0.1.5";
|
|
1661
1661
|
|
|
1662
1662
|
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
|
|
1663
1663
|
const useCallbackRef = (cb) => {
|
package/index.d.ts
CHANGED
|
@@ -524,6 +524,7 @@ export declare const checkDiffLineIncludeChange: (diffLine?: DiffLine) => boolea
|
|
|
524
524
|
export declare const defaultTransform: (content: string) => string;
|
|
525
525
|
export declare const disableCache: () => void;
|
|
526
526
|
export declare const getCurrentComposeLength: () => number;
|
|
527
|
+
export declare const getEnableBuildTemplate: () => boolean;
|
|
527
528
|
export declare const getEnableFastDiffTemplate: () => boolean;
|
|
528
529
|
export declare const getLang: (fileName: string) => string;
|
|
529
530
|
export declare const getMaxLengthToIgnoreLineDiff: () => number;
|
|
@@ -606,6 +607,7 @@ export declare const processTransformForFile: (content: string) => string;
|
|
|
606
607
|
*/
|
|
607
608
|
export declare const processTransformTemplateContent: (content: string) => string;
|
|
608
609
|
export declare const resetDefaultComposeLength: () => void;
|
|
610
|
+
export declare const resetEnableBuildTemplate: () => void;
|
|
609
611
|
export declare const resetEnableFastDiffTemplate: () => void;
|
|
610
612
|
export declare const resetMaxLengthToIgnoreLineDiff: () => void;
|
|
611
613
|
/**
|
|
@@ -617,6 +619,7 @@ export declare const resetMaxLengthToIgnoreLineDiff: () => void;
|
|
|
617
619
|
* ```
|
|
618
620
|
*/
|
|
619
621
|
export declare const resetTransform: () => void;
|
|
622
|
+
export declare const setEnableBuildTemplate: (enable: boolean) => void;
|
|
620
623
|
export declare const setEnableFastDiffTemplate: (enable: boolean) => void;
|
|
621
624
|
/**
|
|
622
625
|
* ⚠️ **WARNING: DANGEROUS OPERATION** ⚠️
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "@git-diff-view/react",
|
|
4
4
|
"author": "MrWangJustToDo",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.5",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"types": "index.d.ts",
|
|
9
9
|
"files": [
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"react diff component"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@git-diff-view/core": "^0.1.
|
|
64
|
+
"@git-diff-view/core": "^0.1.5",
|
|
65
65
|
"@types/hast": "^3.0.0",
|
|
66
66
|
"fast-diff": "^1.3.0",
|
|
67
67
|
"highlight.js": "^11.11.0",
|