Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More โ†’
Socket
Sign inDemoInstall
Socket

diff2html

Package Overview
Dependencies
Maintainers
1
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diff2html - npm Package Compare versions

Comparing version 3.4.21 to 3.4.22

3

lib-esm/ui/js/diff2html-ui-base.d.ts

@@ -12,2 +12,3 @@ import { Diff2HtmlConfig } from '../../diff2html';

fileContentToggle?: boolean;
stickyFileHeaders?: boolean;
}

@@ -22,2 +23,3 @@ export declare const defaultDiff2HtmlUIConfig: {

fileContentToggle: boolean;
stickyFileHeaders: boolean;
outputFormat: import("../../types").OutputFormatType;

@@ -45,2 +47,3 @@ drawFileList: boolean;

highlightCode(): void;
stickyFileHeaders(): void;
smartSelection(): void;

@@ -47,0 +50,0 @@ private getHashTag;

@@ -14,3 +14,3 @@ var __assign = (this && this.__assign) || function () {

import { html, defaultDiff2HtmlConfig } from '../../diff2html';
export var defaultDiff2HtmlUIConfig = __assign(__assign({}, defaultDiff2HtmlConfig), { synchronisedScroll: true, highlight: true, fileListToggle: true, fileListStartVisible: false, highlightLanguages: new Map(), smartSelection: true, fileContentToggle: true });
export var defaultDiff2HtmlUIConfig = __assign(__assign({}, defaultDiff2HtmlConfig), { synchronisedScroll: true, highlight: true, fileListToggle: true, fileListStartVisible: false, highlightLanguages: new Map(), smartSelection: true, fileContentToggle: true, stickyFileHeaders: true });
var Diff2HtmlUI = (function () {

@@ -37,2 +37,4 @@ function Diff2HtmlUI(target, diffInput, config, hljs) {

this.fileContentToggle();
if (this.config.stickyFileHeaders)
this.stickyFileHeaders();
};

@@ -119,2 +121,5 @@ Diff2HtmlUI.prototype.synchronisedScroll = function () {

var language = file.getAttribute('data-lang');
if (!(_this.config.highlightLanguages instanceof Map)) {
_this.config.highlightLanguages = new Map(Object.entries(_this.config.highlightLanguages));
}
var hljsLanguage = language && _this.config.highlightLanguages.has(language)

@@ -152,2 +157,7 @@ ?

};
Diff2HtmlUI.prototype.stickyFileHeaders = function () {
this.targetElement.querySelectorAll('.d2h-file-header').forEach(function (header) {
header.classList.add('d2h-sticky-header');
});
};
Diff2HtmlUI.prototype.smartSelection = function () {

@@ -154,0 +164,0 @@ console.warn('Smart selection is now enabled by default with CSS. No need to call this method anymore.');

@@ -12,2 +12,3 @@ import { Diff2HtmlConfig } from '../../diff2html';

fileContentToggle?: boolean;
stickyFileHeaders?: boolean;
}

@@ -22,2 +23,3 @@ export declare const defaultDiff2HtmlUIConfig: {

fileContentToggle: boolean;
stickyFileHeaders: boolean;
outputFormat: import("../../types").OutputFormatType;

@@ -45,2 +47,3 @@ drawFileList: boolean;

highlightCode(): void;
stickyFileHeaders(): void;
smartSelection(): void;

@@ -47,0 +50,0 @@ private getHashTag;

@@ -17,3 +17,3 @@ "use strict";

var diff2html_1 = require("../../diff2html");
exports.defaultDiff2HtmlUIConfig = __assign(__assign({}, diff2html_1.defaultDiff2HtmlConfig), { synchronisedScroll: true, highlight: true, fileListToggle: true, fileListStartVisible: false, highlightLanguages: new Map(), smartSelection: true, fileContentToggle: true });
exports.defaultDiff2HtmlUIConfig = __assign(__assign({}, diff2html_1.defaultDiff2HtmlConfig), { synchronisedScroll: true, highlight: true, fileListToggle: true, fileListStartVisible: false, highlightLanguages: new Map(), smartSelection: true, fileContentToggle: true, stickyFileHeaders: true });
var Diff2HtmlUI = (function () {

@@ -40,2 +40,4 @@ function Diff2HtmlUI(target, diffInput, config, hljs) {

this.fileContentToggle();
if (this.config.stickyFileHeaders)
this.stickyFileHeaders();
};

@@ -122,2 +124,5 @@ Diff2HtmlUI.prototype.synchronisedScroll = function () {

var language = file.getAttribute('data-lang');
if (!(_this.config.highlightLanguages instanceof Map)) {
_this.config.highlightLanguages = new Map(Object.entries(_this.config.highlightLanguages));
}
var hljsLanguage = language && _this.config.highlightLanguages.has(language)

@@ -155,2 +160,7 @@ ?

};
Diff2HtmlUI.prototype.stickyFileHeaders = function () {
this.targetElement.querySelectorAll('.d2h-file-header').forEach(function (header) {
header.classList.add('d2h-sticky-header');
});
};
Diff2HtmlUI.prototype.smartSelection = function () {

@@ -157,0 +167,0 @@ console.warn('Smart selection is now enabled by default with CSS. No need to call this method anymore.');

2

package.json
{
"name": "diff2html",
"version": "3.4.21",
"version": "3.4.22",
"homepage": "https://diff2html.xyz",

@@ -5,0 +5,0 @@ "description": "Fast Diff to colorized HTML",

@@ -159,2 +159,3 @@ # diff2html

highlightCode(): void
stickyFileHeaders(): void
```

@@ -169,2 +170,3 @@

- `fileContentToggle`: allow each file contents to be toggled: `true` or `false`, default is `true`
- `stickyFileHeaders`: make file headers sticky: `true` or `false`, default is `true`
- [All the options](#diff2html-configuration) from Diff2Html are also valid configurations in Diff2HtmlUI

@@ -171,0 +173,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc