markmap-view 0.18.8 → 0.18.9
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/dist/constants.d.ts +2 -1
- package/dist/types.d.ts +24 -0
- package/dist/util.d.ts +1 -2
- package/dist/view.d.ts +2 -2
- package/package.json +3 -3
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INode } from 'markmap-common';
|
|
2
|
+
import { IMarkmapOptions } from './types';
|
|
2
3
|
export declare const isMacintosh: boolean;
|
|
3
4
|
export declare const defaultColorFn: import("d3").ScaleOrdinal<string, string, never>;
|
|
4
5
|
export declare const lineWidthFactory: (baseWidth?: number, deltaWidth?: number, k?: number) => (node: INode) => number;
|
package/dist/types.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export interface IMarkmapState {
|
|
|
10
10
|
y2: number;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Portable options that can be derived into `IMarkmapOptions`.
|
|
15
|
+
*/
|
|
13
16
|
export interface IMarkmapJSONOptions {
|
|
14
17
|
color: string[];
|
|
15
18
|
colorFreezeLevel: number;
|
|
@@ -28,6 +31,27 @@ export interface IMarkmapJSONOptions {
|
|
|
28
31
|
zoom: boolean;
|
|
29
32
|
lineWidth: number | number[];
|
|
30
33
|
}
|
|
34
|
+
export interface IMarkmapOptions {
|
|
35
|
+
autoFit: boolean;
|
|
36
|
+
duration: number;
|
|
37
|
+
embedGlobalCSS: boolean;
|
|
38
|
+
fitRatio: number;
|
|
39
|
+
id?: string;
|
|
40
|
+
initialExpandLevel: number;
|
|
41
|
+
maxInitialScale: number;
|
|
42
|
+
pan: boolean;
|
|
43
|
+
scrollForPan: boolean;
|
|
44
|
+
style?: (id: string) => string;
|
|
45
|
+
toggleRecursively: boolean;
|
|
46
|
+
zoom: boolean;
|
|
47
|
+
color: (node: INode) => string;
|
|
48
|
+
lineWidth: (node: INode) => number;
|
|
49
|
+
maxWidth: number;
|
|
50
|
+
nodeMinHeight: number;
|
|
51
|
+
paddingX: number;
|
|
52
|
+
spacingHorizontal: number;
|
|
53
|
+
spacingVertical: number;
|
|
54
|
+
}
|
|
31
55
|
export interface IPadding {
|
|
32
56
|
left: number;
|
|
33
57
|
right: number;
|
package/dist/util.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMarkmapOptions } from '
|
|
2
|
-
import { IMarkmapJSONOptions } from './types';
|
|
1
|
+
import { IMarkmapJSONOptions, IMarkmapOptions } from './types';
|
|
3
2
|
export declare function deriveOptions(jsonOptions?: Partial<IMarkmapJSONOptions>): Partial<IMarkmapOptions>;
|
|
4
3
|
/**
|
|
5
4
|
* Credit: https://gist.github.com/jlevy/c246006675becc446360a798e2b2d781?permalink_comment_id=4738050#gistcomment-4738050
|
package/dist/view.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as d3 from 'd3';
|
|
2
|
-
import { Hook,
|
|
3
|
-
import { ID3SVGElement, IMarkmapState, IPadding } from './types';
|
|
2
|
+
import { Hook, INode, IPureNode } from 'markmap-common';
|
|
3
|
+
import { ID3SVGElement, IMarkmapOptions, IMarkmapState, IPadding } from './types';
|
|
4
4
|
export declare const globalCSS: string;
|
|
5
5
|
/**
|
|
6
6
|
* A global hook to refresh all markmaps when called.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markmap-view",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.9",
|
|
4
4
|
"description": "View markmaps in browser",
|
|
5
5
|
"author": "Gerald <gera2ld@live.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@types/d3": "^7.4.0",
|
|
47
47
|
"@types/d3-flextree": "^2.1.1",
|
|
48
48
|
"d3-flextree": "^2.1.2",
|
|
49
|
-
"markmap-common": "0.18.
|
|
49
|
+
"markmap-common": "0.18.9"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"markmap-common": "*"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "4247555f57017ffc9297e5e5e031c4119de3ebaf"
|
|
55
55
|
}
|