hyperbook 0.22.0 → 0.22.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforms/web",
3
- "version": "0.22.0",
3
+ "version": "0.22.2",
4
4
  "private": true,
5
5
  "dependencies": {
6
6
  "gray-matter": "4.0.3",
@@ -10,20 +10,20 @@
10
10
  "react-redux": "8.1.0",
11
11
  "redux": "4.2.1",
12
12
  "redux-persist": "6.0.0",
13
+ "@hyperbook/drawer": "0.0.0",
13
14
  "@hyperbook/element-audio": "0.1.2",
14
15
  "@hyperbook/element-alert": "0.1.14",
15
16
  "@hyperbook/element-bitflow": "0.1.15",
16
17
  "@hyperbook/element-bookmarks": "0.2.9",
17
18
  "@hyperbook/element-collapsible": "0.3.5",
18
- "@hyperbook/drawer": "0.0.0",
19
19
  "@hyperbook/element-dl": "0.1.15",
20
20
  "@hyperbook/element-embed": "0.1.5",
21
21
  "@hyperbook/element-excalidraw": "0.4.5",
22
+ "@hyperbook/element-mermaid": "0.1.14",
22
23
  "@hyperbook/element-online-ide": "0.3.3",
23
24
  "@hyperbook/element-plantuml": "0.1.1",
24
- "@hyperbook/element-mermaid": "0.1.14",
25
25
  "@hyperbook/element-protect": "0.3.5",
26
- "@hyperbook/element-qr": "0.2.0",
26
+ "@hyperbook/element-qr": "0.2.1",
27
27
  "@hyperbook/element-scratchblock": "0.1.5",
28
28
  "@hyperbook/element-sql-ide": "0.3.3",
29
29
  "@hyperbook/element-struktog": "0.1.14",
@@ -1 +1 @@
1
- import{Shell as S}from"@hyperbook/shell";import{Fragment as F}from"react";import{useActivePageId as T,useLink as G}from"@hyperbook/provider";import{Markdown as H}from"@hyperbook/markdown";import{hyperbook as v,vfile as w}from"@hyperbook/fs";import{useScrollHash as L}from"../../useScrollHash";function M({markdown:e,navigation:r,data:t,references:o}){const P=G();return T(),L(),<S navigation={r}><article><H children={e}showToc={t.toc!==!1}/><div className="pages">{o.map((a,k)=><F key={a.path.href}>{k>0&&", "}<P href={a.path.href}>{a.name}</P></F>)}</div></article></S>}const D=async({params:e})=>{const r=process.env.root??process.cwd(),t=await w.get(r,"glossary","/glossary/"+e.term.join("/"));if(!t)throw Error(`Missing file ${t}`);const{content:o,data:P}=await w.getMarkdown(t),a=await v.getJson(r),k=await v.getNavigation(r,t);return{props:{locale:P?.lang||a.language,markdown:o,data:P,references:t.references,navigation:k}}},K=async()=>{const e=process.env.root??process.cwd();return{paths:(await w.listForFolder(e,"glossary")).map(o=>({params:{term:o.path.href.slice(10).split("/")}})),fallback:!1}};export{M as default,K as getStaticPaths,D as getStaticProps};
1
+ import{Shell as F}from"@hyperbook/shell";import{Fragment as T}from"react";import{useActivePageId as G,useLink as x}from"@hyperbook/provider";import{Markdown as H}from"@hyperbook/markdown";import{hyperbook as S,vfile as y}from"@hyperbook/fs";import{useScrollHash as L}from"../../useScrollHash";function M({markdown:e,navigation:o,data:t,references:a}){const P=x();return G(),L(),<F navigation={o}><article><H children={e}showToc={t.toc!==!1}/><div className="pages">{a.map((r,v)=><T key={r.path.href}>{v>0&&", "}<P href={r.path.href}>{r.markdown?.data?.name??r.name}</P></T>)}</div></article></F>}const D=async({params:e})=>{const o=process.env.root??process.cwd(),t=await y.get(o,"glossary","/glossary/"+e.term.join("/"));if(!t)throw Error(`Missing file ${t}`);const{content:a,data:P}=await y.getMarkdown(t),r=await S.getJson(o),v=await S.getNavigation(o,t);return{props:{locale:P?.lang||r.language,markdown:a,data:P,references:t.references,navigation:v}}},K=async()=>{const e=process.env.root??process.cwd();return{paths:(await y.listForFolder(e,"glossary")).map(a=>({params:{term:a.path.href.slice(10).split("/")}})),fallback:!1}};export{M as default,K as getStaticPaths,D as getStaticProps};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperbook",
3
- "version": "0.22.0",
3
+ "version": "0.22.2",
4
4
  "author": "Mike Barkmin",
5
5
  "homepage": "https://github.com/openpatch/hyperbook#readme",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "rimraf": "3.0.2",
45
45
  "tar": "6.1.14",
46
46
  "update-check": "1.5.4",
47
- "@platforms/web": "0.22.0"
47
+ "@platforms/web": "0.22.2"
48
48
  },
49
49
  "dependencies": {
50
50
  "@hyperbook/fs": "0.9.0",