markmap-autoloader 0.17.3-beta.3 → 0.18.0
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/README.md +0 -30
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -4
- package/dist/types.d.ts +15 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -74,33 +74,3 @@ Disable built-in plugins:
|
|
|
74
74
|
</script>
|
|
75
75
|
<script src="https://cdn.jsdelivr.net/npm/markmap-autoloader"></script>
|
|
76
76
|
```
|
|
77
|
-
|
|
78
|
-
## API
|
|
79
|
-
|
|
80
|
-
### Options
|
|
81
|
-
|
|
82
|
-
If `window.markmap.autoLoader` is defined before this package is loaded, it will be regarded as autoLoader options.
|
|
83
|
-
|
|
84
|
-
- `autoLoader.manual` _boolean_ default as `false`
|
|
85
|
-
|
|
86
|
-
Whether to render markmaps manually. If false, all elements matching `.markmap` will be rendered once this package loads or DOMContentLoaded is emitted, whichever later.
|
|
87
|
-
|
|
88
|
-
- `autoLoader.transformPlugins` _ITransformPlugin[]_
|
|
89
|
-
|
|
90
|
-
Override built-in plugins if provided. Set to `[]` to disable all built-in plugins for auto-loader.
|
|
91
|
-
|
|
92
|
-
- `autoLoader.onReady` _function_
|
|
93
|
-
|
|
94
|
-
Callback when markmap-lib/markmap-view and their dependencies are loaded. We can tweak global options in this callback.
|
|
95
|
-
|
|
96
|
-
### markmap.autoLoader.renderAll()
|
|
97
|
-
|
|
98
|
-
Render all elements matching `.markmap`.
|
|
99
|
-
|
|
100
|
-
### markmap.autoLoader.renderAllUnder(el)
|
|
101
|
-
|
|
102
|
-
Render all elements matching `.markmap` under container `el`.
|
|
103
|
-
|
|
104
|
-
### markmap.autoLoader.render(el)
|
|
105
|
-
|
|
106
|
-
Render markmap in `el`, which is supposed to have the class name `markmap`.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -350,11 +350,11 @@ this.markmap = this.markmap || {};
|
|
|
350
350
|
const autoLoaderOptions = {
|
|
351
351
|
baseJs: [
|
|
352
352
|
`d3@${"7.9.0"}`,
|
|
353
|
-
`markmap-lib@${"0.
|
|
354
|
-
`markmap-view@${"0.
|
|
355
|
-
`markmap-toolbar@${"0.
|
|
353
|
+
`markmap-lib@${"0.18.0"}`,
|
|
354
|
+
`markmap-view@${"0.18.0"}`,
|
|
355
|
+
`markmap-toolbar@${"0.18.0"}`
|
|
356
356
|
],
|
|
357
|
-
baseCss: [`markmap-toolbar@${"0.
|
|
357
|
+
baseCss: [`markmap-toolbar@${"0.18.0"}/dist/style.css`],
|
|
358
358
|
manual: false,
|
|
359
359
|
toolbar: false,
|
|
360
360
|
...(_a = window.markmap) == null ? void 0 : _a.autoLoader
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSItem, CSSItem } from 'markmap-common';
|
|
2
|
+
import { ITransformPlugin } from 'markmap-lib';
|
|
3
|
+
export interface AutoLoaderOptions {
|
|
4
|
+
baseJs: (string | JSItem)[];
|
|
5
|
+
baseCss: (string | CSSItem)[];
|
|
6
|
+
provider: string | ((path: string) => string);
|
|
7
|
+
/** Callback when markmap-lib/markmap-view and their dependencies are loaded. We can tweak global options in this callback. */
|
|
8
|
+
onReady: () => void;
|
|
9
|
+
/** Override built-in plugins if provided. Set to `[]` to disable all built-in plugins for auto-loader. */
|
|
10
|
+
transformPlugins: Array<ITransformPlugin | (() => ITransformPlugin)>;
|
|
11
|
+
/** Whether to render markmaps manually. If false, all elements matching `.markmap` will be rendered once this package loads or DOMContentLoaded is emitted, whichever later. */
|
|
12
|
+
manual: boolean;
|
|
13
|
+
/** Whether to create a toolbar for each markmap. */
|
|
14
|
+
toolbar: boolean;
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markmap-autoloader",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Load markmaps automatically in HTML",
|
|
5
5
|
"author": "Gerald <gera2ld@live.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"clean": "del-cli dist",
|
|
23
23
|
"build:types": "tsc",
|
|
24
24
|
"build:js": "vite build",
|
|
25
|
-
"build": "
|
|
26
|
-
"prepublishOnly": "
|
|
25
|
+
"build": "pnpm clean && pnpm /^build:/",
|
|
26
|
+
"prepublishOnly": "pnpm build"
|
|
27
27
|
},
|
|
28
28
|
"bugs": {
|
|
29
29
|
"url": "https://github.com/markmap/markmap/issues"
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"markmap-common": "*"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"markmap-common": "0.
|
|
42
|
-
"markmap-lib": "0.
|
|
43
|
-
"markmap-toolbar": "0.
|
|
44
|
-
"markmap-view": "0.
|
|
41
|
+
"markmap-common": "0.18.0",
|
|
42
|
+
"markmap-lib": "0.18.0",
|
|
43
|
+
"markmap-toolbar": "0.18.0",
|
|
44
|
+
"markmap-view": "0.18.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "652d042cdd980487e5de70c8e1405ecf0721fa9c"
|
|
47
47
|
}
|