markmap-cli 0.18.11 → 0.18.12-alpha.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.
@@ -210,6 +210,16 @@
210
210
  });
211
211
  }
212
212
  });
213
+ this.register({
214
+ id: "dark",
215
+ title: "Toggle dark theme",
216
+ content: _Toolbar.icon(
217
+ "M10 4a6 6 0 0 0 0 12a6 6 0 0 0 0 -12v2a4 4 0 0 1 0 8z"
218
+ ),
219
+ onClick: () => {
220
+ document.documentElement.classList.toggle("markmap-dark");
221
+ }
222
+ });
213
223
  this.render();
214
224
  }
215
225
  static create(mm) {
@@ -226,6 +236,7 @@
226
236
  };
227
237
  return /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx("path", { ...attrs, d: path }) });
228
238
  }
239
+ /** @deprecated Set `showBrand` instead. */
229
240
  setBrand(show) {
230
241
  this.showBrand = show;
231
242
  return this.render();
@@ -273,7 +284,8 @@
273
284
  "zoomIn",
274
285
  "zoomOut",
275
286
  "fit",
276
- "recurse"
287
+ "recurse",
288
+ "dark"
277
289
  ];
278
290
  let Toolbar = _Toolbar;
279
291
  exports.Toolbar = Toolbar;
@@ -588,34 +588,9 @@
588
588
  links: node_links,
589
589
  copy: node_copy
590
590
  };
591
- const name = "d3-flextree";
592
591
  const version$1 = "2.1.2";
593
- const main = "build/d3-flextree.js";
594
- const module = "index";
595
- const author = { "name": "Chris Maloney", "url": "http://chrismaloney.org" };
596
- const description = "Flexible tree layout algorithm that allows for variable node sizes.";
597
- const keywords = ["d3", "d3-module", "layout", "tree", "hierarchy", "d3-hierarchy", "plugin", "d3-plugin", "infovis", "visualization", "2d"];
598
- const homepage = "https://github.com/klortho/d3-flextree";
599
- const license = "WTFPL";
600
- const repository = { "type": "git", "url": "https://github.com/klortho/d3-flextree.git" };
601
- const scripts = { "clean": "rm -rf build demo test", "build:demo": "rollup -c --environment BUILD:demo", "build:dev": "rollup -c --environment BUILD:dev", "build:prod": "rollup -c --environment BUILD:prod", "build:test": "rollup -c --environment BUILD:test", "build": "rollup -c", "lint": "eslint index.js src", "test:main": "node test/bundle.js", "test:browser": "node test/browser-tests.js", "test": "npm-run-all test:*", "prepare": "npm-run-all clean build lint test" };
602
- const dependencies = { "d3-hierarchy": "^1.1.5" };
603
- const devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-preset-es2015-rollup": "^3.0.0", "d3": "^4.13.0", "d3-selection-multi": "^1.0.1", "eslint": "^4.19.1", "jsdom": "^11.6.2", "npm-run-all": "^4.1.2", "rollup": "^0.55.3", "rollup-plugin-babel": "^2.7.1", "rollup-plugin-commonjs": "^8.0.2", "rollup-plugin-copy": "^0.2.3", "rollup-plugin-json": "^2.3.0", "rollup-plugin-node-resolve": "^3.0.2", "rollup-plugin-uglify": "^3.0.0", "uglify-es": "^3.3.9" };
604
592
  const packageInfo = {
605
- name,
606
- version: version$1,
607
- main,
608
- module,
609
- "jsnext:main": "index",
610
- author,
611
- description,
612
- keywords,
613
- homepage,
614
- license,
615
- repository,
616
- scripts,
617
- dependencies,
618
- devDependencies
593
+ version: version$1
619
594
  };
620
595
  const { version } = packageInfo;
621
596
  const defaults = Object.freeze({
@@ -625,8 +600,8 @@
625
600
  });
