markmap-lib 0.14.5-alpha.17 → 0.14.5-alpha.19

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.
@@ -1,4 +1,4 @@
1
- /*! markmap-lib v0.14.5-alpha.17+0d6a717 | MIT License */
1
+ /*! markmap-lib v0.14.5-alpha.19+5323905 | MIT License */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('katex')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'katex'], factory) :
@@ -20,7 +20,7 @@ function _extends$1() {
20
20
  return _extends$1.apply(this, arguments);
21
21
  }
22
22
 
23
- /*! markmap-common v0.14.2 | MIT License */
23
+ /*! markmap-common v0.14.5-alpha.19+5323905 | MIT License */
24
24
  class Hook {
25
25
  constructor() {
26
26
  this.listeners = [];
@@ -391,7 +391,7 @@ function buildCSSItem(path, overrideProvider) {
391
391
  }
392
392
 
393
393
  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" ;
394
- const baseJsPaths = [`d3@${"6.2.0"}/dist/d3.min.js`, `markmap-view@${"0.14.5-alpha.17+0d6a717"}/dist/browser/index.js`];
394
+ const baseJsPaths = [`d3@${"7.8.5"}/dist/d3.min.js`, `markmap-view@${"0.14.5-alpha.19"}/dist/browser/index.js`];
395
395
  function fillTemplate(root, assets, extra) {
396
396
  var _extra, _extra$baseJs;
397
397
  extra = _extends$1({}, extra);
@@ -7689,13 +7689,13 @@ var remarkableKatex = rkatex;
7689
7689
  var remarkableKatex$1 = /*@__PURE__*/getDefaultExportFromCjs(remarkableKatex);
7690
7690
 
7691
7691
  function getConfig$1() {
7692
- const preloadScripts = [`katex@${"0.16.0"}/dist/katex.min.js`].map(path => buildJSItem(path));
7692
+ const preloadScripts = [`katex@${"0.16.8"}/dist/katex.min.js`].map(path => buildJSItem(path));
7693
7693
  const webfontloader = buildJSItem(`webfontloader@${"1.6.28"}/webfontloader.js`);
7694
7694
  webfontloader.data.defer = true;
7695
- const styles = [`katex@${"0.16.0"}/dist/katex.min.css`].map(path => buildCSSItem(path));
7695
+ const styles = [`katex@${"0.16.8"}/dist/katex.min.css`].map(path => buildCSSItem(path));
7696
7696
  return {
7697
7697
  versions: {
7698
- katex: "0.16.0" ,
7698
+ katex: "0.16.8" ,
7699
7699
  webfontloader: "1.6.28"
7700
7700
  },
7701
7701
  preloadScripts,
@@ -7820,11 +7820,11 @@ var katex = definePlugin(() => {
7820
7820
  });
7821
7821
 
7822
7822
  function getConfig() {
7823
- const preloadScripts = [`prismjs@${"1.28.0"}/components/prism-core.min.js`, `prismjs@${"1.28.0"}/plugins/autoloader/prism-autoloader.min.js`].map(path => buildJSItem(path));
7824
- const styles = [`prismjs@${"1.28.0"}/themes/prism.css`].map(path => buildCSSItem(path));
7823
+ const preloadScripts = [`prismjs@${"1.29.0"}/components/prism-core.min.js`, `prismjs@${"1.29.0"}/plugins/autoloader/prism-autoloader.min.js`].map(path => buildJSItem(path));
7824
+ const styles = [`prismjs@${"1.29.0"}/themes/prism.css`].map(path => buildCSSItem(path));
7825
7825
  return {
7826
7826
  versions: {
7827
- prismjs: "1.28.0"
7827
+ prismjs: "1.29.0"
7828
7828
  },
7829
7829
  preloadScripts,
7830
7830
  styles
@@ -11158,13 +11158,13 @@ class Transformer {
11158
11158
  const stack = [root];
11159
11159
  let depth = 0;
11160
11160
  for (const token of tokens) {
11161
+ const payload = {};
11162
+ if (token.lines) {
11163
+ payload.lines = token.lines;
11164
+ }
11161
11165
  let current = stack[stack.length - 1];
11162
11166
  if (token.type.endsWith('_open')) {
11163
11167
  const type = token.type.slice(0, -5);
11164
- const payload = {};
11165
- if (token.lines) {
11166
- payload.lines = token.lines;
11167
- }
11168
11168
  if (type === 'heading') {
11169
11169
  depth = token.hLevel;
11170
11170
  while (((_current = current) == null ? void 0 : _current.depth) >= depth) {
@@ -11221,7 +11221,8 @@ class Transformer {
11221
11221
  type: token.type,
11222
11222
  depth: depth + 1,
11223
11223
  content: result,
11224
- children: []
11224
+ children: [],
11225
+ payload
11225
11226
  });
11226
11227
  } else ;
11227
11228
  }
@@ -11276,8 +11277,8 @@ class Transformer {
11276
11277
  }
11277
11278
 
11278
11279
  const transformerVersions = {
11279
- 'markmap-lib': '0.14.5-alpha.17+0d6a717',
11280
- d3: "6.2.0"
11280
+ 'markmap-lib': '0.14.5-alpha.19+5323905',
11281
+ d3: "7.8.5"
11281
11282
  };
11282
11283
 
11283
11284
  exports.Transformer = Transformer;
@@ -1,4 +1,4 @@
1
- /*! markmap-lib v0.14.5-alpha.17+0d6a717 | MIT License */
1
+ /*! markmap-lib v0.14.5-alpha.19+5323905 | MIT License */
2
2
  import require$$0 from 'katex';
3
3
 
4
4
  function _extends$1() {
@@ -16,7 +16,7 @@ function _extends$1() {
16
16
  return _extends$1.apply(this, arguments);
17
17
  }
18
18
 
19
- /*! markmap-common v0.14.2 | MIT License */
19
+ /*! markmap-common v0.14.5-alpha.19+5323905 | MIT License */
20
20
  class Hook {
21
21
  constructor() {
22
22
  this.listeners = [];
@@ -387,7 +387,7 @@ function buildCSSItem(path, overrideProvider) {
387
387
  }
388
388
 
389
389
  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" ;
390
- const baseJsPaths = [`d3@${"6.2.0"}/dist/d3.min.js`, `markmap-view@${"0.14.5-alpha.17+0d6a717"}/dist/browser/index.js`];
390
+ const baseJsPaths = [`d3@${"7.8.5"}/dist/d3.min.js`, `markmap-view@${"0.14.5-alpha.19"}/dist/browser/index.js`];
391
391
  function fillTemplate(root, assets, extra) {
392
392
  var _extra, _extra$baseJs;
393
393
  extra = _extends$1({}, extra);
@@ -7685,13 +7685,13 @@ var remarkableKatex = rkatex;
7685
7685
  var remarkableKatex$1 = /*@__PURE__*/getDefaultExportFromCjs(remarkableKatex);
7686
7686
 
7687
7687
  function getConfig$1() {
7688
- const preloadScripts = [`katex@${"0.16.0"}/dist/katex.min.js`].map(path => buildJSItem(path));
7688
+ const preloadScripts = [`katex@${"0.16.8"}/dist/katex.min.js`].map(path => buildJSItem(path));
7689
7689
  const webfontloader = buildJSItem(`webfontloader@${"1.6.28"}/webfontloader.js`);
7690
7690
  webfontloader.data.defer = true;
7691
- const styles = [`katex@${"0.16.0"}/dist/katex.min.css`].map(path => buildCSSItem(path));
7691
+ const styles = [`katex@${"0.16.8"}/dist/katex.min.css`].map(path => buildCSSItem(path));
7692
7692
  return {
7693
7693
  versions: {
7694
- katex: "0.16.0" ,
7694
+ katex: "0.16.8" ,
7695
7695
  webfontloader: "1.6.28"
7696
7696
  },
7697
7697
  preloadScripts,
@@ -7816,11 +7816,11 @@ var katex = definePlugin(() => {
7816
7816
  });
7817
7817
 
7818
7818
  function getConfig() {
7819
- const preloadScripts = [`prismjs@${"1.28.0"}/components/prism-core.min.js`, `prismjs@${"1.28.0"}/plugins/autoloader/prism-autoloader.min.js`].map(path => buildJSItem(path));
7820
- const styles = [`prismjs@${"1.28.0"}/themes/prism.css`].map(path => buildCSSItem(path));
7819
+ const preloadScripts = [`prismjs@${"1.29.0"}/components/prism-core.min.js`, `prismjs@${"1.29.0"}/plugins/autoloader/prism-autoloader.min.js`].map(path => buildJSItem(path));
7820
+ const styles = [`prismjs@${"1.29.0"}/themes/prism.css`].map(path => buildCSSItem(path));
7821
7821
  return {
7822
7822
  versions: {
7823
- prismjs: "1.28.0"
7823
+ prismjs: "1.29.0"
7824
7824
  },
7825
7825
  preloadScripts,
7826
7826
  styles
@@ -11154,13 +11154,13 @@ class Transformer {
11154
11154
  const stack = [root];
11155
11155
  let depth = 0;
11156
11156
  for (const token of tokens) {
11157
+ const payload = {};
11158
+ if (token.lines) {
11159
+ payload.lines = token.lines;
11160
+ }
11157
11161
  let current = stack[stack.length - 1];
11158
11162
  if (token.type.endsWith('_open')) {
11159
11163
  const type = token.type.slice(0, -5);
11160
- const payload = {};
11161
- if (token.lines) {
11162
- payload.lines = token.lines;
11163
- }
11164
11164
  if (type === 'heading') {
11165
11165
  depth = token.hLevel;
11166
11166
  while (((_current = current) == null ? void 0 : _current.depth) >= depth) {
@@ -11217,7 +11217,8 @@ class Transformer {
11217
11217
  type: token.type,
11218
11218
  depth: depth + 1,
11219
11219
  content: result,
11220
- children: []
11220
+ children: [],
11221
+ payload
11221
11222
  });
11222
11223
  } else ;
11223
11224
  }
@@ -11272,8 +11273,8 @@ class Transformer {
11272
11273
  }
11273
11274
 
11274
11275
  const transformerVersions = {
11275
- 'markmap-lib': '0.14.5-alpha.17+0d6a717',
11276
- d3: "6.2.0"
11276
+ 'markmap-lib': '0.14.5-alpha.19+5323905',
11277
+ d3: "7.8.5"
11277
11278
  };
11278
11279
 
11279
11280
  export { Transformer, baseJsPaths, plugins as builtInPlugins, fillTemplate, transformerVersions };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! markmap-lib v0.14.5-alpha.17+0d6a717 | MIT License */
1
+ /*! markmap-lib v0.14.5-alpha.19+5323905 | MIT License */
2
2
  'use strict';
3
3
 
4
4
  var _extends = require('@babel/runtime/helpers/extends');
@@ -10,7 +10,7 @@ var loadLanguages = require('prismjs/components/index.js');
10
10
  var yaml = require('js-yaml');
11
11
 
12
12
  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" ;
13
- const baseJsPaths = [`d3@${"6.2.0"}/dist/d3.min.js`, `markmap-view@${"0.14.5-alpha.17+0d6a717"}/dist/browser/index.js`];
13
+ const baseJsPaths = [`d3@${"7.8.5"}/dist/d3.min.js`, `markmap-view@${"0.14.5-alpha.19"}/dist/browser/index.js`];
14
14
  function fillTemplate(root, assets, extra) {
15
15
  var _extra, _extra$baseJs;
16
16
  extra = _extends({}, extra);
@@ -48,13 +48,13 @@ function fillTemplate(root, assets, extra) {
48
48
  }
49
49
 
50
50
  function getConfig$1() {
51
- const preloadScripts = [`katex@${"0.16.0"}/dist/katex.min.js`].map(path => markmapCommon.buildJSItem(path));
51
+ const preloadScripts = [`katex@${"0.16.8"}/dist/katex.min.js`].map(path => markmapCommon.buildJSItem(path));
52
52
  const webfontloader = markmapCommon.buildJSItem(`webfontloader@${"1.6.28"}/webfontloader.js`);
53
53
  webfontloader.data.defer = true;
54
- const styles = [`katex@${"0.16.0"}/dist/katex.min.css`].map(path => markmapCommon.buildCSSItem(path));
54
+ const styles = [`katex@${"0.16.8"}/dist/katex.min.css`].map(path => markmapCommon.buildCSSItem(path));
55
55
  return {
56
56
  versions: {
57
- katex: "0.16.0" ,
57
+ katex: "0.16.8" ,
58
58
  webfontloader: "1.6.28"
59
59
  },
60
60
  preloadScripts,
@@ -128,11 +128,11 @@ var katex = definePlugin(() => {
128
128
  });
129
129
 
130
130
  function getConfig() {
131
- const preloadScripts = [`prismjs@${"1.28.0"}/components/prism-core.min.js`, `prismjs@${"1.28.0"}/plugins/autoloader/prism-autoloader.min.js`].map(path => markmapCommon.buildJSItem(path));
132
- const styles = [`prismjs@${"1.28.0"}/themes/prism.css`].map(path => markmapCommon.buildCSSItem(path));
131
+ const preloadScripts = [`prismjs@${"1.29.0"}/components/prism-core.min.js`, `prismjs@${"1.29.0"}/plugins/autoloader/prism-autoloader.min.js`].map(path => markmapCommon.buildJSItem(path));
132
+ const styles = [`prismjs@${"1.29.0"}/themes/prism.css`].map(path => markmapCommon.buildCSSItem(path));
133
133
  return {
134
134
  versions: {
135
- prismjs: "1.28.0"
135
+ prismjs: "1.29.0"
136
136
  },
137
137
  preloadScripts,
138
138
  styles
@@ -342,13 +342,13 @@ class Transformer {
342
342
  const stack = [root];
343
343
  let depth = 0;
344
344
  for (const token of tokens) {
345
+ const payload = {};
346
+ if (token.lines) {
347
+ payload.lines = token.lines;
348
+ }
345
349
  let current = stack[stack.length - 1];
346
350
  if (token.type.endsWith('_open')) {
347
351
  const type = token.type.slice(0, -5);
348
- const payload = {};
349
- if (token.lines) {
350
- payload.lines = token.lines;
351
- }
352
352
  if (type === 'heading') {
353
353
  depth = token.hLevel;
354
354
  while (((_current = current) == null ? void 0 : _current.depth) >= depth) {
@@ -405,7 +405,8 @@ class Transformer {
405
405
  type: token.type,
406
406
  depth: depth + 1,
407
407
  content: result,
408
- children: []
408
+ children: [],
409
+ payload
409
410
  });
410
411
  } else ;
411
412
  }
@@ -460,8 +461,8 @@ class Transformer {
460
461
  }
461
462
 
462
463
  const transformerVersions = {
463
- 'markmap-lib': '0.14.5-alpha.17+0d6a717',
464
- d3: "6.2.0"
464
+ 'markmap-lib': '0.14.5-alpha.19+5323905',
465
+ d3: "7.8.5"
465
466
  };
466
467
 
467
468
  exports.Transformer = Transformer;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! markmap-lib v0.14.5-alpha.17+0d6a717 | MIT License */
1
+ /*! markmap-lib v0.14.5-alpha.19+5323905 | MIT License */
2
2
  import _extends from '@babel/runtime/helpers/esm/extends';
3
3
  import { buildJSItem, persistCSS, persistJS, buildCSSItem, Hook, wrapFunction, noop, getFullUrl } from 'markmap-common';
4
4
  import { Remarkable } from 'remarkable';
@@ -8,7 +8,7 @@ import loadLanguages from 'prismjs/components/index.js';
8
8
  import yaml from 'js-yaml';
9
9
 
10
10
  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" ;
11
- const baseJsPaths = [`d3@${"6.2.0"}/dist/d3.min.js`, `markmap-view@${"0.14.5-alpha.17+0d6a717"}/dist/browser/index.js`];
11
+ const baseJsPaths = [`d3@${"7.8.5"}/dist/d3.min.js`, `markmap-view@${"0.14.5-alpha.19"}/dist/browser/index.js`];
12
12
  function fillTemplate(root, assets, extra) {
13
13
  var _extra, _extra$baseJs;
14
14
  extra = _extends({}, extra);
@@ -46,13 +46,13 @@ function fillTemplate(root, assets, extra) {
46
46
  }
47
47
 
48
48
  function getConfig$1() {
49
- const preloadScripts = [`katex@${"0.16.0"}/dist/katex.min.js`].map(path => buildJSItem(path));
49
+ const preloadScripts = [`katex@${"0.16.8"}/dist/katex.min.js`].map(path => buildJSItem(path));
50
50
  const webfontloader = buildJSItem(`webfontloader@${"1.6.28"}/webfontloader.js`);
51
51
  webfontloader.data.defer = true;
52
- const styles = [`katex@${"0.16.0"}/dist/katex.min.css`].map(path => buildCSSItem(path));
52
+ const styles = [`katex@${"0.16.8"}/dist/katex.min.css`].map(path => buildCSSItem(path));
53
53
  return {
54
54
  versions: {
55
- katex: "0.16.0" ,
55
+ katex: "0.16.8" ,
56
56
  webfontloader: "1.6.28"
57
57
  },
58
58
  preloadScripts,
@@ -126,11 +126,11 @@ var katex = definePlugin(() => {
126
126
  });
127
127
 
128
128
  function getConfig() {
129
- const preloadScripts = [`prismjs@${"1.28.0"}/components/prism-core.min.js`, `prismjs@${"1.28.0"}/plugins/autoloader/prism-autoloader.min.js`].map(path => buildJSItem(path));
130
- const styles = [`prismjs@${"1.28.0"}/themes/prism.css`].map(path => buildCSSItem(path));
129
+ const preloadScripts = [`prismjs@${"1.29.0"}/components/prism-core.min.js`, `prismjs@${"1.29.0"}/plugins/autoloader/prism-autoloader.min.js`].map(path => buildJSItem(path));
130
+ const styles = [`prismjs@${"1.29.0"}/themes/prism.css`].map(path => buildCSSItem(path));
131
131
  return {
132
132
  versions: {
133
- prismjs: "1.28.0"
133
+ prismjs: "1.29.0"
134
134
  },
135
135
  preloadScripts,
136
136
  styles
@@ -340,13 +340,13 @@ class Transformer {
340
340
  const stack = [root];
341
341
  let depth = 0;
342
342
  for (const token of tokens) {
343
+ const payload = {};
344
+ if (token.lines) {
345
+ payload.lines = token.lines;
346
+ }
343
347
  let current = stack[stack.length - 1];
344
348
  if (token.type.endsWith('_open')) {
345
349
  const type = token.type.slice(0, -5);
346
- const payload = {};
347
- if (token.lines) {
348
- payload.lines = token.lines;
349
- }
350
350
  if (type === 'heading') {
351
351
  depth = token.hLevel;
352
352
  while (((_current = current) == null ? void 0 : _current.depth) >= depth) {
@@ -403,7 +403,8 @@ class Transformer {
403
403
  type: token.type,
404
404
  depth: depth + 1,
405
405
  content: result,
406
- children: []
406
+ children: [],
407
+ payload
407
408
  });
408
409
  } else ;
409
410
  }
@@ -458,8 +459,8 @@ class Transformer {
458
459
  }
459
460
 
460
461
  const transformerVersions = {
461
- 'markmap-lib': '0.14.5-alpha.17+0d6a717',
462
- d3: "6.2.0"
462
+ 'markmap-lib': '0.14.5-alpha.19+5323905',
463
+ d3: "7.8.5"
463
464
  };
464
465
 
465
466
  export { Transformer, baseJsPaths, plugins as builtInPlugins, fillTemplate, transformerVersions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markmap-lib",
3
- "version": "0.14.5-alpha.17+0d6a717",
3
+ "version": "0.14.5-alpha.19+5323905",
4
4
  "description": "Visualize your Markdown as mindmaps with Markmap",
5
5
  "author": "Gerald <gera2ld@live.com>",
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "dev": "rollup -wc rollup.conf.js",
9
9
  "clean": "del-cli dist types",
10
10
  "build:types": "tsc",
11
- "build:js": "rollup -c rollup.conf.js"
11
+ "build:js": "rollup -c"
12
12
  },
13
13
  "publishConfig": {
14
14
  "access": "public",
@@ -47,20 +47,20 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/remarkable": "^2.0.3",
50
- "markmap-common": "0.14.2",
51
- "markmap-view": "0.14.5-alpha.17+0d6a717",
50
+ "markmap-common": "0.14.5-alpha.19+5323905",
51
+ "markmap-view": "0.14.5-alpha.19+5323905",
52
52
  "webfontloader": "^1.6.28"
53
53
  },
54
54
  "dependencies": {
55
- "@babel/runtime": "^7.18.9",
55
+ "@babel/runtime": "^7.22.6",
56
56
  "js-yaml": "^4.1.0",
57
- "katex": "^0.16.0",
58
- "prismjs": "^1.28.0",
57
+ "katex": "^0.16.8",
58
+ "prismjs": "^1.29.0",
59
59
  "remarkable": "^2.0.1",
60
60
  "remarkable-katex": "^1.2.1"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "markmap-common": "*"
64
64
  },
65
- "gitHead": "0d6a717b05c622a23faa501e79a7da7cda3ea0b6"
65
+ "gitHead": "532390588885518c11fa50b8a77c0694821cfecf"
66
66
  }