hyperbook 0.13.11 → 0.13.13

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,10 +1,10 @@
1
1
  {
2
2
  "name": "@platforms/web",
3
- "version": "0.13.11",
3
+ "version": "0.13.13",
4
4
  "private": true,
5
5
  "dependencies": {
6
6
  "gray-matter": "4.0.3",
7
- "next": "13.2.3",
7
+ "next": "13.2.4",
8
8
  "react": "18.2.0",
9
9
  "react-dom": "18.2.0",
10
10
  "react-redux": "8.0.5",
@@ -14,7 +14,7 @@
14
14
  "@hyperbook/element-bitflow": "0.1.10",
15
15
  "@hyperbook/element-bookmarks": "0.2.4",
16
16
  "@hyperbook/element-collapsible": "0.3.0",
17
- "@hyperbook/element-dl": "0.1.9",
17
+ "@hyperbook/element-dl": "0.1.10",
18
18
  "@hyperbook/element-excalidraw": "0.3.1",
19
19
  "@hyperbook/element-mermaid": "0.1.9",
20
20
  "@hyperbook/element-protect": "0.3.0",
@@ -24,7 +24,7 @@
24
24
  "@hyperbook/element-tabs": "0.1.10",
25
25
  "@hyperbook/element-term": "0.1.9",
26
26
  "@hyperbook/element-youtube": "0.1.9",
27
- "@hyperbook/fs": "0.7.3",
27
+ "@hyperbook/fs": "0.7.4",
28
28
  "@hyperbook/markdown": "0.6.0",
29
29
  "@hyperbook/provider": "0.2.1",
30
30
  "@hyperbook/shell": "0.4.2",
@@ -33,7 +33,7 @@
33
33
  "@hyperbook/toc": "0.2.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@hyperbook/next-watch": "0.2.1"
36
+ "@hyperbook/next-watch": "0.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "next:dev": "next-hyperbook-watch",
@@ -1 +1 @@
1
- import{Shell as F}from"@hyperbook/shell";import{parseTocFromMarkdown as N}from"@hyperbook/toc";import{Markdown as G}from"@hyperbook/markdown";import{useActivePageId as L,useLink as M}from"@hyperbook/provider";import{Fragment as H}from"react";import{vfile as u,hyperbook as k}from"@hyperbook/fs";import{useScrollHash as T}from"../useScrollHash";import B from"path";function J({markdown:r,data:a,navigation:o,toc:e}){const t=o.current,P=M();return L(),T(),<H><F navigation={o}toc={t.toc==!1?null:e}><article><G children={r}/></article>{!a.hide&&<div className="jump-container">{o.previous?<P className="jump previous"href={o.previous.href}>{o.previous.name}</P>:<div className="flex"/>}{o.next?<P className="jump next"href={o.next.href}>{o.next.name}</P>:<div className="flex"/>}</div>}</F></H>}const X=async({params:r})=>{const a=process.env.root??process.cwd();let o="";r.page&&(o=B.join(...r.page));const e=await u.get(a,"book","/"+o);if(!e)throw Error(`Missing file ${o}`);const{content:t,data:P}=await u.getMarkdown(e),w=await k.getJson(a),S=await k.getNavigation(a,e);return{props:{locale:P?.lang||w.language,markdown:t,data:P,toc:N(t),navigation:S}}},Y=async()=>{const r=process.env.root??process.cwd();return{paths:(await u.listForFolder(r,"book",k.allowedBookFiles)).map(e=>{const t=e.path.href.slice(1).split("/");return e.name==="index"&&t.pop(),{params:{page:t}}}),fallback:!1}};export{J as default,Y as getStaticPaths,X as getStaticProps};
1
+ import{Shell as F}from"@hyperbook/shell";import{parseTocFromMarkdown as N}from"@hyperbook/toc";import{Markdown as G}from"@hyperbook/markdown";import{useActivePageId as L,useLink as M}from"@hyperbook/provider";import{Fragment as H}from"react";import{vfile as u,hyperbook as k}from"@hyperbook/fs";import{useScrollHash as T}from"../useScrollHash";import B from"path";function J({markdown:r,data:a,navigation:o,toc:e}){const t=o.current,P=M();return L(),T(),<H><F navigation={o}toc={t.toc==!1?null:e}><article><G children={r}/></article>{!a.hide&&<div className="jump-container">{o.previous?<P className="jump previous"href={o.previous.href}>{o.previous.name}</P>:<div className="flex"/>}{o.next?<P className="jump next"href={o.next.href}>{o.next.name}</P>:<div className="flex"/>}</div>}</F></H>}const X=async({params:r})=>{const a=process.env.root??process.cwd();let o="";r.page&&(o=B.join(...r.page));const e=await u.get(a,"book","/"+o);if(!e)throw Error(`Missing file ${o}`);const{content:t,data:P}=await u.getMarkdown(e),w=await k.getJson(a),S=await k.getNavigation(a,e);return{props:{locale:P?.lang||w.language,markdown:t,data:P,toc:N(t),navigation:S}}},Y=async()=>{const r=process.env.root??process.cwd();return{paths:(await u.listForFolder(r,"book",k.allowedBookFiles)).map(e=>{const t=e.path.href.slice(1).split("/");return e.name==="index"&&e.path.directory===""&&t.pop(),{params:{page:t}}}),fallback:!1}};export{J as default,Y as getStaticPaths,X as getStaticProps};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperbook",
3
- "version": "0.13.11",
3
+ "version": "0.13.13",
4
4
  "author": "Mike Barkmin",
5
5
  "homepage": "https://github.com/openpatch/hyperbook#readme",
6
6
  "license": "MIT",
@@ -25,11 +25,11 @@
25
25
  "node": ">=12.22.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@pnpm/exportable-manifest": "4.0.7",
29
- "@types/archiver": "5.3.1",
28
+ "@pnpm/exportable-manifest": "4.0.8",
29
+ "@types/archiver": "5.3.2",
30
30
  "@types/async-retry": "1.4.5",
31
31
  "@types/cross-spawn": "6.0.2",
32
- "@types/prompts": "2.4.2",
32
+ "@types/prompts": "2.4.3",
33
33
  "@types/rimraf": "3.0.2",
34
34
  "@types/tar": "6.1.4",
35
35
  "@vercel/ncc": "0.36.1",
@@ -39,15 +39,15 @@
39
39
  "commander": "9.5.0",
40
40
  "cpy": "9.0.1",
41
41
  "cross-spawn": "7.0.3",
42
- "got": "12.5.3",
42
+ "got": "12.6.0",
43
43
  "prompts": "2.4.2",
44
44
  "rimraf": "3.0.2",
45
45
  "tar": "6.1.13",
46
46
  "update-check": "1.5.4",
47
- "@platforms/web": "0.13.11"
47
+ "@platforms/web": "0.13.13"
48
48
  },
49
49
  "dependencies": {
50
- "@hyperbook/fs": "0.7.3",
50
+ "@hyperbook/fs": "0.7.4",
51
51
  "@hyperbook/types": "0.5.0"
52
52
  },
53
53
  "scripts": {