react-diff-viewer-continued 4.1.3 → 4.2.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/CHANGELOG.md +10 -0
- package/lib/cjs/src/compute-hidden-blocks.d.ts +1 -1
- package/lib/cjs/src/compute-lines.js +1 -1
- package/lib/cjs/src/computeWorker.js +1 -1
- package/lib/cjs/src/index.d.ts +2 -1
- package/lib/cjs/src/index.js +1 -0
- package/lib/cjs/src/styles.d.ts +2 -0
- package/lib/esm/src/compute-lines.js +1 -1
- package/lib/esm/src/computeWorker.js +1 -1
- package/lib/esm/src/index.js +1 -0
- package/package.json +1 -1
- package/scripts/build-worker.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.2.0 (2026-03-10)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- export computeStyles and add missing style override properties
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- add .js extensions to relative imports for Node.js ESM compatibility
|
|
12
|
+
|
|
3
13
|
## 4.1.3 (2026-02-07)
|
|
4
14
|
|
|
5
15
|
### Bug Fixes
|
|
@@ -503,7 +503,7 @@ const computeLineInformation = (oldString, newString, disableWordDiff = false, l
|
|
|
503
503
|
* @returns Promise<ComputedLineInformation> - Resolves with line-by-line diff data from the worker.
|
|
504
504
|
*/
|
|
505
505
|
// Import the bundled worker code (generated by scripts/build-worker.js)
|
|
506
|
-
import { WORKER_CODE } from './workerBundle';
|
|
506
|
+
import { WORKER_CODE } from './workerBundle.js';
|
|
507
507
|
// Cached Blob URL for the worker - created once and reused
|
|
508
508
|
let workerBlobUrl = null;
|
|
509
509
|
let workerAvailable = null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computeLineInformation } from "./compute-lines";
|
|
1
|
+
import { computeLineInformation } from "./compute-lines.js";
|
|
2
2
|
/**
|
|
3
3
|
* This sets up a message handler inside the Web Worker.
|
|
4
4
|
* When the main thread sends a message to this worker (via postMessage), this function is triggered.
|
package/lib/cjs/src/index.d.ts
CHANGED
|
@@ -248,4 +248,5 @@ declare class DiffViewer extends React.Component<ReactDiffViewerProps, ReactDiff
|
|
|
248
248
|
}
|
|
249
249
|
export default DiffViewer;
|
|
250
250
|
export { DiffMethod };
|
|
251
|
-
export
|
|
251
|
+
export { default as computeStyles } from "./styles.js";
|
|
252
|
+
export type { ReactDiffViewerStylesOverride, ReactDiffViewerStyles };
|
package/lib/cjs/src/index.js
CHANGED
package/lib/cjs/src/styles.d.ts
CHANGED
|
@@ -76,12 +76,14 @@ export interface ReactDiffViewerStylesOverride {
|
|
|
76
76
|
highlightedGutter?: Interpolation;
|
|
77
77
|
contentText?: Interpolation;
|
|
78
78
|
gutter?: Interpolation;
|
|
79
|
+
lineContent?: Interpolation;
|
|
79
80
|
line?: Interpolation;
|
|
80
81
|
wordDiff?: Interpolation;
|
|
81
82
|
wordAdded?: Interpolation;
|
|
82
83
|
wordRemoved?: Interpolation;
|
|
83
84
|
codeFoldGutter?: Interpolation;
|
|
84
85
|
codeFoldExpandButton?: Interpolation;
|
|
86
|
+
summary?: Interpolation;
|
|
85
87
|
codeFoldContentContainer?: Interpolation;
|
|
86
88
|
codeFold?: Interpolation;
|
|
87
89
|
emptyLine?: Interpolation;
|
|
@@ -503,7 +503,7 @@ const computeLineInformation = (oldString, newString, disableWordDiff = false, l
|
|
|
503
503
|
* @returns Promise<ComputedLineInformation> - Resolves with line-by-line diff data from the worker.
|
|
504
504
|
*/
|
|
505
505
|
// Import the bundled worker code (generated by scripts/build-worker.js)
|
|
506
|
-
import { WORKER_CODE } from './workerBundle';
|
|
506
|
+
import { WORKER_CODE } from './workerBundle.js';
|
|
507
507
|
// Cached Blob URL for the worker - created once and reused
|
|
508
508
|
let workerBlobUrl = null;
|
|
509
509
|
let workerAvailable = null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computeLineInformation } from "./compute-lines";
|
|
1
|
+
import { computeLineInformation } from "./compute-lines.js";
|
|
2
2
|
/**
|
|
3
3
|
* This sets up a message handler inside the Web Worker.
|
|
4
4
|
* When the main thread sends a message to this worker (via postMessage), this function is triggered.
|
package/lib/esm/src/index.js
CHANGED
package/package.json
CHANGED
package/scripts/build-worker.js
CHANGED
|
@@ -18,7 +18,7 @@ const srcDir = path.join(__dirname, '..', 'src');
|
|
|
18
18
|
const stubWorkerBundlePlugin = {
|
|
19
19
|
name: 'stub-worker-bundle',
|
|
20
20
|
setup(build) {
|
|
21
|
-
build.onResolve({ filter: /\.\/workerBundle
|
|
21
|
+
build.onResolve({ filter: /\.\/workerBundle(\.js)?$/ }, () => ({
|
|
22
22
|
path: 'workerBundle-stub',
|
|
23
23
|
namespace: 'stub',
|
|
24
24
|
}));
|