hyperbook 0.58.1 → 0.58.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.
Files changed (2) hide show
  1. package/dist/index.js +13 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -190761,7 +190761,7 @@ js-yaml/dist/js-yaml.mjs:
190761
190761
  //# sourceMappingURL=index.js.map
190762
190762
 
190763
190763
  ;// CONCATENATED MODULE: ./package.json
190764
- const package_namespaceObject = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.58.1","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":">=12.22.0"},"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 && node postbuild.mjs"},"devDependencies":{"@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"}}');
190764
+ const package_namespaceObject = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.58.2","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":">=12.22.0"},"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 && node postbuild.mjs"},"devDependencies":{"@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"}}');
190765
190765
  ;// CONCATENATED MODULE: ./build.ts
190766
190766
 
190767
190767
 
@@ -194072,9 +194072,21 @@ async function runDev({ port = 8080 }) {
194072
194072
  const socket = new WebSocket("ws://localhost:${port}");
194073
194073
  socket.addEventListener("message", (event) => {
194074
194074
  if (event.data === "RELOAD") {
194075
+ const main = document.querySelector("main");
194076
+ if (main) {
194077
+ localStorage.setItem("__hyperbook_dev_scroll", main.scrollTop);
194078
+ }
194075
194079
  window.location.reload();
194076
194080
  }
194077
194081
  });
194082
+ window.onload = () => {
194083
+ const main = document.querySelector("main");
194084
+ const scrollTop = localStorage.getItem("__hyperbook_dev_scroll");
194085
+ if (main && scrollTop !== null) {
194086
+ main.scrollTop = parseInt(scrollTop, 10);
194087
+ localStorage.removeItem("__hyperbook_dev_scroll");
194088
+ }
194089
+ };
194078
194090
  `;
194079
194091
  response.writeHead(200, {
194080
194092
  "Content-Length": responseBody.length,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperbook",
3
- "version": "0.58.1",
3
+ "version": "0.58.2",
4
4
  "author": "Mike Barkmin",
5
5
  "homepage": "https://github.com/openpatch/hyperbook#readme",
6
6
  "license": "MIT",
@@ -54,8 +54,8 @@
54
54
  "update-check": "1.5.4",
55
55
  "ws": "^8.18.0",
56
56
  "@hyperbook/fs": "0.19.0",
57
- "@hyperbook/types": "0.15.2",
58
- "@hyperbook/markdown": "0.34.1"
57
+ "@hyperbook/markdown": "0.34.1",
58
+ "@hyperbook/types": "0.15.2"
59
59
  },
60
60
  "scripts": {
61
61
  "version": "pnpm build",