markmap-lib 0.13.5 → 0.13.6-alpha.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markmap-lib",
3
- "version": "0.13.5",
3
+ "version": "0.13.6-alpha.4+70ae484",
4
4
  "description": "Visualize your Markdown as mindmaps with Markmap",
5
5
  "author": "Gerald <gera2ld@live.com>",
6
6
  "license": "MIT",
@@ -19,9 +19,16 @@
19
19
  },
20
20
  "main": "dist/index.js",
21
21
  "module": "dist/index.esm.js",
22
- "browser": "dist/browser/index.js",
23
22
  "unpkg": "dist/browser/index.min.js",
24
23
  "jsdelivr": "dist/browser/index.min.js",
24
+ "exports": {
25
+ ".": {
26
+ "browser": "./dist/browser/index.js",
27
+ "require": "./dist/index.js",
28
+ "default": "./dist/index.esm.js"
29
+ },
30
+ "./package.json": "./package.json"
31
+ },
25
32
  "typings": "types/index.d.ts",
26
33
  "files": [
27
34
  "dist",
@@ -35,17 +42,20 @@
35
42
  "repository": "git@github.com:gera2ld/markmap.git",
36
43
  "devDependencies": {
37
44
  "@types/remarkable": "^2.0.3",
38
- "markmap-view": "^0.13.5",
45
+ "markmap-common": "^0.13.4",
46
+ "markmap-view": "^0.13.6-alpha.4+70ae484",
39
47
  "webfontloader": "^1.6.28"
40
48
  },
41
49
  "dependencies": {
42
50
  "@babel/runtime": "^7.16.3",
43
51
  "js-yaml": "^4.1.0",
44
52
  "katex": "^0.15.1",
45
- "markmap-common": "^0.13.4",
46
53
  "prismjs": "^1.25.0",
47
54
  "remarkable": "^2.0.1",
48
55
  "remarkable-katex": "^1.1.8"
49
56
  },
50
- "gitHead": "8632a966c8e5c51acba08eab7815d5bbb15d8356"
57
+ "peerDependencies": {
58
+ "markmap-common": "^0.13.4"
59
+ },
60
+ "gitHead": "70ae4840c81db3ed8f7a143a11ce1cd6be9b4dbf"
51
61
  }
package/types/index.d.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  export * from './types';
2
2
  export * from './template';
3
3
  export * from './transform';
4
+ export declare const transformerVersions: {
5
+ 'markmap-lib': string;
6
+ d3: string;
7
+ };
@@ -1,5 +1,9 @@
1
1
  import { CSSItem, JSItem } from 'markmap-common';
2
2
  declare const _default: {
3
+ versions: {
4
+ katex: string;
5
+ webfontloader: string;
6
+ };
3
7
  preloadScripts: JSItem[];
4
8
  scripts: JSItem[];
5
9
  styles: CSSItem[];
@@ -1,5 +1,8 @@
1
1
  import { CSSItem, JSItem } from 'markmap-common';
2
2
  declare const _default: {
3
+ versions: {
4
+ prismjs: string;
5
+ };
3
6
  preloadScripts: JSItem[];
4
7
  styles: CSSItem[];
5
8
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Find NPM paths and resolve them to full URLs with the same package version as in this library.
3
+ */
4
+ export declare function resolveNpmPaths(paths: string[], name: string, version: string): string[];
package/types/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Remarkable } from 'remarkable';
2
- import { CSSItem, JSItem, INode, IWrapContext, Hook } from 'markmap-common';
2
+ import { CSSItem, JSItem, INode, IWrapContext, Hook, IMarkmapJSONOptions } from 'markmap-common';
3
3
  declare type Htmltag = Remarkable.Rule<Remarkable.HtmlTagToken, string>;
4
4
  export interface ITransformHooks {
5
5
  /**
@@ -43,7 +43,9 @@ export interface IFeatures {
43
43
  }
44
44
  export interface ITransformContext {
45
45
  features: IFeatures;
46
- frontmatter?: unknown;
46
+ frontmatter?: {
47
+ markmap?: IMarkmapJSONOptions;
48
+ };
47
49
  }
48
50
  export interface ITransformResult extends ITransformContext {
49
51
  root: INode;