@hyperbook/markdown 0.15.1 → 0.15.3
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/assets/client.js +1 -0
- package/dist/assets/shell.css +0 -1
- package/dist/index.js +61 -59
- package/dist/index.js.map +2 -2
- package/package.json +3 -3
package/dist/assets/client.js
CHANGED
|
@@ -2,6 +2,7 @@ var hyperbook = (function () {
|
|
|
2
2
|
const collapsibles = document.getElementsByClassName("collapsible");
|
|
3
3
|
const animationDelay = 100;
|
|
4
4
|
const calcMaxHeight = (elem) => {
|
|
5
|
+
if (!elem) return;
|
|
5
6
|
const content = elem.nextElementSibling;
|
|
6
7
|
if (content) {
|
|
7
8
|
if (elem.classList.contains("expanded")) {
|
package/dist/assets/shell.css
CHANGED
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 = [];
|
|
@@ -64621,7 +64623,7 @@ var makeNavigationSectionElement = (ctx, section) => {
|
|
|
64621
64623
|
type: "element",
|
|
64622
64624
|
tagName: "div",
|
|
64623
64625
|
properties: {
|
|
64624
|
-
class: "collapsible-content links"
|
|
64626
|
+
class: virtual ? "links" : "collapsible-content links"
|
|
64625
64627
|
},
|
|
64626
64628
|
children: linksElements
|
|
64627
64629
|
});
|