markmap-lib 0.15.0-alpha.0 → 0.15.1
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/browser/index.js +678 -510
- package/dist/browser/index.mjs +244 -10860
- package/dist/index.js +179 -176
- package/dist/index.mjs +179 -176
- package/package.json +20 -8
- package/types/constants.d.ts +2 -0
- package/types/index.d.ts +2 -2
- package/types/plugins/base.d.ts +3 -3
- package/types/plugins/frontmatter.d.ts +1 -1
- package/types/plugins/hljs.d.ts +2 -0
- package/types/plugins/index.d.ts +1 -1
- package/types/plugins/katex.browser.d.ts +2 -2
- package/types/plugins/katex.config.d.ts +2 -1
- package/types/plugins/katex.d.ts +2 -2
- package/types/plugins/npm-url.d.ts +1 -1
- package/types/plugins/prism.browser.d.ts +2 -2
- package/types/plugins/prism.config.d.ts +2 -1
- package/types/plugins/prism.d.ts +2 -2
- package/types/plugins/util.d.ts +4 -0
- package/types/transform.d.ts +10 -4
- package/types/types.d.ts +6 -2
- package/types/template.d.ts +0 -8
package/types/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Remarkable } from 'remarkable';
|
|
2
|
-
import { CSSItem, JSItem,
|
|
2
|
+
import { UrlBuilder, CSSItem, JSItem, IPureNode, IWrapContext, Hook, IMarkmapJSONOptions } from 'markmap-common';
|
|
3
3
|
type Htmltag = Remarkable.Rule<Remarkable.HtmlTagToken, string>;
|
|
4
4
|
export interface ITransformHooks {
|
|
5
|
+
transformer: ITransformer;
|
|
5
6
|
/**
|
|
6
7
|
* Tapped once when the parser is created.
|
|
7
8
|
*/
|
|
@@ -41,6 +42,9 @@ export interface IMarkmapCreateOptions {
|
|
|
41
42
|
export interface IFeatures {
|
|
42
43
|
[key: string]: boolean;
|
|
43
44
|
}
|
|
45
|
+
export interface ITransformer {
|
|
46
|
+
urlBuilder: UrlBuilder;
|
|
47
|
+
}
|
|
44
48
|
export interface ITransformContext {
|
|
45
49
|
features: IFeatures;
|
|
46
50
|
content: string;
|
|
@@ -51,7 +55,7 @@ export interface ITransformContext {
|
|
|
51
55
|
contentLineOffset: number;
|
|
52
56
|
}
|
|
53
57
|
export interface ITransformResult extends ITransformContext {
|
|
54
|
-
root:
|
|
58
|
+
root: IPureNode;
|
|
55
59
|
}
|
|
56
60
|
export interface ITransformPlugin {
|
|
57
61
|
name: string;
|
package/types/template.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { JSItem, INode, IMarkmapOptions, IMarkmapJSONOptions } from 'markmap-common';
|
|
2
|
-
import { IAssets } from './types';
|
|
3
|
-
export declare const baseJsPaths: string[];
|
|
4
|
-
export declare function fillTemplate(root: INode | undefined, assets: IAssets, extra?: {
|
|
5
|
-
baseJs?: JSItem[];
|
|
6
|
-
jsonOptions?: IMarkmapJSONOptions;
|
|
7
|
-
getOptions?: (jsonOptions: IMarkmapJSONOptions) => Partial<IMarkmapOptions>;
|
|
8
|
-
}): string;
|