hyperbook 0.98.2 → 0.99.1

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
@@ -55637,8 +55637,8 @@ function makeBaseCtx(root, hyperbookJson, basePath, rootProject) {
55637
55637
  if (p.includes("://") || p.startsWith("data:")) {
55638
55638
  return p;
55639
55639
  }
55640
- if (p.endsWith(".md")) {
55641
- p = p.slice(0, -3);
55640
+ if (p.endsWith(".md.hbs")) {
55641
+ p = p.slice(0, -7);
55642
55642
  }
55643
55643
  else if (p.endsWith(".md.json")) {
55644
55644
  p = p.slice(0, -8);
@@ -55646,6 +55646,9 @@ function makeBaseCtx(root, hyperbookJson, basePath, rootProject) {
55646
55646
  else if (p.endsWith(".md.yml")) {
55647
55647
  p = p.slice(0, -7);
55648
55648
  }
55649
+ else if (p.endsWith(".md")) {
55650
+ p = p.slice(0, -3);
55651
+ }
55649
55652
  if (page && !p.startsWith("/")) {
55650
55653
  p = resolveRelativePath(p, page);
55651
55654
  }
@@ -202060,6 +202063,65 @@ var remarkDirectiveBlockflowEditor_default = (ctx) => () => {
202060
202063
  };
202061
202064
  };
202062
202065
 
202066
+ // src/remarkDirectiveKirimoto.ts
202067
+ var remarkDirectiveKirimoto_default = (ctx) => () => {
202068
+ const name = "kirimoto";
202069
+ return (tree, file) => {
202070
+ visit(tree, function(node3) {
202071
+ if (isDirective(node3)) {
202072
+ if (node3.name !== name) return;
202073
+ const data = node3.data || (node3.data = {});
202074
+ const {
202075
+ height = ctx.config.elements?.kirimoto?.height || "calc(100vh - 60px)",
202076
+ mode,
202077
+ model,
202078
+ workspace,
202079
+ settings = ctx.config.elements?.kirimoto?.settings
202080
+ } = node3.attributes || {};
202081
+ expectLeafDirective(node3, file, name);
202082
+ registerDirective(file, name, ["client.js"], ["style.css"], []);
202083
+ const properties = {
202084
+ class: "directive-kirimoto",
202085
+ style: `--kirimoto-height: ${height}`
202086
+ };
202087
+ if (mode) properties["data-mode"] = mode;
202088
+ if (model) properties["data-model"] = model;
202089
+ if (workspace) properties["data-workspace"] = workspace;
202090
+ if (settings) properties["data-settings"] = settings;
202091
+ data.hName = "div";
202092
+ data.hProperties = properties;
202093
+ data.hChildren = [
202094
+ {
202095
+ type: "element",
202096
+ tagName: "iframe",
202097
+ properties: {
202098
+ src: "https://grid.space/kiri/",
202099
+ allowfullscreen: true,
202100
+ title: "Kiri:Moto 3D Slicer"
202101
+ },
202102
+ children: []
202103
+ },
202104
+ {
202105
+ type: "element",
202106
+ tagName: "div",
202107
+ properties: { class: "menu" },
202108
+ children: [
202109
+ {
202110
+ type: "element",
202111
+ tagName: "button",
202112
+ properties: {
202113
+ onclick: "hyperbook.kirimoto.openFullscreen(this)"
202114
+ },
202115
+ children: [{ type: "text", value: "Fullscreen" }]
202116
+ }
202117
+ ]
202118
+ }
202119
+ ];
202120
+ }
202121
+ });
202122
+ };
202123
+ };
202124
+
202063
202125
  // src/process.ts
202064
202126
  var remark = (ctx) => {
202065
202127
  i18n.init(ctx.config.language || "en");
@@ -202108,6 +202170,7 @@ var remark = (ctx) => {
202108
202170
  remarkDirectiveTextinput_default(ctx),
202109
202171
  remarkDirectiveTypst_default(ctx),
202110
202172
  remarkDirectiveOpenscad_default(ctx),
202173
+ remarkDirectiveKirimoto_default(ctx),
202111
202174
  remarkCode_default(ctx),
202112
202175
  remarkMath,
202113
202176
  remarkGithubEmoji,
@@ -202235,7 +202298,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
202235
202298
  /***/ ((module) => {
202236
202299
 
202237
202300
  "use strict";
202238
- module.exports = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.98.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":">=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"}}');
202301
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.99.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":">=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"}}');
202239
202302
 
202240
202303
  /***/ })
202241
202304
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperbook",
3
- "version": "0.98.2",
3
+ "version": "0.99.1",
4
4
  "author": "Mike Barkmin",
5
5
  "homepage": "https://github.com/openpatch/hyperbook#readme",
6
6
  "license": "MIT",
@@ -57,9 +57,9 @@
57
57
  "update-check": "1.5.4",
58
58
  "ws": "^8.18.0",
59
59
  "create-hyperbook": "0.3.6",
60
- "@hyperbook/types": "0.23.0",
61
- "@hyperbook/markdown": "0.69.2",
62
- "@hyperbook/fs": "0.25.0"
60
+ "@hyperbook/fs": "0.25.0",
61
+ "@hyperbook/markdown": "0.70.1",
62
+ "@hyperbook/types": "0.23.0"
63
63
  },
64
64
  "scripts": {
65
65
  "version": "pnpm build",