@openclaw/diffs 2026.5.28-beta.1 → 2026.5.28-beta.3
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/index.js +8 -7
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -216,8 +216,8 @@ function resolveDiffsPluginDefaults(config) {
|
|
|
216
216
|
});
|
|
217
217
|
return {
|
|
218
218
|
fontFamily: normalizeFontFamily(defaults.fontFamily),
|
|
219
|
-
fontSize:
|
|
220
|
-
lineSpacing:
|
|
219
|
+
fontSize: normalizeDiffFontSize(defaults.fontSize),
|
|
220
|
+
lineSpacing: normalizeDiffLineSpacing(defaults.lineSpacing),
|
|
221
221
|
layout: normalizeLayout$1(defaults.layout),
|
|
222
222
|
showLineNumbers: defaults.showLineNumbers !== false,
|
|
223
223
|
diffIndicators: normalizeDiffIndicators(defaults.diffIndicators),
|
|
@@ -248,11 +248,11 @@ function resolveDiffsPluginViewerBaseUrl(config) {
|
|
|
248
248
|
function normalizeFontFamily(fontFamily) {
|
|
249
249
|
return fontFamily?.trim() || DEFAULT_DIFFS_TOOL_DEFAULTS.fontFamily;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function normalizeDiffFontSize(fontSize) {
|
|
252
252
|
if (fontSize === void 0 || !Number.isFinite(fontSize)) return DEFAULT_DIFFS_TOOL_DEFAULTS.fontSize;
|
|
253
253
|
return Math.min(Math.max(Math.floor(fontSize), 10), 24);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function normalizeDiffLineSpacing(lineSpacing) {
|
|
256
256
|
if (lineSpacing === void 0 || !Number.isFinite(lineSpacing)) return DEFAULT_DIFFS_TOOL_DEFAULTS.lineSpacing;
|
|
257
257
|
return Math.min(Math.max(lineSpacing, 1), 3);
|
|
258
258
|
}
|
|
@@ -1621,8 +1621,9 @@ function resolveBeforeAfterFileName(params) {
|
|
|
1621
1621
|
}
|
|
1622
1622
|
function buildDiffOptions(options) {
|
|
1623
1623
|
const fontFamily = escapeCssString(options.presentation.fontFamily);
|
|
1624
|
-
const fontSize =
|
|
1625
|
-
const
|
|
1624
|
+
const fontSize = normalizeDiffFontSize(options.presentation.fontSize);
|
|
1625
|
+
const lineSpacing = normalizeDiffLineSpacing(options.presentation.lineSpacing);
|
|
1626
|
+
const lineHeight = Math.max(20, Math.round(fontSize * lineSpacing));
|
|
1626
1627
|
return {
|
|
1627
1628
|
theme: {
|
|
1628
1629
|
light: "pierre-light",
|
|
@@ -1712,7 +1713,7 @@ function buildImageRenderOptions(options) {
|
|
|
1712
1713
|
...options,
|
|
1713
1714
|
presentation: {
|
|
1714
1715
|
...options.presentation,
|
|
1715
|
-
fontSize: Math.max(16, options.presentation.fontSize)
|
|
1716
|
+
fontSize: Math.max(16, normalizeDiffFontSize(options.presentation.fontSize))
|
|
1716
1717
|
}
|
|
1717
1718
|
};
|
|
1718
1719
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/diffs",
|
|
3
|
-
"version": "2026.5.28-beta.
|
|
3
|
+
"version": "2026.5.28-beta.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/diffs",
|
|
9
|
-
"version": "2026.5.28-beta.
|
|
9
|
+
"version": "2026.5.28-beta.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@pierre/diffs": "1.2.3",
|
|
12
12
|
"@pierre/theme": "1.0.3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/diffs",
|
|
3
|
-
"version": "2026.5.28-beta.
|
|
3
|
+
"version": "2026.5.28-beta.3",
|
|
4
4
|
"description": "OpenClaw read-only diff viewer plugin and file renderer for agents.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"minHostVersion": ">=2026.4.30"
|
|
27
27
|
},
|
|
28
28
|
"compat": {
|
|
29
|
-
"pluginApi": ">=2026.5.28-beta.
|
|
29
|
+
"pluginApi": ">=2026.5.28-beta.3"
|
|
30
30
|
},
|
|
31
31
|
"assetScripts": {
|
|
32
32
|
"build": "node ../../scripts/build-diffs-viewer-runtime.mjs curated"
|
|
33
33
|
},
|
|
34
34
|
"build": {
|
|
35
|
-
"openclawVersion": "2026.5.28-beta.
|
|
35
|
+
"openclawVersion": "2026.5.28-beta.3",
|
|
36
36
|
"staticAssets": [
|
|
37
37
|
{
|
|
38
38
|
"source": "./assets/viewer-runtime.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"skills/**"
|
|
57
57
|
],
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"openclaw": ">=2026.5.28-beta.
|
|
59
|
+
"openclaw": ">=2026.5.28-beta.3"
|
|
60
60
|
},
|
|
61
61
|
"peerDependenciesMeta": {
|
|
62
62
|
"openclaw": {
|