626
601
  function flextree(options) {
627
602
  const opts = Object.assign({}, defaults, options);
628
- function accessor(name2) {
629
- const opt = opts[name2];
603
+ function accessor(name) {
604
+ const opt = opts[name];
630
605
  return typeof opt === "function" ? opt : () => opt;
631
606
  }
632
607
  function layout(tree) {
@@ -1,7 +1,7 @@
1
- import { buildCSSItem, buildJSItem } from "markmap-common";
1
+ import { buildJSItem, buildCSSItem } from "markmap-common";
2
2
  import { dirname } from "path";
3
3
  import { fileURLToPath } from "url";
4
- const TOOLBAR_VERSION = "0.18.10";
4
+ const TOOLBAR_VERSION = "0.18.12-alpha.3+5e694ce";
5
5
  const TOOLBAR_CSS = `markmap-toolbar@${TOOLBAR_VERSION}/dist/style.css`;
6
6
  const TOOLBAR_JS = `markmap-toolbar@${TOOLBAR_VERSION}/dist/index.js`;
7
7
  const distDir = dirname(fileURLToPath(import.meta.url));
@@ -54,8 +54,8 @@ const config = {
54
54
  };
55
55
  export {
56
56
  ASSETS_PREFIX as A,
57
- config as a,
58
- createStreamBody as c,
57
+ createStreamBody as a,
58
+ config as c,
59
59
  localProvider as l,
60
60
  toolbarAssets as t
61
61
  };
@@ -5,7 +5,7 @@ import { Transformer } from "markmap-lib";
5
5
  import { baseJsPaths } from "markmap-render";
6
6
  import { resolve, dirname } from "path";
7
7
  import { pipeline } from "stream/promises";
8
- import { l as localProvider, A as ASSETS_PREFIX, t as toolbarAssets, a as config, c as createStreamBody } from "./common-DBhJ53_3.js";
8
+ import { l as localProvider, A as ASSETS_PREFIX, t as toolbarAssets, c as config, a as createStreamBody } from "./common-3UtFf9wh.js";
9
9
  const providerName = "local-hook";
10
10
  async function fetchAssets({
11
11
  assetsDir = config.assetsDir,
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { readFile, stat, writeFile } from "fs/promises";
1
+ import { stat, readFile, writeFile } from "fs/promises";
2
2
  import { mergeAssets, defer, buildJSItem } from "markmap-common";
3
3
  import { Transformer } from "markmap-lib";
4
4
  import * as markmapLib from "markmap-lib";
5
5
  import { fillTemplate, baseJsPaths } from "markmap-render";
6
6
  import open from "open";
7
7
  import { join, resolve } from "path";
8
- import { t as toolbarAssets, A as ASSETS_PREFIX, l as localProvider, c as createStreamBody, a as config } from "./common-DBhJ53_3.js";
8
+ import { l as localProvider, t as toolbarAssets, c as config, A as ASSETS_PREFIX, a as createStreamBody } from "./common-3UtFf9wh.js";
9
9
  import { serve } from "@hono/node-server";
10
10
  import { watch } from "chokidar";
11
11
  import { createHash } from "crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markmap-cli",
3
- "version": "0.18.11",
3
+ "version": "0.18.12-alpha.3+5e694ce",
4
4
  "description": "Create markmaps from CLI",
5
5
  "author": "Gerald <gera2ld@live.com>",
6
6
  "license": "MIT",
@@ -51,12 +51,12 @@
51
51
  "hono": "^4.6.13",
52
52
  "markmap-common": "0.18.9",
53
53
  "markmap-lib": "0.18.11",
54
- "markmap-render": "0.18.10",
55
- "markmap-toolbar": "0.18.10",
54
+ "markmap-render": "0.18.12-alpha.3+5e694ce",
55
+ "markmap-toolbar": "0.18.12-alpha.3+5e694ce",
56
56
  "open": "^10.1.0",
57
57
  "portfinder": "^1.0.32",
58
58
  "read-package-up": "^11.0.0",
59
59
  "update-notifier": "^7.3.1"
60
60
  },
61
- "gitHead": "3b7043680377fc886f0f5d4fabea015c47df0c4e"
61
+ "gitHead": "5e694cef13598557fe8cdf1d2b43396fd3edc07b"
62
62
  }