hyperbook 0.77.7 → 0.77.8

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -3
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -93596,7 +93596,17 @@ var getPagesAndSections = async (root) => {
93596
93596
  var getPageList = (sections, pages) => {
93597
93597
  let pageList = [...pages];
93598
93598
  for (const section of sections) {
93599
- pageList = [...pageList, ...getPageList(section.sections, section.pages)];
93599
+ const isVirtual = section.virtual || section.navigation === "virtual";
93600
+ if (!isVirtual && section.href) {
93601
+ const indexPage = section.pages.find((p) => p.href === section.href);
93602
+ const otherPages = section.pages.filter((p) => p.href !== section.href);
93603
+ if (indexPage) {
93604
+ pageList.push(indexPage);
93605
+ }
93606
+ pageList = [...pageList, ...getPageList(section.sections, otherPages)];
93607
+ } else {
93608
+ pageList = [...pageList, ...getPageList(section.sections, section.pages)];
93609
+ }
93600
93610
  }
93601
93611
  return pageList;
93602
93612
  };
@@ -193790,7 +193800,17 @@ var getPagesAndSections = async (root5) => {
193790
193800
  var getPageList = (sections, pages) => {
193791
193801
  let pageList = [...pages];
193792
193802
  for (const section of sections) {
193793
- pageList = [...pageList, ...getPageList(section.sections, section.pages)];
193803
+ const isVirtual = section.virtual || section.navigation === "virtual";
193804
+ if (!isVirtual && section.href) {
193805
+ const indexPage = section.pages.find((p4) => p4.href === section.href);
193806
+ const otherPages = section.pages.filter((p4) => p4.href !== section.href);
193807
+ if (indexPage) {
193808
+ pageList.push(indexPage);
193809
+ }
193810
+ pageList = [...pageList, ...getPageList(section.sections, otherPages)];
193811
+ } else {
193812
+ pageList = [...pageList, ...getPageList(section.sections, section.pages)];
193813
+ }
193794
193814
  }
193795
193815
  return pageList;
193796
193816
  };
@@ -201828,7 +201848,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
201828
201848
  /***/ ((module) => {
201829
201849
 
201830
201850
  "use strict";
201831
- module.exports = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.77.7","author":"Mike Barkmin","homepage":"https://github.com/openpatch/hyperbook#readme","license":"MIT","bin":{"hyperbook":"./dist/index.js"},"files":["dist"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/openpatch/hyperbook.git","directory":"packages/hyperbook"},"bugs":{"url":"https://github.com/openpatch/hyperbook/issues"},"engines":{"node":">=18"},"scripts":{"version":"pnpm build","lint":"tsc --noEmit","dev":"ncc build ./index.ts -w -o dist/","build":"rimraf dist && ncc build ./index.ts -o ./dist/ --no-cache --no-source-map-register --external favicons --external sharp && node postbuild.mjs"},"dependencies":{"favicons":"^7.2.0"},"devDependencies":{"create-hyperbook":"workspace:*","@hyperbook/fs":"workspace:*","@hyperbook/markdown":"workspace:*","@hyperbook/types":"workspace:*","@pnpm/exportable-manifest":"1000.0.6","@types/archiver":"6.0.3","@types/async-retry":"1.4.9","@types/cross-spawn":"6.0.6","@types/lunr":"^2.3.7","@types/prompts":"2.4.9","@types/tar":"6.1.13","@types/ws":"^8.5.14","@vercel/ncc":"0.38.3","archiver":"7.0.1","async-retry":"1.3.3","chalk":"5.4.1","chokidar":"4.0.3","commander":"12.1.0","cpy":"11.1.0","cross-spawn":"7.0.6","domutils":"^3.2.2","extract-zip":"^2.0.1","got":"12.6.0","htmlparser2":"^10.0.0","lunr":"^2.3.9","lunr-languages":"^1.14.0","mime":"^4.0.6","prompts":"2.4.2","rimraf":"6.0.1","tar":"7.4.3","update-check":"1.5.4","ws":"^8.18.0"}}');
201851
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.77.8","author":"Mike Barkmin","homepage":"https://github.com/openpatch/hyperbook#readme","license":"MIT","bin":{"hyperbook":"./dist/index.js"},"files":["dist"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/openpatch/hyperbook.git","directory":"packages/hyperbook"},"bugs":{"url":"https://github.com/openpatch/hyperbook/issues"},"engines":{"node":">=18"},"scripts":{"version":"pnpm build","lint":"tsc --noEmit","dev":"ncc build ./index.ts -w -o dist/","build":"rimraf dist && ncc build ./index.ts -o ./dist/ --no-cache --no-source-map-register --external favicons --external sharp && node postbuild.mjs"},"dependencies":{"favicons":"^7.2.0"},"devDependencies":{"create-hyperbook":"workspace:*","@hyperbook/fs":"workspace:*","@hyperbook/markdown":"workspace:*","@hyperbook/types":"workspace:*","@pnpm/exportable-manifest":"1000.0.6","@types/archiver":"6.0.3","@types/async-retry":"1.4.9","@types/cross-spawn":"6.0.6","@types/lunr":"^2.3.7","@types/prompts":"2.4.9","@types/tar":"6.1.13","@types/ws":"^8.5.14","@vercel/ncc":"0.38.3","archiver":"7.0.1","async-retry":"1.3.3","chalk":"5.4.1","chokidar":"4.0.3","commander":"12.1.0","cpy":"11.1.0","cross-spawn":"7.0.6","domutils":"^3.2.2","extract-zip":"^2.0.1","got":"12.6.0","htmlparser2":"^10.0.0","lunr":"^2.3.9","lunr-languages":"^1.14.0","mime":"^4.0.6","prompts":"2.4.2","rimraf":"6.0.1","tar":"7.4.3","update-check":"1.5.4","ws":"^8.18.0"}}');
201832
201852
 
201833
201853
  /***/ })
201834
201854
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperbook",
3
- "version": "0.77.7",
3
+ "version": "0.77.8",
4
4
  "author": "Mike Barkmin",
5
5
  "homepage": "https://github.com/openpatch/hyperbook#readme",
6
6
  "license": "MIT",
@@ -56,10 +56,10 @@
56
56
  "tar": "7.4.3",
57
57
  "update-check": "1.5.4",
58
58
  "ws": "^8.18.0",
59
- "@hyperbook/fs": "0.24.1",
60
59
  "create-hyperbook": "0.3.2",
60
+ "@hyperbook/markdown": "0.48.6",
61
61
  "@hyperbook/types": "0.20.0",
62
- "@hyperbook/markdown": "0.48.6"
62
+ "@hyperbook/fs": "0.24.2"
63
63
  },
64
64
  "scripts": {
65
65
  "version": "pnpm build",