New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

markmap-lib

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markmap-lib - npm Package Compare versions

Comparing version 0.13.3 to 0.13.4-alpha.1

22

dist/index.esm.js

@@ -1,2 +0,2 @@

/*! markmap-lib v0.13.3 | MIT License */
/*! markmap-lib v0.13.4-alpha.1+51f8ed9 | MIT License */
import _extends from '@babel/runtime/helpers/esm/extends';

@@ -11,3 +11,3 @@ import { persistCSS, persistJS, wrapFunction, Hook } from 'markmap-common';

const template = "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n<title>Markmap</title>\n<style>\n* {\n margin: 0;\n padding: 0;\n}\n#mindmap {\n display: block;\n width: 100vw;\n height: 100vh;\n}\n</style>\n<!--CSS-->\n</head>\n<body>\n<svg id=\"mindmap\"></svg>\n<!--JS-->\n</body>\n</html>\n";
const BASE_JS = [`https://cdn.jsdelivr.net/npm/d3@${"6.7.0"}`, `https://cdn.jsdelivr.net/npm/markmap-view@${"0.13.3"}`].map(src => ({
const BASE_JS = [`https://cdn.jsdelivr.net/npm/d3@${"6.7.0"}`, `https://cdn.jsdelivr.net/npm/markmap-view@${"0.13.4-alpha.1+51f8ed9"}`].map(src => ({
type: 'script',

@@ -235,3 +235,3 @@ data: {

function cleanNode(node, depth = 0) {
function cleanNode(node) {
if (node.type === 'heading') {

@@ -277,3 +277,3 @@ // drop all paragraphs

} else {
node.children.forEach(child => cleanNode(child, depth + 1));
node.children.forEach(child => cleanNode(child));

@@ -284,4 +284,11 @@ if (node.children.length === 1 && !node.children[0].content) {

}
}
function resetDepth(node, depth = 0) {
var _node$children;
node.depth = depth;
(_node$children = node.children) == null ? void 0 : _node$children.forEach(child => {
resetDepth(child, depth + 1);
});
}

@@ -382,6 +389,6 @@

const comment = ctx.result.match(/^<!--([\s\S]*?)-->$/);
const data = comment == null ? void 0 : comment[1].trim();
const data = comment == null ? void 0 : comment[1].trim().split(' ');
if (data === 'fold') {
current.payload.fold = true;
if (data[0] === 'fold') {
current.payload.fold = ['all', 'recursively'].includes(data[1]) ? 2 : 1;
ctx.result = '';

@@ -421,2 +428,3 @@ }

if (((_root$children = root.children) == null ? void 0 : _root$children.length) === 1) root = root.children[0];
resetDepth(root);
return _extends({}, context, {

@@ -423,0 +431,0 @@ root

@@ -1,2 +0,2 @@

/*! markmap-lib v0.13.3 | MIT License */
/*! markmap-lib v0.13.4-alpha.1+51f8ed9 | MIT License */
'use strict';

@@ -21,3 +21,3 @@

const template = "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n<title>Markmap</title>\n<style>\n* {\n margin: 0;\n padding: 0;\n}\n#mindmap {\n display: block;\n width: 100vw;\n height: 100vh;\n}\n</style>\n<!--CSS-->\n</head>\n<body>\n<svg id=\"mindmap\"></svg>\n<!--JS-->\n</body>\n</html>\n";
const BASE_JS = [`https://cdn.jsdelivr.net/npm/d3@${"6.7.0"}`, `https://cdn.jsdelivr.net/npm/markmap-view@${"0.13.3"}`].map(src => ({
const BASE_JS = [`https://cdn.jsdelivr.net/npm/d3@${"6.7.0"}`, `https://cdn.jsdelivr.net/npm/markmap-view@${"0.13.4-alpha.1+51f8ed9"}`].map(src => ({
type: 'script',

@@ -245,3 +245,3 @@ data: {

function cleanNode(node, depth = 0) {
function cleanNode(node) {
if (node.type === 'heading') {

@@ -287,3 +287,3 @@ // drop all paragraphs

} else {
node.children.forEach(child => cleanNode(child, depth + 1));
node.children.forEach(child => cleanNode(child));

@@ -294,4 +294,11 @@ if (node.children.length === 1 && !node.children[0].content) {

}
}
function resetDepth(node, depth = 0) {
var _node$children;
node.depth = depth;
(_node$children = node.children) == null ? void 0 : _node$children.forEach(child => {
resetDepth(child, depth + 1);
});
}

@@ -392,6 +399,6 @@

const comment = ctx.result.match(/^<!--([\s\S]*?)-->$/);
const data = comment == null ? void 0 : comment[1].trim();
const data = comment == null ? void 0 : comment[1].trim().split(' ');
if (data === 'fold') {
current.payload.fold = true;
if (data[0] === 'fold') {
current.payload.fold = ['all', 'recursively'].includes(data[1]) ? 2 : 1;
ctx.result = '';

@@ -431,2 +438,3 @@ }

if (((_root$children = root.children) == null ? void 0 : _root$children.length) === 1) root = root.children[0];
resetDepth(root);
return _extends__default({}, context, {

@@ -433,0 +441,0 @@ root

{
"name": "markmap-lib",
"version": "0.13.3",
"version": "0.13.4-alpha.1+51f8ed9",
"description": "Visualize your Markdown as mindmaps with Markmap",

@@ -38,3 +38,3 @@ "author": "Gerald <gera2ld@live.com>",

"@types/remarkable": "^2.0.3",
"markmap-view": "^0.13.3",
"markmap-view": "^0.13.4-alpha.1+51f8ed9",
"webfontloader": "^1.6.28"

@@ -46,3 +46,3 @@ },

"katex": "^0.15.1",
"markmap-common": "^0.13.3",
"markmap-common": "^0.13.4-alpha.1+51f8ed9",
"prismjs": "^1.25.0",

@@ -52,3 +52,3 @@ "remarkable": "^2.0.1",

},
"gitHead": "01d316cf6e7375cc3adfc94ccd257797fc0462db"
"gitHead": "51f8ed9512078ad6bd49932bd46c7c5646dbc7d8"
}

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

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

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