@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 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 && isEmpty) {
64548
- children.push({
64549
- type: "element",
64550
- tagName: "div",
64551
- properties: {
64552
- class: [
64553
- "collapsible",
64554
- "name",
64555
- "empty",
64556
- ctx.navigation.current?.href === href ? "active" : "",
64557
- isExpanded ? "expanded" : ""
64558
- ].join(" ")
64559
- },
64560
- children: [
64561
- {
64562
- type: "element",
64563
- tagName: "span",
64564
- properties: {
64565
- class: "label"
64566
- },
64567
- children: [
64568
- {
64569
- type: "text",
64570
- value: name
64571
- }
64572
- ]
64573
- }
64574
- ]
64575
- });
64576
- } else {
64577
- children.push({
64578
- type: "element",
64579
- tagName: "div",
64580
- properties: {
64581
- class: [
64582
- "collapsible",
64583
- "name",
64584
- ctx.navigation.current?.href === href ? "active" : "",
64585
- isExpanded ? "expanded" : ""
64586
- ].join(" ")
64587
- },
64588
- children: [
64589
- {
64590
- type: "element",
64591
- tagName: "a",
64592
- properties: {
64593
- href,
64594
- class: "label"
64595
- },
64596
- children: [
64597
- {
64598
- type: "text",
64599
- value: name
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 = [];