markmap-lib 0.18.4 → 0.18.5-alpha.7
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.iife.js +11 -16
- package/dist/browser/index.mjs +11 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -8
- package/dist/index.mjs +1 -8
- package/dist/index.no-plugins.js +1 -8
- package/dist/index.no-plugins.mjs +1 -8
- package/dist/plugins/hljs/config.d.ts +1 -1
- package/dist/plugins/katex/config.d.ts +3 -2
- package/dist/plugins/prism/config.d.ts +1 -1
- package/dist/plugins.js +10 -8
- package/dist/plugins.mjs +10 -8
- package/dist/transform.d.ts +0 -1
- package/dist/types.d.ts +3 -0
- package/package.json +5 -5
|
@@ -25328,14 +25328,14 @@ ${end2.comment}` : end2.comment;
|
|
|
25328
25328
|
}
|
|
25329
25329
|
const name$3 = "hljs";
|
|
25330
25330
|
const preloadScripts$1 = [
|
|
25331
|
-
`@highlightjs/cdn-assets@${"11.
|
|
25331
|
+
`@highlightjs/cdn-assets@${"11.11.1"}/highlight.min.js`
|
|
25332
25332
|
].map((path) => buildJSItem(path));
|
|
25333
25333
|
const styles$1 = [
|
|
25334
|
-
`@highlightjs/cdn-assets@${"11.
|
|
25334
|
+
`@highlightjs/cdn-assets@${"11.11.1"}/styles/default.min.css`
|
|
25335
25335
|
].map((path) => buildCSSItem(path));
|
|
25336
25336
|
const config$1 = {
|
|
25337
25337
|
versions: {
|
|
25338
|
-
hljs: "11.
|
|
25338
|
+
hljs: "11.11.1"
|
|
25339
25339
|
},
|
|
25340
25340
|
preloadScripts: preloadScripts$1,
|
|
25341
25341
|
styles: styles$1
|
|
@@ -25395,20 +25395,21 @@ ${end2.comment}` : end2.comment;
|
|
|
25395
25395
|
return path;
|
|
25396
25396
|
});
|
|
25397
25397
|
}
|
|
25398
|
+
var define_define_KATEX_RESOURCES_default = ["katex@0.16.18/dist/fonts/KaTeX_AMS-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Caligraphic-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Caligraphic-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Fraktur-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Fraktur-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-BoldItalic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Math-BoldItalic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Math-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Script-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size1-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size2-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size3-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size4-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Typewriter-Regular.woff2"];
|
|
25398
25399
|
const name$2 = "katex";
|
|
25399
25400
|
const preloadScripts = [
|
|
25400
|
-
`katex@${"0.16.
|
|
25401
|
+
`katex@${"0.16.18"}/dist/katex.min.js`
|
|
25401
25402
|
].map((path) => buildJSItem(path));
|
|
25402
25403
|
const webfontloader = buildJSItem(
|
|
25403
25404
|
`webfontloader@${"1.6.28"}/webfontloader.js`
|
|
25404
25405
|
);
|
|
25405
25406
|
webfontloader.data.defer = true;
|
|
25406
|
-
const styles = [`katex@${"0.16.
|
|
25407
|
+
const styles = [`katex@${"0.16.18"}/dist/katex.min.css`].map(
|
|
25407
25408
|
(path) => buildCSSItem(path)
|
|
25408
25409
|
);
|
|
25409
25410
|
const config = {
|
|
25410
25411
|
versions: {
|
|
25411
|
-
katex: "0.16.
|
|
25412
|
+
katex: "0.16.18",
|
|
25412
25413
|
webfontloader: "1.6.28"
|
|
25413
25414
|
},
|
|
25414
25415
|
preloadScripts,
|
|
@@ -25446,7 +25447,8 @@ ${end2.comment}` : end2.comment;
|
|
|
25446
25447
|
},
|
|
25447
25448
|
webfontloader
|
|
25448
25449
|
],
|
|
25449
|
-
styles
|
|
25450
|
+
styles,
|
|
25451
|
+
resources: define_define_KATEX_RESOURCES_default
|
|
25450
25452
|
};
|
|
25451
25453
|
var dist = {};
|
|
25452
25454
|
var hasRequiredDist;
|
|
@@ -25996,7 +25998,7 @@ ${end2.comment}` : end2.comment;
|
|
|
25996
25998
|
const lineRange = token.map.map(
|
|
25997
25999
|
(line) => line + frontmatterLines
|
|
25998
26000
|
);
|
|
25999
|
-
result = result.slice(0, 4) + ` data-lines
|
|
26001
|
+
result = result.slice(0, 4) + ` data-lines="${lineRange.join(",")}"` + result.slice(4);
|
|
26000
26002
|
}
|
|
26001
26003
|
return result;
|
|
26002
26004
|
}
|
|
@@ -26088,13 +26090,6 @@ ${end2.comment}` : end2.comment;
|
|
|
26088
26090
|
scripts: scripts.map((item) => this.resolveJS(item))
|
|
26089
26091
|
};
|
|
26090
26092
|
}
|
|
26091
|
-
getPreloadScripts() {
|
|
26092
|
-
const scripts = this.plugins.flatMap((plugin2) => {
|
|
26093
|
-
var _a2;
|
|
26094
|
-
return ((_a2 = plugin2.config) == null ? void 0 : _a2.preloadScripts) || [];
|
|
26095
|
-
}).map((item) => this.resolveJS(item));
|
|
26096
|
-
return { scripts };
|
|
26097
|
-
}
|
|
26098
26093
|
/**
|
|
26099
26094
|
* Get used assets by features object returned by `transform`.
|
|
26100
26095
|
*/
|
|
@@ -26104,7 +26099,7 @@ ${end2.comment}` : end2.comment;
|
|
|
26104
26099
|
}
|
|
26105
26100
|
}
|
|
26106
26101
|
const transformerVersions = {
|
|
26107
|
-
"markmap-lib": "0.18.
|
|
26102
|
+
"markmap-lib": "0.18.5-alpha.7"
|
|
26108
26103
|
};
|
|
26109
26104
|
exports.Transformer = Transformer;
|
|
26110
26105
|
exports.builtInPlugins = builtInPlugins;
|
package/dist/browser/index.mjs
CHANGED
|
@@ -140,14 +140,14 @@ function patchCSSItem(urlBuilder, item) {
|
|
|
140
140
|
}
|
|
141
141
|
const name$3 = "hljs";
|
|
142
142
|
const preloadScripts$1 = [
|
|
143
|
-
`@highlightjs/cdn-assets@${"11.
|
|
143
|
+
`@highlightjs/cdn-assets@${"11.11.1"}/highlight.min.js`
|
|
144
144
|
].map((path) => buildJSItem(path));
|
|
145
145
|
const styles$1 = [
|
|
146
|
-
`@highlightjs/cdn-assets@${"11.
|
|
146
|
+
`@highlightjs/cdn-assets@${"11.11.1"}/styles/default.min.css`
|
|
147
147
|
].map((path) => buildCSSItem(path));
|
|
148
148
|
const config$1 = {
|
|
149
149
|
versions: {
|
|
150
|
-
hljs: "11.
|
|
150
|
+
hljs: "11.11.1"
|
|
151
151
|
},
|
|
152
152
|
preloadScripts: preloadScripts$1,
|
|
153
153
|
styles: styles$1
|
|
@@ -207,20 +207,21 @@ function addDefaultVersions(paths, name2, version) {
|
|
|
207
207
|
return path;
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
|
+
var define_define_KATEX_RESOURCES_default = ["katex@0.16.18/dist/fonts/KaTeX_AMS-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Caligraphic-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Caligraphic-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Fraktur-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Fraktur-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-BoldItalic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Math-BoldItalic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Math-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Script-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size1-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size2-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size3-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size4-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Typewriter-Regular.woff2"];
|
|
210
211
|
const name$2 = "katex";
|
|
211
212
|
const preloadScripts = [
|
|
212
|
-
`katex@${"0.16.
|
|
213
|
+
`katex@${"0.16.18"}/dist/katex.min.js`
|
|
213
214
|
].map((path) => buildJSItem(path));
|
|
214
215
|
const webfontloader = buildJSItem(
|
|
215
216
|
`webfontloader@${"1.6.28"}/webfontloader.js`
|
|
216
217
|
);
|
|
217
218
|
webfontloader.data.defer = true;
|
|
218
|
-
const styles = [`katex@${"0.16.
|
|
219
|
+
const styles = [`katex@${"0.16.18"}/dist/katex.min.css`].map(
|
|
219
220
|
(path) => buildCSSItem(path)
|
|
220
221
|
);
|
|
221
222
|
const config = {
|
|
222
223
|
versions: {
|
|
223
|
-
katex: "0.16.
|
|
224
|
+
katex: "0.16.18",
|
|
224
225
|
webfontloader: "1.6.28"
|
|
225
226
|
},
|
|
226
227
|
preloadScripts,
|
|
@@ -258,7 +259,8 @@ const config = {
|
|
|
258
259
|
},
|
|
259
260
|
webfontloader
|
|
260
261
|
],
|
|
261
|
-
styles
|
|
262
|
+
styles,
|
|
263
|
+
resources: define_define_KATEX_RESOURCES_default
|
|
262
264
|
};
|
|
263
265
|
function interop(mod) {
|
|
264
266
|
return mod.default || mod;
|
|
@@ -386,7 +388,7 @@ const plugin = definePlugin({
|
|
|
386
388
|
const lineRange = token.map.map(
|
|
387
389
|
(line) => line + frontmatterLines
|
|
388
390
|
);
|
|
389
|
-
result = result.slice(0, 4) + ` data-lines
|
|
391
|
+
result = result.slice(0, 4) + ` data-lines="${lineRange.join(",")}"` + result.slice(4);
|
|
390
392
|
}
|
|
391
393
|
return result;
|
|
392
394
|
}
|
|
@@ -478,13 +480,6 @@ class Transformer {
|
|
|
478
480
|
scripts: scripts.map((item) => this.resolveJS(item))
|
|
479
481
|
};
|
|
480
482
|
}
|
|
481
|
-
getPreloadScripts() {
|
|
482
|
-
const scripts = this.plugins.flatMap((plugin2) => {
|
|
483
|
-
var _a;
|
|
484
|
-
return ((_a = plugin2.config) == null ? void 0 : _a.preloadScripts) || [];
|
|
485
|
-
}).map((item) => this.resolveJS(item));
|
|
486
|
-
return { scripts };
|
|
487
|
-
}
|
|
488
483
|
/**
|
|
489
484
|
* Get used assets by features object returned by `transform`.
|
|
490
485
|
*/
|
|
@@ -494,7 +489,7 @@ class Transformer {
|
|
|
494
489
|
}
|
|
495
490
|
}
|
|
496
491
|
const transformerVersions = {
|
|
497
|
-
"markmap-lib": "0.18.
|
|
492
|
+
"markmap-lib": "0.18.5-alpha.7"
|
|
498
493
|
};
|
|
499
494
|
export {
|
|
500
495
|
Transformer,
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -114,13 +114,6 @@ class Transformer {
|
|
|
114
114
|
scripts: scripts.map((item) => this.resolveJS(item))
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
getPreloadScripts() {
|
|
118
|
-
const scripts = this.plugins.flatMap((plugin) => {
|
|
119
|
-
var _a;
|
|
120
|
-
return ((_a = plugin.config) == null ? void 0 : _a.preloadScripts) || [];
|
|
121
|
-
}).map((item) => this.resolveJS(item));
|
|
122
|
-
return { scripts };
|
|
123
|
-
}
|
|
124
117
|
/**
|
|
125
118
|
* Get used assets by features object returned by `transform`.
|
|
126
119
|
*/
|
|
@@ -130,7 +123,7 @@ class Transformer {
|
|
|
130
123
|
}
|
|
131
124
|
}
|
|
132
125
|
const transformerVersions = {
|
|
133
|
-
"markmap-lib": "0.18.
|
|
126
|
+
"markmap-lib": "0.18.5-alpha.7"
|
|
134
127
|
};
|
|
135
128
|
exports.Transformer = Transformer;
|
|
136
129
|
exports.builtInPlugins = builtInPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -112,13 +112,6 @@ class Transformer {
|
|
|
112
112
|
scripts: scripts.map((item) => this.resolveJS(item))
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
getPreloadScripts() {
|
|
116
|
-
const scripts = this.plugins.flatMap((plugin) => {
|
|
117
|
-
var _a;
|
|
118
|
-
return ((_a = plugin.config) == null ? void 0 : _a.preloadScripts) || [];
|
|
119
|
-
}).map((item) => this.resolveJS(item));
|
|
120
|
-
return { scripts };
|
|
121
|
-
}
|
|
122
115
|
/**
|
|
123
116
|
* Get used assets by features object returned by `transform`.
|
|
124
117
|
*/
|
|
@@ -128,7 +121,7 @@ class Transformer {
|
|
|
128
121
|
}
|
|
129
122
|
}
|
|
130
123
|
const transformerVersions = {
|
|
131
|
-
"markmap-lib": "0.18.
|
|
124
|
+
"markmap-lib": "0.18.5-alpha.7"
|
|
132
125
|
};
|
|
133
126
|
export {
|
|
134
127
|
Transformer,
|
package/dist/index.no-plugins.js
CHANGED
|
@@ -122,13 +122,6 @@ class Transformer {
|
|
|
122
122
|
scripts: scripts.map((item) => this.resolveJS(item))
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
getPreloadScripts() {
|
|
126
|
-
const scripts = this.plugins.flatMap((plugin) => {
|
|
127
|
-
var _a;
|
|
128
|
-
return ((_a = plugin.config) == null ? void 0 : _a.preloadScripts) || [];
|
|
129
|
-
}).map((item) => this.resolveJS(item));
|
|
130
|
-
return { scripts };
|
|
131
|
-
}
|
|
132
125
|
/**
|
|
133
126
|
* Get used assets by features object returned by `transform`.
|
|
134
127
|
*/
|
|
@@ -138,7 +131,7 @@ class Transformer {
|
|
|
138
131
|
}
|
|
139
132
|
}
|
|
140
133
|
const transformerVersions = {
|
|
141
|
-
"markmap-lib": "0.18.
|
|
134
|
+
"markmap-lib": "0.18.5-alpha.7"
|
|
142
135
|
};
|
|
143
136
|
exports.Transformer = Transformer;
|
|
144
137
|
exports.builtInPlugins = builtInPlugins;
|
|
@@ -120,13 +120,6 @@ class Transformer {
|
|
|
120
120
|
scripts: scripts.map((item) => this.resolveJS(item))
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
getPreloadScripts() {
|
|
124
|
-
const scripts = this.plugins.flatMap((plugin) => {
|
|
125
|
-
var _a;
|
|
126
|
-
return ((_a = plugin.config) == null ? void 0 : _a.preloadScripts) || [];
|
|
127
|
-
}).map((item) => this.resolveJS(item));
|
|
128
|
-
return { scripts };
|
|
129
|
-
}
|
|
130
123
|
/**
|
|
131
124
|
* Get used assets by features object returned by `transform`.
|
|
132
125
|
*/
|
|
@@ -136,7 +129,7 @@ class Transformer {
|
|
|
136
129
|
}
|
|
137
130
|
}
|
|
138
131
|
const transformerVersions = {
|
|
139
|
-
"markmap-lib": "0.18.
|
|
132
|
+
"markmap-lib": "0.18.5-alpha.7"
|
|
140
133
|
};
|
|
141
134
|
export {
|
|
142
135
|
Transformer,
|
|
@@ -2,10 +2,11 @@ import { JSItem } from 'markmap-common';
|
|
|
2
2
|
export declare const name = "katex";
|
|
3
3
|
export declare const config: {
|
|
4
4
|
versions: {
|
|
5
|
-
katex:
|
|
6
|
-
webfontloader:
|
|
5
|
+
katex: any;
|
|
6
|
+
webfontloader: any;
|
|
7
7
|
};
|
|
8
8
|
preloadScripts: import("markmap-common").JSScriptItem[];
|
|
9
9
|
scripts: JSItem[];
|
|
10
10
|
styles: import("markmap-common").CSSStylesheetItem[];
|
|
11
|
+
resources: any;
|
|
11
12
|
};
|
package/dist/plugins.js
CHANGED
|
@@ -105,14 +105,14 @@ function normalizeNumber(value) {
|
|
|
105
105
|
}
|
|
106
106
|
const name$3 = "hljs";
|
|
107
107
|
const preloadScripts$1 = [
|
|
108
|
-
`@highlightjs/cdn-assets@${"11.
|
|
108
|
+
`@highlightjs/cdn-assets@${"11.11.1"}/highlight.min.js`
|
|
109
109
|
].map((path) => markmapCommon.buildJSItem(path));
|
|
110
110
|
const styles$1 = [
|
|
111
|
-
`@highlightjs/cdn-assets@${"11.
|
|
111
|
+
`@highlightjs/cdn-assets@${"11.11.1"}/styles/default.min.css`
|
|
112
112
|
].map((path) => markmapCommon.buildCSSItem(path));
|
|
113
113
|
const config$1 = {
|
|
114
114
|
versions: {
|
|
115
|
-
hljs: "11.
|
|
115
|
+
hljs: "11.11.1"
|
|
116
116
|
},
|
|
117
117
|
preloadScripts: preloadScripts$1,
|
|
118
118
|
styles: styles$1
|
|
@@ -141,20 +141,21 @@ const plugin$2 = definePlugin({
|
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
+
var define_define_KATEX_RESOURCES_default = ["katex@0.16.18/dist/fonts/KaTeX_AMS-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Caligraphic-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Caligraphic-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Fraktur-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Fraktur-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-BoldItalic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Math-BoldItalic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Math-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Script-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size1-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size2-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size3-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size4-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Typewriter-Regular.woff2"];
|
|
144
145
|
const name$2 = "katex";
|
|
145
146
|
const preloadScripts = [
|
|
146
|
-
`katex@${"0.16.
|
|
147
|
+
`katex@${"0.16.18"}/dist/katex.min.js`
|
|
147
148
|
].map((path) => markmapCommon.buildJSItem(path));
|
|
148
149
|
const webfontloader = markmapCommon.buildJSItem(
|
|
149
150
|
`webfontloader@${"1.6.28"}/webfontloader.js`
|
|
150
151
|
);
|
|
151
152
|
webfontloader.data.defer = true;
|
|
152
|
-
const styles = [`katex@${"0.16.
|
|
153
|
+
const styles = [`katex@${"0.16.18"}/dist/katex.min.css`].map(
|
|
153
154
|
(path) => markmapCommon.buildCSSItem(path)
|
|
154
155
|
);
|
|
155
156
|
const config = {
|
|
156
157
|
versions: {
|
|
157
|
-
katex: "0.16.
|
|
158
|
+
katex: "0.16.18",
|
|
158
159
|
webfontloader: "1.6.28"
|
|
159
160
|
},
|
|
160
161
|
preloadScripts,
|
|
@@ -192,7 +193,8 @@ const config = {
|
|
|
192
193
|
},
|
|
193
194
|
webfontloader
|
|
194
195
|
],
|
|
195
|
-
styles
|
|
196
|
+
styles,
|
|
197
|
+
resources: define_define_KATEX_RESOURCES_default
|
|
196
198
|
};
|
|
197
199
|
function interop(mod) {
|
|
198
200
|
return mod.default || mod;
|
|
@@ -283,7 +285,7 @@ const plugin = definePlugin({
|
|
|
283
285
|
const lineRange = token.map.map(
|
|
284
286
|
(line) => line + frontmatterLines
|
|
285
287
|
);
|
|
286
|
-
result = result.slice(0, 4) + ` data-lines
|
|
288
|
+
result = result.slice(0, 4) + ` data-lines="${lineRange.join(",")}"` + result.slice(4);
|
|
287
289
|
}
|
|
288
290
|
return result;
|
|
289
291
|
}
|
package/dist/plugins.mjs
CHANGED
|
@@ -103,14 +103,14 @@ function normalizeNumber(value) {
|
|
|
103
103
|
}
|
|
104
104
|
const name$3 = "hljs";
|
|
105
105
|
const preloadScripts$1 = [
|
|
106
|
-
`@highlightjs/cdn-assets@${"11.
|
|
106
|
+
`@highlightjs/cdn-assets@${"11.11.1"}/highlight.min.js`
|
|
107
107
|
].map((path) => buildJSItem(path));
|
|
108
108
|
const styles$1 = [
|
|
109
|
-
`@highlightjs/cdn-assets@${"11.
|
|
109
|
+
`@highlightjs/cdn-assets@${"11.11.1"}/styles/default.min.css`
|
|
110
110
|
].map((path) => buildCSSItem(path));
|
|
111
111
|
const config$1 = {
|
|
112
112
|
versions: {
|
|
113
|
-
hljs: "11.
|
|
113
|
+
hljs: "11.11.1"
|
|
114
114
|
},
|
|
115
115
|
preloadScripts: preloadScripts$1,
|
|
116
116
|
styles: styles$1
|
|
@@ -139,20 +139,21 @@ const plugin$2 = definePlugin({
|
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
+
var define_define_KATEX_RESOURCES_default = ["katex@0.16.18/dist/fonts/KaTeX_AMS-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Caligraphic-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Caligraphic-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Fraktur-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Fraktur-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-BoldItalic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Main-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Math-BoldItalic.woff2", "katex@0.16.18/dist/fonts/KaTeX_Math-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Bold.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Italic.woff2", "katex@0.16.18/dist/fonts/KaTeX_SansSerif-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Script-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size1-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size2-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size3-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Size4-Regular.woff2", "katex@0.16.18/dist/fonts/KaTeX_Typewriter-Regular.woff2"];
|
|
142
143
|
const name$2 = "katex";
|
|
143
144
|
const preloadScripts = [
|
|
144
|
-
`katex@${"0.16.
|
|
145
|
+
`katex@${"0.16.18"}/dist/katex.min.js`
|
|
145
146
|
].map((path) => buildJSItem(path));
|
|
146
147
|
const webfontloader = buildJSItem(
|
|
147
148
|
`webfontloader@${"1.6.28"}/webfontloader.js`
|
|
148
149
|
);
|
|
149
150
|
webfontloader.data.defer = true;
|
|
150
|
-
const styles = [`katex@${"0.16.
|
|
151
|
+
const styles = [`katex@${"0.16.18"}/dist/katex.min.css`].map(
|
|
151
152
|
(path) => buildCSSItem(path)
|
|
152
153
|
);
|
|
153
154
|
const config = {
|
|
154
155
|
versions: {
|
|
155
|
-
katex: "0.16.
|
|
156
|
+
katex: "0.16.18",
|
|
156
157
|
webfontloader: "1.6.28"
|
|
157
158
|
},
|
|
158
159
|
preloadScripts,
|
|
@@ -190,7 +191,8 @@ const config = {
|
|
|
190
191
|
},
|
|
191
192
|
webfontloader
|
|
192
193
|
],
|
|
193
|
-
styles
|
|
194
|
+
styles,
|
|
195
|
+
resources: define_define_KATEX_RESOURCES_default
|
|
194
196
|
};
|
|
195
197
|
function interop(mod) {
|
|
196
198
|
return mod.default || mod;
|
|
@@ -281,7 +283,7 @@ const plugin = definePlugin({
|
|
|
281
283
|
const lineRange = token.map.map(
|
|
282
284
|
(line) => line + frontmatterLines
|
|
283
285
|
);
|
|
284
|
-
result = result.slice(0, 4) + ` data-lines
|
|
286
|
+
result = result.slice(0, 4) + ` data-lines="${lineRange.join(",")}"` + result.slice(4);
|
|
285
287
|
}
|
|
286
288
|
return result;
|
|
287
289
|
}
|
package/dist/transform.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export declare class Transformer implements ITransformer {
|
|
|
17
17
|
* Get all assets from enabled plugins or filter them by plugin names as keys.
|
|
18
18
|
*/
|
|
19
19
|
getAssets(keys?: string[]): IAssets;
|
|
20
|
-
getPreloadScripts(): IAssets;
|
|
21
20
|
/**
|
|
22
21
|
* Get used assets by features object returned by `transform`.
|
|
23
22
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -65,7 +65,10 @@ export interface ITransformPlugin {
|
|
|
65
65
|
name: string;
|
|
66
66
|
config?: IAssets & {
|
|
67
67
|
versions?: Record<string, string>;
|
|
68
|
+
/** For browsers only. Scripts that needs to be preloaded for the transformer to work. */
|
|
68
69
|
preloadScripts?: JSItem[];
|
|
70
|
+
/** Additional resources needed for the plugin to work offline. */
|
|
71
|
+
resources?: string[];
|
|
69
72
|
};
|
|
70
73
|
/**
|
|
71
74
|
* @returns The assets that should be loaded for rendering the output.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markmap-lib",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.5-alpha.7+41488b9",
|
|
4
4
|
"description": "Visualize your Markdown as mindmaps with Markmap",
|
|
5
5
|
"author": "Gerald <gera2ld@live.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@highlightjs/cdn-assets": "^11.8.0",
|
|
62
62
|
"@types/katex": "^0.16.7",
|
|
63
63
|
"@types/markdown-it": "^14.0.0",
|
|
64
|
-
"markmap-common": "0.18.
|
|
64
|
+
"markmap-common": "0.18.5-alpha.7+41488b9",
|
|
65
65
|
"webfontloader": "^1.6.28"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"markdown-it-mark": "^4.0.0",
|
|
75
75
|
"markdown-it-sub": "^2.0.0",
|
|
76
76
|
"markdown-it-sup": "^2.0.0",
|
|
77
|
-
"markmap-html-parser": "0.18.
|
|
78
|
-
"markmap-view": "0.18.
|
|
77
|
+
"markmap-html-parser": "0.18.5-alpha.7+41488b9",
|
|
78
|
+
"markmap-view": "0.18.5-alpha.7+41488b9",
|
|
79
79
|
"prismjs": "^1.29.0",
|
|
80
80
|
"yaml": "^2.5.1"
|
|
81
81
|
},
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"^(.*\\.svg)\\?raw$": "$1"
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "41488b9988a1f49f7dadc029ef6be18fed981cac"
|
|
100
100
|
}
|