@hyperbook/markdown 0.28.4 → 0.29.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/dist/index.d.ts +1 -0
- package/dist/index.js +128 -43
- package/dist/index.js.map +4 -4
- package/dist/remarkDirectiveUnpack.d.ts +5 -0
- package/dist/remarkHelper.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -65098,13 +65098,14 @@ var findFlat = (node3, predicate) => {
|
|
|
65098
65098
|
inner2(node3);
|
|
65099
65099
|
return nodes;
|
|
65100
65100
|
};
|
|
65101
|
-
var registerDirective = (file, directive2, scripts = [], styles2 = []) => {
|
|
65101
|
+
var registerDirective = (file, directive2, scripts = [], styles2 = [], additionalDirective = []) => {
|
|
65102
65102
|
if (!file.data.directives) {
|
|
65103
65103
|
file.data.directives = {};
|
|
65104
65104
|
}
|
|
65105
65105
|
file.data.directives[directive2] = {
|
|
65106
65106
|
scripts,
|
|
65107
|
-
styles: styles2
|
|
65107
|
+
styles: styles2,
|
|
65108
|
+
addditionalDirective: additionalDirective || []
|
|
65108
65109
|
};
|
|
65109
65110
|
};
|
|
65110
65111
|
var requestJS = (file, js) => {
|
|
@@ -65183,7 +65184,7 @@ var remarkDirectiveVideo_default = (ctx) => () => {
|
|
|
65183
65184
|
const attributes4 = node3.attributes || {};
|
|
65184
65185
|
const { src, title, author, poster } = attributes4;
|
|
65185
65186
|
expectLeafDirective(node3, file, name);
|
|
65186
|
-
registerDirective(file, name, [], ["style.css"]);
|
|
65187
|
+
registerDirective(file, name, [], ["style.css"], []);
|
|
65187
65188
|
const information = [];
|
|
65188
65189
|
if (title) {
|
|
65189
65190
|
information.push({
|
|
@@ -65247,8 +65248,16 @@ var remarkDirectiveVideo_default = (ctx) => () => {
|
|
|
65247
65248
|
tagName: "video",
|
|
65248
65249
|
properties: {
|
|
65249
65250
|
controls: true,
|
|
65250
|
-
src: src ? ctx.makeUrl(
|
|
65251
|
-
|
|
65251
|
+
src: src ? ctx.makeUrl(
|
|
65252
|
+
src,
|
|
65253
|
+
"public",
|
|
65254
|
+
ctx.navigation.current || void 0
|
|
65255
|
+
) : void 0,
|
|
65256
|
+
poster: poster ? ctx.makeUrl(
|
|
65257
|
+
poster,
|
|
65258
|
+
"public",
|
|
65259
|
+
ctx.navigation.current || void 0
|
|
65260
|
+
) : void 0,
|
|
65252
65261
|
width: "100%"
|
|
65253
65262
|
},
|
|
65254
65263
|
children: [
|
|
@@ -65291,7 +65300,7 @@ var remarkDirectiveYoutube_default = (ctx) => () => {
|
|
|
65291
65300
|
node3
|
|
65292
65301
|
);
|
|
65293
65302
|
}
|
|
65294
|
-
registerDirective(file, name, [], ["style.css"]);
|
|
65303
|
+
registerDirective(file, name, [], ["style.css"], []);
|
|
65295
65304
|
data.hName = "div";
|
|
65296
65305
|
data.hProperties = {
|
|
65297
65306
|
class: "directive-youtube",
|
|
@@ -65329,7 +65338,7 @@ var remarkDirectiveTiles_default = (ctx) => () => {
|
|
|
65329
65338
|
data.hProperties = {
|
|
65330
65339
|
class: "directive-tiles"
|
|
65331
65340
|
};
|
|
65332
|
-
registerDirective(file, "tiles", [], ["style.css"]);
|
|
65341
|
+
registerDirective(file, "tiles", [], ["style.css"], ["tile"]);
|
|
65333
65342
|
const tilesChildren = [];
|
|
65334
65343
|
node3.children.filter(isDirective).forEach((node4) => {
|
|
65335
65344
|
if (node4.name !== "tile") {
|
|
@@ -65512,6 +65521,15 @@ function remarkDirectiveTabs_default(ctx) {
|
|
|
65512
65521
|
const tabsNodes = [];
|
|
65513
65522
|
visit(tree, function(node3) {
|
|
65514
65523
|
if (isDirective(node3)) {
|
|
65524
|
+
if (node3.name == "tab") {
|
|
65525
|
+
registerDirective(
|
|
65526
|
+
file,
|
|
65527
|
+
"tabs",
|
|
65528
|
+
["client.js"],
|
|
65529
|
+
["style.css"],
|
|
65530
|
+
["tab"]
|
|
65531
|
+
);
|
|
65532
|
+
}
|
|
65515
65533
|
if (node3.name !== "tabs") return;
|
|
65516
65534
|
tabsNodes.push(node3);
|
|
65517
65535
|
return;
|
|
@@ -65525,7 +65543,13 @@ function remarkDirectiveTabs_default(ctx) {
|
|
|
65525
65543
|
if (!tabsId) {
|
|
65526
65544
|
tabsId = hash(node3);
|
|
65527
65545
|
}
|
|
65528
|
-
registerDirective(
|
|
65546
|
+
registerDirective(
|
|
65547
|
+
file,
|
|
65548
|
+
"tabs",
|
|
65549
|
+
["client.js"],
|
|
65550
|
+
["style.css"],
|
|
65551
|
+
["tab"]
|
|
65552
|
+
);
|
|
65529
65553
|
data.hName = "div";
|
|
65530
65554
|
data.hProperties = {
|
|
65531
65555
|
class: "directive-tabs"
|
|
@@ -65600,7 +65624,7 @@ var remarkDirectiveSqlIde_default = (ctx) => () => {
|
|
|
65600
65624
|
height = ctx.config.elements?.sqlide?.height || "600px"
|
|
65601
65625
|
} = attributes4;
|
|
65602
65626
|
expectContainerDirective(node3, file, name);
|
|
65603
|
-
registerDirective(file, name, ["client.js"], ["style.css"]);
|
|
65627
|
+
registerDirective(file, name, ["client.js"], ["style.css"], []);
|
|
65604
65628
|
const codes = node3.children?.filter(isCode).map((n) => ({
|
|
65605
65629
|
type: "element",
|
|
65606
65630
|
tagName: "script",
|
|
@@ -65828,7 +65852,7 @@ var remarkDirectiveSlideshow_default = (_) => () => {
|
|
|
65828
65852
|
const data = node3.data || (node3.data = {});
|
|
65829
65853
|
const { height = "300px", id = hash(node3) } = node3.attributes || {};
|
|
65830
65854
|
expectContainerDirective(node3, file, "slideshow");
|
|
65831
|
-
registerDirective(file, "slideshow", ["client.js"], ["style.css"]);
|
|
65855
|
+
registerDirective(file, "slideshow", ["client.js"], ["style.css"], []);
|
|
65832
65856
|
const images = findFlat(node3, isImage);
|
|
65833
65857
|
data.hName = "div";
|
|
65834
65858
|
data.hProperties = {
|
|
@@ -68201,7 +68225,7 @@ var remarkDirectiveBookmarks_default = (ctx) => () => {
|
|
|
68201
68225
|
if (node3.name !== name) return;
|
|
68202
68226
|
const data = node3.data || (node3.data = {});
|
|
68203
68227
|
expectLeafDirective(node3, file, name);
|
|
68204
|
-
registerDirective(file, name, ["client.js"], ["style.css"]);
|
|
68228
|
+
registerDirective(file, name, ["client.js"], ["style.css"], []);
|
|
68205
68229
|
data.hName = "ul";
|
|
68206
68230
|
data.hProperties = {
|
|
68207
68231
|
class: "directive-bookmarks"
|
|
@@ -68281,7 +68305,7 @@ var remarkDirectiveAlert_default = (ctx) => () => {
|
|
|
68281
68305
|
if (node3.name !== name) return;
|
|
68282
68306
|
const data = node3.data || (node3.data = {});
|
|
68283
68307
|
expectContainerDirective(node3, file, name);
|
|
68284
|
-
registerDirective(file, name, [], ["style.css"]);
|
|
68308
|
+
registerDirective(file, name, [], ["style.css"], []);
|
|
68285
68309
|
const type = Object.keys(node3.attributes || {}).join(" ");
|
|
68286
68310
|
data.hName = "div";
|
|
68287
68311
|
data.hProperties = {
|
|
@@ -68312,7 +68336,8 @@ var remarkDirectiveAudio_default = (ctx) => () => {
|
|
|
68312
68336
|
file,
|
|
68313
68337
|
name,
|
|
68314
68338
|
["wavesurfer.min.js", "client.js"],
|
|
68315
|
-
["style.css"]
|
|
68339
|
+
["style.css"],
|
|
68340
|
+
[]
|
|
68316
68341
|
);
|
|
68317
68342
|
const id = hash(node3);
|
|
68318
68343
|
node3.attributes = {};
|
|
@@ -68328,7 +68353,11 @@ var remarkDirectiveAudio_default = (ctx) => () => {
|
|
|
68328
68353
|
tagName: "div",
|
|
68329
68354
|
properties: {
|
|
68330
68355
|
class: "thumbnail",
|
|
68331
|
-
style: `background-image: url("${ctx.makeUrl(
|
|
68356
|
+
style: `background-image: url("${ctx.makeUrl(
|
|
68357
|
+
thumbnail,
|
|
68358
|
+
"public",
|
|
68359
|
+
ctx.navigation.current || void 0
|
|
68360
|
+
)}")`
|
|
68332
68361
|
},
|
|
68333
68362
|
children: []
|
|
68334
68363
|
});
|
|
@@ -68350,7 +68379,11 @@ var remarkDirectiveAudio_default = (ctx) => () => {
|
|
|
68350
68379
|
properties: {
|
|
68351
68380
|
class: "wave",
|
|
68352
68381
|
id,
|
|
68353
|
-
"data-src":
|
|
68382
|
+
"data-src": ctx.makeUrl(
|
|
68383
|
+
src || "",
|
|
68384
|
+
"public",
|
|
68385
|
+
ctx.navigation.current || void 0
|
|
68386
|
+
)
|
|
68354
68387
|
},
|
|
68355
68388
|
children: []
|
|
68356
68389
|
});
|
|
@@ -68371,7 +68404,11 @@ var remarkDirectiveAudio_default = (ctx) => () => {
|
|
|
68371
68404
|
tagName: "div",
|
|
68372
68405
|
properties: {
|
|
68373
68406
|
class: "thumbnail",
|
|
68374
|
-
style: `background-image: url("${ctx.makeUrl(
|
|
68407
|
+
style: `background-image: url("${ctx.makeUrl(
|
|
68408
|
+
thumbnail,
|
|
68409
|
+
"public",
|
|
68410
|
+
ctx.navigation.current || void 0
|
|
68411
|
+
)}")`
|
|
68375
68412
|
},
|
|
68376
68413
|
children: []
|
|
68377
68414
|
});
|
|
@@ -68503,7 +68540,7 @@ var remarkDirectiveCollapsible_default = (ctx) => () => {
|
|
|
68503
68540
|
const data = node3.data || (node3.data = {});
|
|
68504
68541
|
const { title = "", id = hash(node3) } = node3.data.hProperties || {};
|
|
68505
68542
|
expectContainerDirective(node3, file, name);
|
|
68506
|
-
registerDirective(file, name, [], ["style.css"]);
|
|
68543
|
+
registerDirective(file, name, [], ["style.css"], []);
|
|
68507
68544
|
node3.attributes = {};
|
|
68508
68545
|
data.hName = "div";
|
|
68509
68546
|
data.hProperties = {
|
|
@@ -68550,7 +68587,7 @@ var remarkDirectiveArchive_default = (ctx) => () => {
|
|
|
68550
68587
|
if (node3.name !== name) return;
|
|
68551
68588
|
const data = node3.data || (node3.data = {});
|
|
68552
68589
|
expectTextDirective(node3, file, name);
|
|
68553
|
-
registerDirective(file, name, ["client.js"], ["style.css"]);
|
|
68590
|
+
registerDirective(file, name, ["client.js"], ["style.css"], []);
|
|
68554
68591
|
const { name: archiveName = "" } = node3.attributes || {};
|
|
68555
68592
|
data.hName = "a";
|
|
68556
68593
|
data.hProperties = {
|
|
@@ -68596,14 +68633,18 @@ var remarkDirectiveDownload_default = (ctx) => () => {
|
|
|
68596
68633
|
if (node3.name !== name) return;
|
|
68597
68634
|
const data = node3.data || (node3.data = {});
|
|
68598
68635
|
expectTextDirective(node3, file, name);
|
|
68599
|
-
registerDirective(file, name, ["client.js"], ["style.css"]);
|
|
68636
|
+
registerDirective(file, name, ["client.js"], ["style.css"], []);
|
|
68600
68637
|
const { src = "" } = node3.attributes || {};
|
|
68601
68638
|
data.hName = "a";
|
|
68602
68639
|
data.hProperties = {
|
|
68603
68640
|
class: "directive-download",
|
|
68604
68641
|
target: "_blank",
|
|
68605
68642
|
rel: "noopener noreferrer",
|
|
68606
|
-
href: ctx.makeUrl(
|
|
68643
|
+
href: ctx.makeUrl(
|
|
68644
|
+
src,
|
|
68645
|
+
"public",
|
|
68646
|
+
ctx.navigation.current || void 0
|
|
68647
|
+
)
|
|
68607
68648
|
};
|
|
68608
68649
|
data.hChildren = [
|
|
68609
68650
|
{
|
|
@@ -68642,7 +68683,7 @@ var remarkDirectiveEmbed_default = (ctx) => () => {
|
|
|
68642
68683
|
if (node3.name !== name) return;
|
|
68643
68684
|
const data = node3.data || (node3.data = {});
|
|
68644
68685
|
expectLeafDirective(node3, file, name);
|
|
68645
|
-
registerDirective(file, name, [], ["style.css"]);
|
|
68686
|
+
registerDirective(file, name, [], ["style.css"], []);
|
|
68646
68687
|
const {
|
|
68647
68688
|
aspectRatio,
|
|
68648
68689
|
width = "100%",
|
|
@@ -68682,7 +68723,7 @@ var remarkDirectiveProtect_default = (ctx) => () => {
|
|
|
68682
68723
|
if (node3.name !== name) return;
|
|
68683
68724
|
const data = node3.data || (node3.data = {});
|
|
68684
68725
|
expectContainerDirective(node3, file, name);
|
|
68685
|
-
registerDirective(file, name, ["client.js"], ["style.css"]);
|
|
68726
|
+
registerDirective(file, name, ["client.js"], ["style.css"], []);
|
|
68686
68727
|
const {
|
|
68687
68728
|
password = "",
|
|
68688
68729
|
description = "",
|
|
@@ -68772,7 +68813,7 @@ var remarkDirectiveQr_default = (ctx) => () => {
|
|
|
68772
68813
|
if (node3.name !== name) return;
|
|
68773
68814
|
const data = node3.data || (node3.data = {});
|
|
68774
68815
|
expectLeafDirective(node3, file, name);
|
|
68775
|
-
registerDirective(file, name, [], ["style.css"]);
|
|
68816
|
+
registerDirective(file, name, [], ["style.css"], []);
|
|
68776
68817
|
const { value = "", size = "M", label: label4 } = node3.attributes || {};
|
|
68777
68818
|
const safeSize = size;
|
|
68778
68819
|
const qr = new import_qrcode_svg.default({
|
|
@@ -68786,7 +68827,6 @@ var remarkDirectiveQr_default = (ctx) => () => {
|
|
|
68786
68827
|
background: "#ffffff",
|
|
68787
68828
|
ecl: "M"
|
|
68788
68829
|
}).svg();
|
|
68789
|
-
console.log(qr);
|
|
68790
68830
|
const labelElement = [];
|
|
68791
68831
|
if (label4) {
|
|
68792
68832
|
labelElement.push({
|
|
@@ -68842,7 +68882,8 @@ var remarkDirectiveExcalidraw_default = (ctx) => () => {
|
|
|
68842
68882
|
file,
|
|
68843
68883
|
name,
|
|
68844
68884
|
["client.js", "hyperbook-excalidraw.umd.js"],
|
|
68845
|
-
["style.css", "excalidraw.css"]
|
|
68885
|
+
["style.css", "excalidraw.css"],
|
|
68886
|
+
[]
|
|
68846
68887
|
);
|
|
68847
68888
|
const {
|
|
68848
68889
|
aspectRatio = "16/9",
|
|
@@ -68863,7 +68904,11 @@ var remarkDirectiveExcalidraw_default = (ctx) => () => {
|
|
|
68863
68904
|
properties: {
|
|
68864
68905
|
"auto-zoom": autoZoom,
|
|
68865
68906
|
edit,
|
|
68866
|
-
src: ctx.makeUrl(
|
|
68907
|
+
src: ctx.makeUrl(
|
|
68908
|
+
src,
|
|
68909
|
+
"public",
|
|
68910
|
+
ctx.navigation.current || void 0
|
|
68911
|
+
),
|
|
68867
68912
|
onlinkopen
|
|
68868
68913
|
},
|
|
68869
68914
|
children: []
|
|
@@ -68887,7 +68932,8 @@ var remarkDirectiveScratchblock_default = (ctx) => () => {
|
|
|
68887
68932
|
file,
|
|
68888
68933
|
name,
|
|
68889
68934
|
["scratchblocks.min.js", "translations.js", "client.js"],
|
|
68890
|
-
["style.css"]
|
|
68935
|
+
["style.css"],
|
|
68936
|
+
[]
|
|
68891
68937
|
);
|
|
68892
68938
|
data.hName = "pre";
|
|
68893
68939
|
data.hProperties = {
|
|
@@ -68912,7 +68958,8 @@ var remarkDirectiveMermaid_default = (ctx) => () => {
|
|
|
68912
68958
|
file,
|
|
68913
68959
|
name,
|
|
68914
68960
|
["mermaid.min.js", "client.js"],
|
|
68915
|
-
["style.css"]
|
|
68961
|
+
["style.css"],
|
|
68962
|
+
[]
|
|
68916
68963
|
);
|
|
68917
68964
|
const value = node3.value || toString2(node3.children);
|
|
68918
68965
|
const {} = node3.attributes || {};
|
|
@@ -73295,7 +73342,7 @@ var remarkDirectivePlantuml_default = (ctx) => () => {
|
|
|
73295
73342
|
if (node3.name !== name) return;
|
|
73296
73343
|
const data = node3.data || (node3.data = {});
|
|
73297
73344
|
expectContainerDirective(node3, file, name);
|
|
73298
|
-
registerDirective(file, name, [], ["style.css"]);
|
|
73345
|
+
registerDirective(file, name, [], ["style.css"], []);
|
|
73299
73346
|
const text9 = toString2(node3.children);
|
|
73300
73347
|
const url = `https://kroki.io/plantuml/svg/${encode2(text9)}`;
|
|
73301
73348
|
const { alt, width } = node3.attributes || {};
|
|
@@ -73341,7 +73388,7 @@ var remarkDirectiveOnlineIde_default = (ctx) => () => {
|
|
|
73341
73388
|
id = hash(node3)
|
|
73342
73389
|
} = attributes4;
|
|
73343
73390
|
expectContainerDirective(node3, file, name);
|
|
73344
|
-
registerDirective(file, name, ["client.js"], ["style.css"]);
|
|
73391
|
+
registerDirective(file, name, ["client.js"], ["style.css"], []);
|
|
73345
73392
|
const codes = node3.children?.filter(isCode).map((n) => ({
|
|
73346
73393
|
type: "element",
|
|
73347
73394
|
tagName: "script",
|
|
@@ -74613,7 +74660,7 @@ var remarkDirectiveStruktog_default = (ctx) => () => {
|
|
|
74613
74660
|
if (node3.name !== name) return;
|
|
74614
74661
|
const data = node3.data || (node3.data = {});
|
|
74615
74662
|
expectLeafDirective(node3, file, name);
|
|
74616
|
-
registerDirective(file, name, [], ["style.css"]);
|
|
74663
|
+
registerDirective(file, name, [], ["style.css"], []);
|
|
74617
74664
|
const { data: stRawData = "" } = node3.attributes || {};
|
|
74618
74665
|
const stData = (stRawData || "").replace(
|
|
74619
74666
|
new RegExp("https://struktog.openpatch.org/?#"),
|
|
@@ -74690,7 +74737,7 @@ var remarkDirectiveTerm_default = (ctx) => () => {
|
|
|
74690
74737
|
node3
|
|
74691
74738
|
);
|
|
74692
74739
|
}
|
|
74693
|
-
registerDirective(file, "term", [], ["style.css"]);
|
|
74740
|
+
registerDirective(file, "term", [], ["style.css"], ["t"]);
|
|
74694
74741
|
const value = node3.children[0].value;
|
|
74695
74742
|
const data = node3.data || (node3.data = {});
|
|
74696
74743
|
const attributes4 = node3.attributes || {};
|
|
@@ -74724,7 +74771,11 @@ var remarkLink_default = (ctx) => () => {
|
|
|
74724
74771
|
visit(tree, (node3, index2) => {
|
|
74725
74772
|
if (typeof index2 === "number" && (node3.type === "link" || node3.type === "linkReference" || node3.type === "image" || node3.type === "imageReference" || node3.type === "definition")) {
|
|
74726
74773
|
if (node3.url) {
|
|
74727
|
-
node3.url = ctx.makeUrl(
|
|
74774
|
+
node3.url = ctx.makeUrl(
|
|
74775
|
+
node3.url,
|
|
74776
|
+
"public",
|
|
74777
|
+
ctx.navigation.current || void 0
|
|
74778
|
+
);
|
|
74728
74779
|
}
|
|
74729
74780
|
}
|
|
74730
74781
|
});
|
|
@@ -74773,7 +74824,7 @@ var remarkDirectivePagelist_default = (ctx) => () => {
|
|
|
74773
74824
|
source = "href(.*)"
|
|
74774
74825
|
} = attributes4;
|
|
74775
74826
|
expectLeafDirective(node3, file, name);
|
|
74776
|
-
registerDirective(file, name, [], ["style.css"]);
|
|
74827
|
+
registerDirective(file, name, [], ["style.css"], []);
|
|
74777
74828
|
data.hName = "div";
|
|
74778
74829
|
data.hProperties = {
|
|
74779
74830
|
class: "directive-pagelist"
|
|
@@ -75369,7 +75420,8 @@ var remarkDirectiveGeogebra_default = (ctx) => () => {
|
|
|
75369
75420
|
"geogebra-web-component.js",
|
|
75370
75421
|
"client.js"
|
|
75371
75422
|
],
|
|
75372
|
-
["style.css"]
|
|
75423
|
+
["style.css"],
|
|
75424
|
+
[]
|
|
75373
75425
|
);
|
|
75374
75426
|
data.hName = "div";
|
|
75375
75427
|
data.hProperties = {
|
|
@@ -75386,7 +75438,11 @@ var remarkDirectiveGeogebra_default = (ctx) => () => {
|
|
|
75386
75438
|
height,
|
|
75387
75439
|
width,
|
|
75388
75440
|
borderRadius: 8,
|
|
75389
|
-
material: src ? ctx.makeUrl(
|
|
75441
|
+
material: src ? ctx.makeUrl(
|
|
75442
|
+
src,
|
|
75443
|
+
"public",
|
|
75444
|
+
ctx.navigation.current || void 0
|
|
75445
|
+
) : void 0,
|
|
75390
75446
|
language: ctx.config.language || "en",
|
|
75391
75447
|
"data-id": id,
|
|
75392
75448
|
showFullscreenButton,
|
|
@@ -75421,7 +75477,8 @@ var remarkDirectiveAbcMusic_default = (ctx) => () => {
|
|
|
75421
75477
|
file,
|
|
75422
75478
|
name,
|
|
75423
75479
|
["abcjs-basic-min.js", "client.js"],
|
|
75424
|
-
["style.css"]
|
|
75480
|
+
["style.css"],
|
|
75481
|
+
[]
|
|
75425
75482
|
);
|
|
75426
75483
|
requestJS(file, ["code-input", "code-input.min.js"]);
|
|
75427
75484
|
requestCSS(file, ["code-input", "code-input.min.css"]);
|
|
@@ -75543,7 +75600,7 @@ var remarkDirectivePyide_default = (ctx) => () => {
|
|
|
75543
75600
|
const data = node3.data || (node3.data = {});
|
|
75544
75601
|
const { src = "", id = hash(node3) } = node3.attributes || {};
|
|
75545
75602
|
expectContainerDirective(node3, file, name);
|
|
75546
|
-
registerDirective(file, name, ["client.js"], ["style.css"]);
|
|
75603
|
+
registerDirective(file, name, ["client.js"], ["style.css"], []);
|
|
75547
75604
|
requestJS(file, ["code-input", "code-input.min.js"]);
|
|
75548
75605
|
requestCSS(file, ["code-input", "code-input.min.css"]);
|
|
75549
75606
|
requestJS(file, ["code-input", "auto-close-brackets.min.js"]);
|
|
@@ -75784,7 +75841,7 @@ html, body {
|
|
|
75784
75841
|
const { height = 400, id = hash(node3) } = node3.attributes || {};
|
|
75785
75842
|
const data = node3.data || (node3.data = {});
|
|
75786
75843
|
expectContainerDirective(node3, file, name);
|
|
75787
|
-
registerDirective(file, name, ["client.js"], ["style.css"]);
|
|
75844
|
+
registerDirective(file, name, ["client.js"], ["style.css"], []);
|
|
75788
75845
|
requestJS(file, ["code-input", "code-input.min.js"]);
|
|
75789
75846
|
requestCSS(file, ["code-input", "code-input.min.css"]);
|
|
75790
75847
|
requestJS(file, ["code-input", "auto-close-brackets.min.js"]);
|
|
@@ -76022,13 +76079,14 @@ var remarkDirectiveH5P_default = (ctx) => () => {
|
|
|
76022
76079
|
file,
|
|
76023
76080
|
name,
|
|
76024
76081
|
["main.bundle.js", "client.js"],
|
|
76025
|
-
["style.css"]
|
|
76082
|
+
["style.css"],
|
|
76083
|
+
[]
|
|
76026
76084
|
);
|
|
76027
76085
|
const {} = node3.attributes || {};
|
|
76028
76086
|
data.hName = "div";
|
|
76029
76087
|
data.hProperties = {
|
|
76030
76088
|
class: "directive-h5p",
|
|
76031
|
-
"data-src": src ? ctx.makeUrl(src, "public") : void 0,
|
|
76089
|
+
"data-src": src ? ctx.makeUrl(src, "public", ctx.navigation.current || void 0) : void 0,
|
|
76032
76090
|
"data-id": id
|
|
76033
76091
|
};
|
|
76034
76092
|
data.hChildren = [
|
|
@@ -76071,7 +76129,8 @@ var remarkDirectiveJSXGraph_default = (ctx) => () => {
|
|
|
76071
76129
|
file,
|
|
76072
76130
|
name,
|
|
76073
76131
|
["client.js"],
|
|
76074
|
-
["jsxgraph.css", "style.css"]
|
|
76132
|
+
["jsxgraph.css", "style.css"],
|
|
76133
|
+
[]
|
|
76075
76134
|
);
|
|
76076
76135
|
requestJS(file, ["directive-jsxgraph", "jsxgraphcore.js"]);
|
|
76077
76136
|
data.hName = "div";
|
|
@@ -76124,7 +76183,7 @@ var remarkDirectiveMultievent_default = (ctx) => () => {
|
|
|
76124
76183
|
if (node3.name !== name) return;
|
|
76125
76184
|
const data = node3.data || (node3.data = {});
|
|
76126
76185
|
expectContainerDirective(node3, file, name);
|
|
76127
|
-
registerDirective(file, name, ["multievent.js"], ["style.css"]);
|
|
76186
|
+
registerDirective(file, name, ["multievent.js"], ["style.css"], []);
|
|
76128
76187
|
data.hName = "div";
|
|
76129
76188
|
data.hProperties = {
|
|
76130
76189
|
class: "directive-multievent multievent"
|
|
@@ -76196,6 +76255,30 @@ function supersub() {
|
|
|
76196
76255
|
};
|
|
76197
76256
|
}
|
|
76198
76257
|
|
|
76258
|
+
// src/remarkDirectiveUnpack.ts
|
|
76259
|
+
var remarkDirectiveUnpack_default = (ctx) => () => {
|
|
76260
|
+
return (tree, file) => {
|
|
76261
|
+
const directives = Object.keys(file.data.directives || {}).flatMap((n) => [
|
|
76262
|
+
...file.data?.directives?.[n].addditionalDirective || [],
|
|
76263
|
+
n
|
|
76264
|
+
]);
|
|
76265
|
+
directives.push("p5");
|
|
76266
|
+
visit(tree, (node3) => {
|
|
76267
|
+
if ((node3.type === "textDirective" || node3.type === "leafDirective" || node3.type === "containerDirective") && !directives.includes(node3.name)) {
|
|
76268
|
+
if (node3.type === "textDirective") {
|
|
76269
|
+
node3.value = `:${node3.name}`;
|
|
76270
|
+
} else if (node3.type === "leafDirective") {
|
|
76271
|
+
node3.value = `::${node3.name}`;
|
|
76272
|
+
} else if (node3.type === "containerDirective") {
|
|
76273
|
+
node3.value = `:::${node3.name}`;
|
|
76274
|
+
}
|
|
76275
|
+
node3.type = "text";
|
|
76276
|
+
node3.data = {};
|
|
76277
|
+
}
|
|
76278
|
+
});
|
|
76279
|
+
};
|
|
76280
|
+
};
|
|
76281
|
+
|
|
76199
76282
|
// src/process.ts
|
|
76200
76283
|
var remark = (ctx) => {
|
|
76201
76284
|
i18n.init(ctx.config.language || "en");
|
|
@@ -76242,6 +76325,8 @@ var remark = (ctx) => {
|
|
|
76242
76325
|
remarkMath,
|
|
76243
76326
|
/* needs to be last directive */
|
|
76244
76327
|
remarkDirectiveProtect_default(ctx),
|
|
76328
|
+
/* needs to be after all directives */
|
|
76329
|
+
remarkDirectiveUnpack_default(ctx),
|
|
76245
76330
|
remarkCollectHeadings_default(ctx),
|
|
76246
76331
|
remarkCollectSearchDocuments_default(ctx)
|
|
76247
76332
|
];
|