@hyperbook/markdown 0.15.1 → 0.15.2
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.js +60 -58
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64544,64 +64544,66 @@ var makeNavigationSectionElement = (ctx, section) => {
|
|
|
64544
64544
|
const { virtual, isEmpty, href, name, pages, sections, expanded } = section;
|
|
64545
64545
|
const children = [];
|
|
64546
64546
|
let isExpanded = ctx.navigation.current?.href?.startsWith(href || "") || expanded;
|
|
64547
|
-
if (!virtual
|
|
64548
|
-
|
|
64549
|
-
|
|
64550
|
-
|
|
64551
|
-
|
|
64552
|
-
|
|
64553
|
-
|
|
64554
|
-
|
|
64555
|
-
|
|
64556
|
-
|
|
64557
|
-
|
|
64558
|
-
|
|
64559
|
-
|
|
64560
|
-
|
|
64561
|
-
|
|
64562
|
-
|
|
64563
|
-
|
|
64564
|
-
|
|
64565
|
-
|
|
64566
|
-
|
|
64567
|
-
|
|
64568
|
-
|
|
64569
|
-
|
|
64570
|
-
|
|
64571
|
-
|
|
64572
|
-
|
|
64573
|
-
|
|
64574
|
-
|
|
64575
|
-
|
|
64576
|
-
|
|
64577
|
-
|
|
64578
|
-
|
|
64579
|
-
|
|
64580
|
-
|
|
64581
|
-
|
|
64582
|
-
|
|
64583
|
-
|
|
64584
|
-
|
|
64585
|
-
|
|
64586
|
-
|
|
64587
|
-
|
|
64588
|
-
|
|
64589
|
-
|
|
64590
|
-
|
|
64591
|
-
|
|
64592
|
-
|
|
64593
|
-
|
|
64594
|
-
|
|
64595
|
-
|
|
64596
|
-
|
|
64597
|
-
|
|
64598
|
-
|
|
64599
|
-
|
|
64600
|
-
|
|
64601
|
-
|
|
64602
|
-
|
|
64603
|
-
|
|
64604
|
-
|
|
64547
|
+
if (!virtual) {
|
|
64548
|
+
if (isEmpty) {
|
|
64549
|
+
children.push({
|
|
64550
|
+
type: "element",
|
|
64551
|
+
tagName: "div",
|
|
64552
|
+
properties: {
|
|
64553
|
+
class: [
|
|
64554
|
+
"collapsible",
|
|
64555
|
+
"name",
|
|
64556
|
+
"empty",
|
|
64557
|
+
ctx.navigation.current?.href === href ? "active" : "",
|
|
64558
|
+
isExpanded ? "expanded" : ""
|
|
64559
|
+
].join(" ")
|
|
64560
|
+
},
|
|
64561
|
+
children: [
|
|
64562
|
+
{
|
|
64563
|
+
type: "element",
|
|
64564
|
+
tagName: "span",
|
|
64565
|
+
properties: {
|
|
64566
|
+
class: "label"
|
|
64567
|
+
},
|
|
64568
|
+
children: [
|
|
64569
|
+
{
|
|
64570
|
+
type: "text",
|
|
64571
|
+
value: name
|
|
64572
|
+
}
|
|
64573
|
+
]
|
|
64574
|
+
}
|
|
64575
|
+
]
|
|
64576
|
+
});
|
|
64577
|
+
} else {
|
|
64578
|
+
children.push({
|
|
64579
|
+
type: "element",
|
|
64580
|
+
tagName: "div",
|
|
64581
|
+
properties: {
|
|
64582
|
+
class: [
|
|
64583
|
+
"collapsible",
|
|
64584
|
+
"name",
|
|
64585
|
+
ctx.navigation.current?.href === href ? "active" : "",
|
|
64586
|
+
isExpanded ? "expanded" : ""
|
|
64587
|
+
].join(" ")
|
|
64588
|
+
},
|
|
64589
|
+
children: [
|
|
64590
|
+
{
|
|
64591
|
+
type: "element",
|
|
64592
|
+
tagName: "a",
|
|
64593
|
+
properties: {
|
|
64594
|
+
href,
|
|
64595
|
+
class: "label"
|
|
64596
|
+
},
|
|
64597
|
+
children: [
|
|
64598
|
+
{
|
|
64599
|
+
type: "text",
|
|
64600
|
+
value: name
|
|
64601
|
+
}
|
|
64602
|
+
]
|
|
64603
|
+
}
|
|
64604
|
+
]
|
|
64605
|
+
});
|
|
64606
|
+
}
|
|
64605
64607
|
}
|
|
64606
64608
|
const pagesElements = pages.filter((page) => !page.hide).map((page) => makeNavigationPageElement(ctx, page));
|
|
64607
64609
|
const linksElements = [];
|