markshelf 0.1.4 → 0.2.0
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -0
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +12 -0
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/asset/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/asset/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/asset/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/asset/route.js +7 -0
- package/.next/standalone/.next/server/app/api/asset/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/asset/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/asset/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/diff/route.js +3 -2
- package/.next/standalone/.next/server/app/api/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/file/route.js +3 -2
- package/.next/standalone/.next/server/app/api/file/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/graph/route.js +3 -2
- package/.next/standalone/.next/server/app/api/graph/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/history/route.js +3 -2
- package/.next/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/search/route.js +3 -2
- package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/timeline/route.js +3 -2
- package/.next/standalone/.next/server/app/api/timeline/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tree/route.js +3 -2
- package/.next/standalone/.next/server/app/api/tree/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/watch/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/watch/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/watch/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/watch/route.js +6 -0
- package/.next/standalone/.next/server/app/api/watch/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/watch/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/watch/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/favicon.ico/route.js +2 -1
- package/.next/standalone/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-_k816._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01e7zo7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04mxfkc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__053gm34._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d.-s5p._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0i.wyss._.js +6 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__01cq2u6._.js → [root-of-the-server]__0nr71d2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0op9af~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rwylex._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__13vatcq._.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_asset_route_actions_03nkw38.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_watch_route_actions_0go0kk3.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules_next_04~_e52._.js +13 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05ar4zx._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09qrkq5._.js +5 -5
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0serya4._.js → [root-of-the-server]__0u7hi3-._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_0eva9q1._.js → node_modules_035nqw0._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_06r3o30._.js → node_modules_0_lpyzd._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_09.cbx4._.js → node_modules_0d0g.gp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_0ic-wja._.js → node_modules_0m258l0._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_0w2-q.z._.js → node_modules_0sxu8tl._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_11wp0ye._.js → node_modules_0ub-k6d._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_05e-8m3._.js → node_modules_0uebmgu._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules_10cz306._.js → node_modules_0~vmgv6._.js} +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/0.z3b.-~oogkw.js +11 -0
- package/.next/standalone/.next/static/chunks/13tjphiswda64.css +1 -0
- package/.next/standalone/Dockerfile +54 -0
- package/.next/standalone/LICENSE +21 -0
- package/.next/standalone/README.md +71 -21
- package/.next/standalone/docker/README.md +65 -0
- package/.next/standalone/docker-entrypoint.sh +40 -0
- package/.next/standalone/docs//344/273/225/346/247/230/README.md +9 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC1-CLI/README.md +8 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC1-CLI/SPEC1.1-bin-cli.md +14 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC1-CLI/SPEC1.2-Dockerfile.md +18 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC1-CLI/SPEC1.3-basePath.md +11 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC1-CLI/SPEC1.4-/347/222/260/345/242/203/345/244/211/346/225/260.md +14 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC2-/343/202/260/343/203/251/343/203/225/346/217/217/347/224/273/README.md +3 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC2-/343/202/260/343/203/251/343/203/225/346/217/217/347/224/273/SPEC2.1-graph-api.md +16 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC2-/343/202/260/343/203/251/343/203/225/346/217/217/347/224/273/SPEC2.2-breadthfirst-layout.md +10 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC2-/343/202/260/343/203/251/343/203/225/346/217/217/347/224/273/SPEC2.3-/343/203/252/343/203/263/343/202/257/350/247/243/346/236/220.md +32 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC3-UI/343/202/263/343/203/263/343/203/235/343/203/274/343/203/215/343/203/263/343/203/210/README.md +12 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC3-UI/343/202/263/343/203/263/343/203/235/343/203/274/343/203/215/343/203/263/343/203/210/SPEC3.1-PreviewPopup.md +10 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC3-UI/343/202/263/343/203/263/343/203/235/343/203/274/343/203/215/343/203/263/343/203/210/SPEC3.2-TreeView.md +10 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC3-UI/343/202/263/343/203/263/343/203/235/343/203/274/343/203/215/343/203/263/343/203/210/SPEC3.3-TableOfContents.md +11 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC3-UI/343/202/263/343/203/263/343/203/235/343/203/274/343/203/215/343/203/263/343/203/210/SPEC3.4-DetailPanel/343/202/277/343/203/226.md +13 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC3-UI/343/202/263/343/203/263/343/203/235/343/203/274/343/203/215/343/203/263/343/203/210/SPEC3.5-Markdown/343/203/254/343/203/263/343/203/200/343/203/252/343/203/263/343/202/260.md +22 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC3-UI/343/202/263/343/203/263/343/203/235/343/203/274/343/203/215/343/203/263/343/203/210/SPEC3.6-SearchBar.md +15 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC3-UI/343/202/263/343/203/263/343/203/235/343/203/274/343/203/215/343/203/263/343/203/210/SPEC3.7-/343/203/221/343/203/215/343/203/253/343/203/252/343/202/265/343/202/244/343/202/266/343/203/274.md +11 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC3-UI/343/202/263/343/203/263/343/203/235/343/203/274/343/203/215/343/203/263/343/203/210/SPEC3.8-/347/224/273/345/203/217/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274.md +11 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC4-API/README.md +12 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC4-API/SPEC4.1-tree.md +23 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC4-API/SPEC4.2-file.md +14 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC4-API/SPEC4.3-search.md +23 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC4-API/SPEC4.4-watch.md +17 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC4-API/SPEC4.5-history.md +22 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC4-API/SPEC4.6-timeline.md +26 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC4-API/SPEC4.7-diff.md +13 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC4-API/SPEC4.8-asset.md +22 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC5-/346/260/270/347/266/232/345/214/226/README.md +8 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC5-/346/260/270/347/266/232/345/214/226/SPEC5.1-localStorage.md +20 -0
- package/.next/standalone/docs//344/273/225/346/247/230/SPEC5-/346/260/270/347/266/232/345/214/226/SPEC5.2-URL/343/202/257/343/202/250/343/203/252.md +17 -0
- package/.next/standalone/docs//347/224/250/350/252/236/351/233/206/Cytoscape.md +5 -0
- package/.next/standalone/docs//347/224/250/350/252/236/351/233/206/Markdown.md +5 -0
- package/.next/standalone/docs//347/224/250/350/252/236/351/233/206/Nextjs.md +5 -0
- package/.next/standalone/docs//347/224/250/350/252/236/351/233/206/breadthfirst.md +5 -0
- package/.next/standalone/docs//347/224/250/350/252/236/351/233/206/npx.md +5 -0
- package/.next/standalone/docs//347/224/250/350/252/236/351/233/206/standalone.md +5 -0
- package/.next/standalone/docs//347/224/250/350/252/236/351/233/206//343/203/204/343/203/252/343/203/274/343/203/223/343/203/245/343/203/274.md +5 -0
- package/.next/standalone/docs//347/224/250/350/252/236/351/233/206//343/203/227/343/203/254/343/203/223/343/203/245/343/203/274/343/203/235/343/203/203/343/203/227/343/202/242/343/203/203/343/203/227.md +5 -0
- package/.next/standalone/docs//347/224/250/350/252/236/351/233/206//343/203/252/343/203/263/343/202/257/343/202/260/343/203/251/343/203/225.md +5 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/README.md +9 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ1-/343/203/223/343/203/245/343/203/274/343/202/242/350/265/267/345/213/225/README.md +5 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ1-/343/203/223/343/203/245/343/203/274/343/202/242/350/265/267/345/213/225/REQ1.1-npx/350/265/267/345/213/225.md +13 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ1-/343/203/223/343/203/245/343/203/274/343/202/242/350/265/267/345/213/225/REQ1.2-Docker/350/265/267/345/213/225.md +14 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ1-/343/203/223/343/203/245/343/203/274/343/202/242/350/265/267/345/213/225/REQ1.3-BASE_PATH/351/205/215/344/277/241.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ2-/343/203/252/343/203/263/343/202/257/343/202/260/343/203/251/343/203/225/README.md +3 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ2-/343/203/252/343/203/263/343/202/257/343/202/260/343/203/251/343/203/225/REQ2.1-/343/202/260/343/203/251/343/203/225/346/217/217/347/224/273.md +11 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ2-/343/203/252/343/203/263/343/202/257/343/202/260/343/203/251/343/203/225/REQ2.2-/351/232/216/345/261/244/345/210/207/346/233/277.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ2-/343/203/252/343/203/263/343/202/257/343/202/260/343/203/251/343/203/225/REQ2.3-/343/203/225/343/202/251/343/203/253/343/203/200/351/231/244/345/244/226.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ3-/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274/343/201/250/343/203/204/343/203/252/343/203/274/README.md +5 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ3-/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274/343/201/250/343/203/204/343/203/252/343/203/274/REQ3.1-/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274/343/203/235/343/203/203/343/203/227/343/202/242/343/203/203/343/203/227.md +15 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ3-/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274/343/201/250/343/203/204/343/203/252/343/203/274/REQ3.2-/343/203/204/343/203/252/343/203/274/343/203/223/343/203/245/343/203/274.md +14 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ3-/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274/343/201/250/343/203/204/343/203/252/343/203/274/REQ3.3-/347/233/256/346/254/241.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ3-/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274/343/201/250/343/203/204/343/203/252/343/203/274/REQ3.4-/343/203/221/343/203/215/343/203/253/343/203/252/343/202/265/343/202/244/343/202/266/343/203/274.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ3-/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274/343/201/250/343/203/204/343/203/252/343/203/274/REQ3.5-/343/202/277/343/203/226/343/202/267/343/202/271/343/203/206/343/203/240.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ3-/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274/343/201/250/343/203/204/343/203/252/343/203/274/REQ3.6-/347/224/273/345/203/217/343/203/227/343/203/254/343/203/223/343/203/245/343/203/274.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ4-/343/203/212/343/203/223/343/202/262/343/203/274/343/202/267/343/203/247/343/203/263/README.md +3 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ4-/343/203/212/343/203/223/343/202/262/343/203/274/343/202/267/343/203/247/343/203/263/REQ4.1-/346/210/273/343/202/213/351/200/262/343/202/200.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ4-/343/203/212/343/203/223/343/202/262/343/203/274/343/202/267/343/203/247/343/203/263/REQ4.2-/345/205/261/346/234/211/345/217/257/350/203/275URL.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ5-/343/203/225/343/202/241/343/202/244/343/203/253/346/244/234/347/264/242/README.md +3 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ5-/343/203/225/343/202/241/343/202/244/343/203/253/346/244/234/347/264/242/REQ5.1-/343/203/225/343/202/241/343/202/244/343/203/253/345/220/215/346/244/234/347/264/242.md +11 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ6-/343/203/225/343/202/241/343/202/244/343/203/253/347/233/243/350/246/226/README.md +3 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ6-/343/203/225/343/202/241/343/202/244/343/203/253/347/233/243/350/246/226/REQ6.1-SSE/345/244/211/346/233/264/351/200/232/347/237/245.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ7-/345/244/211/346/233/264/345/261/245/346/255/264/README.md +3 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ7-/345/244/211/346/233/264/345/261/245/346/255/264/REQ7.1-/343/203/225/343/202/241/343/202/244/343/203/253/345/244/211/346/233/264/345/261/245/346/255/264.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ7-/345/244/211/346/233/264/345/261/245/346/255/264/REQ7.2-/343/202/277/343/202/244/343/203/240/343/203/251/343/202/244/343/203/263.md +10 -0
- package/.next/standalone/docs//350/246/201/344/273/266/345/256/232/347/276/251/REQ7-/345/244/211/346/233/264/345/261/245/346/255/264/REQ7.3-diff/350/241/250/347/244/272.md +10 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R1-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/351/226/262/350/246/247/346/200/247/R1.1-/347/213/254/347/253/213/343/203/223/343/203/245/343/203/274/343/202/242.md +11 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R1-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/351/226/262/350/246/247/346/200/247/R1.2-/345/244/247/347/224/273/351/235/242/350/241/250/347/244/272.md +11 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R1-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/351/226/262/350/246/247/346/200/247/R1.3-/343/203/212/343/203/223/343/202/262/343/203/274/343/202/267/343/203/247/343/203/263/345/261/245/346/255/264.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R1-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/351/226/262/350/246/247/346/200/247/R1.4-/344/277/235/345/255/230/345/215/263/345/217/215/346/230/240.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R1-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/351/226/262/350/246/247/346/200/247/R1.5-/345/205/261/346/234/211/345/217/257/350/203/275URL.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R1-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/351/226/262/350/246/247/346/200/247/README.md +7 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R2-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/351/226/242/344/277/202/343/201/256/345/217/257/350/246/226/345/214/226/R2.1-/344/276/235/345/255/230/351/226/242/344/277/202/343/201/256/346/212/212/346/217/241.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R2-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/351/226/242/344/277/202/343/201/256/345/217/257/350/246/226/345/214/226/R2.2-/345/217/202/347/205/247/345/205/203/343/201/256/346/212/212/346/217/241.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R2-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/351/226/242/344/277/202/343/201/256/345/217/257/350/246/226/345/214/226/README.md +8 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R3-/343/202/252/343/203/263/343/203/234/343/203/274/343/203/207/343/202/243/343/203/263/343/202/260/346/224/257/346/217/264/R3.1-/347/224/250/350/252/236/343/201/256/345/215/263/346/231/202/347/242/272/350/252/215.md +11 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R3-/343/202/252/343/203/263/343/203/234/343/203/274/343/203/207/343/202/243/343/203/263/343/202/260/346/224/257/346/217/264/README.md +7 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R4-/345/244/211/346/233/264/345/261/245/346/255/264/343/201/256/346/212/212/346/217/241/R4.1-/345/244/211/346/233/264/345/206/205/345/256/271/343/201/256/350/277/275/350/267/241.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R4-/345/244/211/346/233/264/345/261/245/346/255/264/343/201/256/346/212/212/346/217/241/R4.2-/345/275/261/351/237/277/347/257/204/345/233/262/343/201/256/344/277/257/347/236/260.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R4-/345/244/211/346/233/264/345/261/245/346/255/264/343/201/256/346/212/212/346/217/241/README.md +7 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R5-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/346/216/242/347/264/242/346/200/247/R5.1-/343/203/225/343/202/241/343/202/244/343/203/253/345/220/215/346/244/234/347/264/242.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R5-/343/203/211/343/202/255/343/203/245/343/203/241/343/203/263/343/203/210/346/216/242/347/264/242/346/200/247/README.md +7 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R6-/343/203/207/343/203/227/343/203/255/343/202/244/346/237/224/350/273/237/346/200/247/R6.1-Docker/351/205/215/344/277/241.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R6-/343/203/207/343/203/227/343/203/255/343/202/244/346/237/224/350/273/237/346/200/247/R6.2-/343/202/265/343/203/226/343/203/221/343/202/271/351/205/215/344/277/241.md +9 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/R6-/343/203/207/343/203/227/343/203/255/343/202/244/346/237/224/350/273/237/346/200/247/README.md +7 -0
- package/.next/standalone/docs//350/246/201/346/261/202/345/256/232/347/276/251/README.md +9 -0
- package/.next/standalone/next.config.ts +7 -0
- package/.next/standalone/package.json +23 -1
- package/.next/standalone/scripts/docker-run.mjs +24 -0
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/app/api/asset/route.ts +40 -0
- package/.next/standalone/src/app/api/watch/route.ts +89 -0
- package/.next/standalone/src/app/page.tsx +72 -9
- package/.next/standalone/src/components/DetailPanel.tsx +40 -7
- package/.next/standalone/src/components/DiffView.tsx +2 -1
- package/.next/standalone/src/components/HistoryPanel.tsx +5 -2
- package/.next/standalone/src/components/LinkGraph.tsx +181 -10
- package/.next/standalone/src/components/Markdown.tsx +128 -8
- package/.next/standalone/src/components/PreviewPopup.tsx +6 -3
- package/.next/standalone/src/components/SearchBar.tsx +2 -1
- package/.next/standalone/src/components/TimelinePanel.tsx +5 -2
- package/.next/standalone/src/components/TreeView.tsx +36 -9
- package/.next/standalone/src/lib/basePath.ts +8 -0
- package/.next/standalone/src/lib/docs.ts +12 -0
- package/.next/standalone/src/lib/links.ts +98 -25
- package/.next/standalone/src/lib/useRefreshTick.ts +44 -0
- package/.next/standalone/tsconfig.tsbuildinfo +1 -1
- package/.next/static/chunks/0.z3b.-~oogkw.js +11 -0
- package/.next/static/chunks/13tjphiswda64.css +1 -0
- package/LICENSE +21 -0
- package/README.md +71 -21
- package/package.json +23 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04otwp7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_gt~a4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j8-xkl._.js +0 -13
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0owpp0l._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qnrcw7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0yvq0sd._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zoyna0._.js +0 -3
- package/.next/standalone/.next/static/chunks/04x.fjh8sw0s1.css +0 -1
- package/.next/standalone/.next/static/chunks/0z_707.y37o2..js +0 -11
- package/.next/standalone/AGENTS.md +0 -5
- package/.next/standalone/CLAUDE.md +0 -1
- package/.next/standalone/markshelf-0.1.0.tgz +0 -0
- package/.next/standalone/markshelf-0.1.2.tgz +0 -0
- package/.next/static/chunks/04x.fjh8sw0s1.css +0 -1
- package/.next/static/chunks/0z_707.y37o2..js +0 -11
- /package/.next/standalone/.next/static/{JkyieJgBB2eU8MtnlBGvG → JZXBFyFBzt6ffFpnmO9cB}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{JkyieJgBB2eU8MtnlBGvG → JZXBFyFBzt6ffFpnmO9cB}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{JkyieJgBB2eU8MtnlBGvG → JZXBFyFBzt6ffFpnmO9cB}/_ssgManifest.js +0 -0
- /package/.next/static/{JkyieJgBB2eU8MtnlBGvG → JZXBFyFBzt6ffFpnmO9cB}/_buildManifest.js +0 -0
- /package/.next/static/{JkyieJgBB2eU8MtnlBGvG → JZXBFyFBzt6ffFpnmO9cB}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{JkyieJgBB2eU8MtnlBGvG → JZXBFyFBzt6ffFpnmO9cB}/_ssgManifest.js +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useEffect, useState, useCallback, useMemo
|
|
3
|
+
import { useEffect, useState, useCallback, useMemo } from "react";
|
|
4
4
|
import { TreeView } from "@/components/TreeView";
|
|
5
5
|
import { DetailPanel } from "@/components/DetailPanel";
|
|
6
6
|
import { SearchBar } from "@/components/SearchBar";
|
|
7
7
|
import { TimelinePanel } from "@/components/TimelinePanel";
|
|
8
|
+
import { useRefreshTick } from "@/lib/useRefreshTick";
|
|
9
|
+
import { withBasePath } from "@/lib/basePath";
|
|
8
10
|
import { Clock } from "lucide-react";
|
|
9
11
|
|
|
10
12
|
interface TreeEntry {
|
|
@@ -16,36 +18,80 @@ interface TreeEntry {
|
|
|
16
18
|
hasReadme?: boolean;
|
|
17
19
|
}
|
|
18
20
|
|
|
21
|
+
const FILE_QUERY_KEY = "file";
|
|
22
|
+
|
|
23
|
+
function readFileFromUrl(): string | null {
|
|
24
|
+
if (typeof window === "undefined") return null;
|
|
25
|
+
const v = new URL(window.location.href).searchParams.get(FILE_QUERY_KEY);
|
|
26
|
+
return v ? decodeURIComponent(v) : null;
|
|
27
|
+
}
|
|
28
|
+
|
|
19
29
|
export default function Home() {
|
|
20
30
|
const [tree, setTree] = useState<TreeEntry[]>([]);
|
|
21
31
|
const [root, setRoot] = useState<string>("");
|
|
22
32
|
const [selectedPath, setSelectedPath] = useState<string | null>(null);
|
|
23
33
|
const [treeWidth, setTreeWidth] = useState(260);
|
|
24
34
|
const [showTimeline, setShowTimeline] = useState(false);
|
|
25
|
-
const
|
|
35
|
+
const [backStack, setBackStack] = useState<string[]>([]);
|
|
36
|
+
const [forwardStack, setForwardStack] = useState<string[]>([]);
|
|
37
|
+
|
|
38
|
+
// Initial hydration from URL (?file=...)
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
const fromUrl = readFileFromUrl();
|
|
41
|
+
if (fromUrl) setSelectedPath(fromUrl);
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
// Keep URL in sync with selectedPath (shareable links)
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (typeof window === "undefined") return;
|
|
47
|
+
const url = new URL(window.location.href);
|
|
48
|
+
if (selectedPath) {
|
|
49
|
+
url.searchParams.set(FILE_QUERY_KEY, selectedPath);
|
|
50
|
+
} else {
|
|
51
|
+
url.searchParams.delete(FILE_QUERY_KEY);
|
|
52
|
+
}
|
|
53
|
+
const next = url.pathname + (url.search ? url.search : "") + url.hash;
|
|
54
|
+
if (next !== window.location.pathname + window.location.search + window.location.hash) {
|
|
55
|
+
window.history.replaceState(null, "", next);
|
|
56
|
+
}
|
|
57
|
+
}, [selectedPath]);
|
|
26
58
|
|
|
27
59
|
const navigateTo = useCallback((path: string | null) => {
|
|
28
60
|
if (selectedPath && path !== selectedPath) {
|
|
29
|
-
|
|
61
|
+
setBackStack((s) => [...s, selectedPath]);
|
|
62
|
+
setForwardStack([]);
|
|
30
63
|
}
|
|
31
64
|
setSelectedPath(path);
|
|
32
65
|
}, [selectedPath]);
|
|
33
66
|
|
|
34
67
|
const goBack = useCallback(() => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
68
|
+
if (backStack.length === 0) return;
|
|
69
|
+
const prev = backStack[backStack.length - 1];
|
|
70
|
+
if (selectedPath) setForwardStack((s) => [...s, selectedPath]);
|
|
71
|
+
setBackStack((s) => s.slice(0, -1));
|
|
72
|
+
setSelectedPath(prev);
|
|
73
|
+
}, [backStack, selectedPath]);
|
|
74
|
+
|
|
75
|
+
const goForward = useCallback(() => {
|
|
76
|
+
if (forwardStack.length === 0) return;
|
|
77
|
+
const next = forwardStack[forwardStack.length - 1];
|
|
78
|
+
if (selectedPath) setBackStack((s) => [...s, selectedPath]);
|
|
79
|
+
setForwardStack((s) => s.slice(0, -1));
|
|
80
|
+
setSelectedPath(next);
|
|
81
|
+
}, [forwardStack, selectedPath]);
|
|
38
82
|
|
|
39
|
-
const canGoBack =
|
|
83
|
+
const canGoBack = backStack.length > 0;
|
|
84
|
+
const canGoForward = forwardStack.length > 0;
|
|
85
|
+
const refreshTick = useRefreshTick();
|
|
40
86
|
|
|
41
87
|
useEffect(() => {
|
|
42
|
-
fetch("/api/tree")
|
|
88
|
+
fetch(withBasePath("/api/tree"))
|
|
43
89
|
.then((r) => r.json())
|
|
44
90
|
.then((data) => {
|
|
45
91
|
setTree(data.tree ?? []);
|
|
46
92
|
setRoot(data.root ?? "");
|
|
47
93
|
});
|
|
48
|
-
}, []);
|
|
94
|
+
}, [refreshTick]);
|
|
49
95
|
|
|
50
96
|
useEffect(() => {
|
|
51
97
|
const saved = localStorage.getItem("markshelf:treeWidth");
|
|
@@ -71,6 +117,20 @@ export default function Home() {
|
|
|
71
117
|
return flatten(tree);
|
|
72
118
|
}, [tree]);
|
|
73
119
|
|
|
120
|
+
const folders = useMemo(() => {
|
|
121
|
+
const result: { path: string; displayName: string; depth: number }[] = [];
|
|
122
|
+
function walk(entries: TreeEntry[], depth: number) {
|
|
123
|
+
for (const e of entries) {
|
|
124
|
+
if (e.type === "folder") {
|
|
125
|
+
result.push({ path: e.path, displayName: e.displayName, depth });
|
|
126
|
+
if (e.children) walk(e.children, depth + 1);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
walk(tree, 0);
|
|
131
|
+
return result;
|
|
132
|
+
}, [tree]);
|
|
133
|
+
|
|
74
134
|
const startResize = useCallback((e: React.MouseEvent) => {
|
|
75
135
|
e.preventDefault();
|
|
76
136
|
document.body.style.userSelect = "none";
|
|
@@ -140,9 +200,12 @@ export default function Home() {
|
|
|
140
200
|
<DetailPanel
|
|
141
201
|
filePath={selectedPath}
|
|
142
202
|
fileRefs={fileRefs}
|
|
203
|
+
folders={folders}
|
|
143
204
|
onNavigate={navigateTo}
|
|
144
205
|
onGoBack={goBack}
|
|
206
|
+
onGoForward={goForward}
|
|
145
207
|
canGoBack={canGoBack}
|
|
208
|
+
canGoForward={canGoForward}
|
|
146
209
|
/>
|
|
147
210
|
) : (
|
|
148
211
|
<div className="p-6 text-[var(--text-muted)] text-sm flex items-center justify-center h-full">
|
|
@@ -6,17 +6,28 @@ import { HistoryPanel } from "./HistoryPanel";
|
|
|
6
6
|
import { TableOfContents, HeadingInfo } from "./TableOfContents";
|
|
7
7
|
import { PreviewPopup } from "./PreviewPopup";
|
|
8
8
|
import { LinkGraph } from "./LinkGraph";
|
|
9
|
-
import {
|
|
9
|
+
import { useRefreshTick } from "@/lib/useRefreshTick";
|
|
10
|
+
import { withBasePath } from "@/lib/basePath";
|
|
11
|
+
import { FileText, History, Network, ArrowLeft, ArrowRight } from "lucide-react";
|
|
12
|
+
|
|
13
|
+
interface FolderInfo {
|
|
14
|
+
path: string;
|
|
15
|
+
displayName: string;
|
|
16
|
+
depth: number;
|
|
17
|
+
}
|
|
10
18
|
|
|
11
19
|
interface Props {
|
|
12
20
|
filePath: string;
|
|
13
21
|
fileRefs?: FileRef[];
|
|
22
|
+
folders?: FolderInfo[];
|
|
14
23
|
onNavigate?: (path: string) => void;
|
|
15
24
|
onGoBack?: () => void;
|
|
25
|
+
onGoForward?: () => void;
|
|
16
26
|
canGoBack?: boolean;
|
|
27
|
+
canGoForward?: boolean;
|
|
17
28
|
}
|
|
18
29
|
|
|
19
|
-
export function DetailPanel({ filePath, fileRefs, onNavigate, onGoBack, canGoBack }: Props) {
|
|
30
|
+
export function DetailPanel({ filePath, fileRefs, folders, onNavigate, onGoBack, onGoForward, canGoBack, canGoForward }: Props) {
|
|
20
31
|
const [content, setContent] = useState<string | null>(null);
|
|
21
32
|
const [tab, setTab] = useState<"content" | "history" | "links">("content");
|
|
22
33
|
const [headings, setHeadings] = useState<HeadingInfo[]>([]);
|
|
@@ -35,20 +46,23 @@ export function DetailPanel({ filePath, fileRefs, onNavigate, onGoBack, canGoBac
|
|
|
35
46
|
const [previewPos, setPreviewPos] = useState<{ x: number; y: number } | null>(null);
|
|
36
47
|
const showTimer = useRef<ReturnType<typeof setTimeout>>(null);
|
|
37
48
|
const hideTimer = useRef<ReturnType<typeof setTimeout>>(null);
|
|
49
|
+
const refreshTick = useRefreshTick();
|
|
38
50
|
|
|
39
51
|
useEffect(() => {
|
|
40
52
|
setContent(null);
|
|
41
53
|
setHeadings([]);
|
|
42
|
-
// Clear preview popup state and cancel any pending timers on navigation
|
|
43
54
|
if (showTimer.current) clearTimeout(showTimer.current);
|
|
44
55
|
if (hideTimer.current) clearTimeout(hideTimer.current);
|
|
45
56
|
setPreviewPath(null);
|
|
46
57
|
setPreviewPos(null);
|
|
47
|
-
|
|
58
|
+
}, [filePath]);
|
|
59
|
+
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
fetch(withBasePath(`/api/file?path=${encodeURIComponent(filePath)}`))
|
|
48
62
|
.then((r) => r.json())
|
|
49
63
|
.then((data) => setContent(data.content ?? null))
|
|
50
64
|
.catch(() => setContent(null));
|
|
51
|
-
}, [filePath]);
|
|
65
|
+
}, [filePath, refreshTick]);
|
|
52
66
|
|
|
53
67
|
const handlePreviewShow = useCallback((path: string, rect: DOMRect) => {
|
|
54
68
|
if (hideTimer.current) clearTimeout(hideTimer.current);
|
|
@@ -113,6 +127,15 @@ export function DetailPanel({ filePath, fileRefs, onNavigate, onGoBack, canGoBac
|
|
|
113
127
|
<ArrowLeft size={14} />
|
|
114
128
|
</button>
|
|
115
129
|
)}
|
|
130
|
+
{canGoForward && (
|
|
131
|
+
<button
|
|
132
|
+
onClick={onGoForward}
|
|
133
|
+
className="shrink-0 p-0.5 rounded hover:bg-[var(--bg-muted)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors"
|
|
134
|
+
title="進む"
|
|
135
|
+
>
|
|
136
|
+
<ArrowRight size={14} />
|
|
137
|
+
</button>
|
|
138
|
+
)}
|
|
116
139
|
<h2 className="font-semibold text-[14px] leading-snug truncate text-[var(--text-primary)]">
|
|
117
140
|
{fileName}
|
|
118
141
|
</h2>
|
|
@@ -163,7 +186,10 @@ export function DetailPanel({ filePath, fileRefs, onNavigate, onGoBack, canGoBac
|
|
|
163
186
|
onHeadingsExtracted={setHeadings}
|
|
164
187
|
fileRefs={fileRefs}
|
|
165
188
|
currentPath={filePath}
|
|
166
|
-
onNavigate={
|
|
189
|
+
onNavigate={(p) => {
|
|
190
|
+
setTab("content");
|
|
191
|
+
onNavigate?.(p);
|
|
192
|
+
}}
|
|
167
193
|
onPreviewShow={handlePreviewShow}
|
|
168
194
|
onPreviewHide={handlePreviewHide}
|
|
169
195
|
>
|
|
@@ -195,7 +221,13 @@ export function DetailPanel({ filePath, fileRefs, onNavigate, onGoBack, canGoBac
|
|
|
195
221
|
</div>
|
|
196
222
|
) : (
|
|
197
223
|
<div className="flex-1 overflow-hidden">
|
|
198
|
-
<LinkGraph
|
|
224
|
+
<LinkGraph
|
|
225
|
+
currentPath={filePath}
|
|
226
|
+
folders={folders ?? []}
|
|
227
|
+
onNavigate={(p) => onNavigate?.(p)}
|
|
228
|
+
onPreviewShow={handlePreviewShow}
|
|
229
|
+
onPreviewHide={handlePreviewHide}
|
|
230
|
+
/>
|
|
199
231
|
</div>
|
|
200
232
|
)}
|
|
201
233
|
|
|
@@ -205,6 +237,7 @@ export function DetailPanel({ filePath, fileRefs, onNavigate, onGoBack, canGoBac
|
|
|
205
237
|
onNavigate={(p) => {
|
|
206
238
|
setPreviewPath(null);
|
|
207
239
|
setPreviewPos(null);
|
|
240
|
+
setTab("content");
|
|
208
241
|
onNavigate?.(p);
|
|
209
242
|
}}
|
|
210
243
|
onMouseEnter={handlePreviewEnter}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
|
+
import { withBasePath } from "@/lib/basePath";
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
7
|
filePath: string;
|
|
@@ -12,7 +13,7 @@ export function DiffView({ filePath, hash }: Props) {
|
|
|
12
13
|
|
|
13
14
|
useEffect(() => {
|
|
14
15
|
setDiff(null);
|
|
15
|
-
fetch(`/api/diff?path=${encodeURIComponent(filePath)}&hash=${hash}`)
|
|
16
|
+
fetch(withBasePath(`/api/diff?path=${encodeURIComponent(filePath)}&hash=${hash}`))
|
|
16
17
|
.then((r) => r.json())
|
|
17
18
|
.then((data) => setDiff(data.diff))
|
|
18
19
|
.catch(() => setDiff("(差分を取得できませんでした)"));
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { GitCommit, ChevronDown, ChevronRight } from "lucide-react";
|
|
5
5
|
import { DiffView } from "./DiffView";
|
|
6
|
+
import { useRefreshTick } from "@/lib/useRefreshTick";
|
|
7
|
+
import { withBasePath } from "@/lib/basePath";
|
|
6
8
|
|
|
7
9
|
interface CommitEntry {
|
|
8
10
|
hash: string;
|
|
@@ -20,18 +22,19 @@ export function HistoryPanel({ filePath }: Props) {
|
|
|
20
22
|
const [history, setHistory] = useState<CommitEntry[]>([]);
|
|
21
23
|
const [loading, setLoading] = useState(true);
|
|
22
24
|
const [expandedHash, setExpandedHash] = useState<string | null>(null);
|
|
25
|
+
const refreshTick = useRefreshTick();
|
|
23
26
|
|
|
24
27
|
useEffect(() => {
|
|
25
28
|
setLoading(true);
|
|
26
29
|
setExpandedHash(null);
|
|
27
|
-
fetch(`/api/history?path=${encodeURIComponent(filePath)}`)
|
|
30
|
+
fetch(withBasePath(`/api/history?path=${encodeURIComponent(filePath)}`))
|
|
28
31
|
.then((r) => r.json())
|
|
29
32
|
.then((data) => {
|
|
30
33
|
setHistory(data);
|
|
31
34
|
setLoading(false);
|
|
32
35
|
})
|
|
33
36
|
.catch(() => setLoading(false));
|
|
34
|
-
}, [filePath]);
|
|
37
|
+
}, [filePath, refreshTick]);
|
|
35
38
|
|
|
36
39
|
if (loading) {
|
|
37
40
|
return <div className="p-4 text-[var(--text-muted)] text-[13px]">読み込み中...</div>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import cytoscape from "cytoscape";
|
|
5
|
+
import { useRefreshTick } from "@/lib/useRefreshTick";
|
|
6
|
+
import { withBasePath } from "@/lib/basePath";
|
|
7
|
+
import { Filter } from "lucide-react";
|
|
5
8
|
|
|
6
9
|
interface GraphNode {
|
|
7
10
|
id: string;
|
|
@@ -13,12 +16,23 @@ interface GraphEdge {
|
|
|
13
16
|
target: string;
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
interface FolderInfo {
|
|
20
|
+
path: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
depth: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
interface Props {
|
|
17
26
|
currentPath: string;
|
|
27
|
+
folders: FolderInfo[];
|
|
18
28
|
onNavigate: (path: string) => void;
|
|
29
|
+
onPreviewShow?: (path: string, rect: DOMRect) => void;
|
|
30
|
+
onPreviewHide?: () => void;
|
|
19
31
|
}
|
|
20
32
|
|
|
21
33
|
const DEPTH_KEY = "markshelf:linkGraphDepth";
|
|
34
|
+
const EXCLUDE_KEY = "markshelf:linkGraphExclude";
|
|
35
|
+
const ZOOM_KEY = "markshelf:linkGraphZoom";
|
|
22
36
|
const DEPTH_OPTIONS: { value: number; label: string }[] = [
|
|
23
37
|
{ value: 1, label: "1階層" },
|
|
24
38
|
{ value: 2, label: "2階層" },
|
|
@@ -26,13 +40,17 @@ const DEPTH_OPTIONS: { value: number; label: string }[] = [
|
|
|
26
40
|
{ value: Infinity, label: "全階層" },
|
|
27
41
|
];
|
|
28
42
|
|
|
29
|
-
export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
43
|
+
export function LinkGraph({ currentPath, folders, onNavigate, onPreviewShow, onPreviewHide }: Props) {
|
|
30
44
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
31
45
|
const cyRef = useRef<cytoscape.Core | null>(null);
|
|
46
|
+
const filterPopoverRef = useRef<HTMLDivElement>(null);
|
|
32
47
|
const [loading, setLoading] = useState(true);
|
|
33
48
|
const [empty, setEmpty] = useState(false);
|
|
34
49
|
const [ready, setReady] = useState(false);
|
|
35
50
|
const [depth, setDepth] = useState<number>(1);
|
|
51
|
+
const [excluded, setExcluded] = useState<string[]>([]);
|
|
52
|
+
const [showFilter, setShowFilter] = useState(false);
|
|
53
|
+
const refreshTick = useRefreshTick();
|
|
36
54
|
|
|
37
55
|
useEffect(() => {
|
|
38
56
|
const saved = localStorage.getItem(DEPTH_KEY);
|
|
@@ -41,11 +59,65 @@ export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
|
41
59
|
if (Number.isFinite(v) || v === Infinity) setDepth(v);
|
|
42
60
|
}, []);
|
|
43
61
|
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
const saved = localStorage.getItem(EXCLUDE_KEY);
|
|
64
|
+
if (!saved) return;
|
|
65
|
+
try {
|
|
66
|
+
const arr = JSON.parse(saved);
|
|
67
|
+
if (Array.isArray(arr)) setExcluded(arr.filter((s) => typeof s === "string"));
|
|
68
|
+
} catch {
|
|
69
|
+
/* ignore */
|
|
70
|
+
}
|
|
71
|
+
}, []);
|
|
72
|
+
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (!showFilter) return;
|
|
75
|
+
const onClick = (e: MouseEvent) => {
|
|
76
|
+
if (filterPopoverRef.current && !filterPopoverRef.current.contains(e.target as Node)) {
|
|
77
|
+
setShowFilter(false);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
document.addEventListener("mousedown", onClick);
|
|
81
|
+
return () => document.removeEventListener("mousedown", onClick);
|
|
82
|
+
}, [showFilter]);
|
|
83
|
+
|
|
44
84
|
const changeDepth = (d: number) => {
|
|
45
85
|
setDepth(d);
|
|
46
86
|
localStorage.setItem(DEPTH_KEY, d === Infinity ? "all" : String(d));
|
|
47
87
|
};
|
|
48
88
|
|
|
89
|
+
const toggleExclude = (folderPath: string) => {
|
|
90
|
+
setExcluded((prev) => {
|
|
91
|
+
const next = prev.includes(folderPath)
|
|
92
|
+
? prev.filter((p) => p !== folderPath)
|
|
93
|
+
: [...prev, folderPath];
|
|
94
|
+
localStorage.setItem(EXCLUDE_KEY, JSON.stringify(next));
|
|
95
|
+
return next;
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const isPathExcluded = useMemo(() => {
|
|
100
|
+
const prefixes = excluded.map((f) => f + "/");
|
|
101
|
+
const currentExcluded = excluded.some(
|
|
102
|
+
(f) => currentPath === f || currentPath.startsWith(f + "/"),
|
|
103
|
+
);
|
|
104
|
+
return (p: string): boolean => {
|
|
105
|
+
if (currentExcluded) return false;
|
|
106
|
+
if (p === currentPath) return false;
|
|
107
|
+
return prefixes.some((pre) => p.startsWith(pre));
|
|
108
|
+
};
|
|
109
|
+
}, [excluded, currentPath]);
|
|
110
|
+
|
|
111
|
+
// Latest-callback refs to keep Cytoscape handlers without re-initializing on parent re-renders
|
|
112
|
+
const onNavigateRef = useRef(onNavigate);
|
|
113
|
+
const onPreviewShowRef = useRef(onPreviewShow);
|
|
114
|
+
const onPreviewHideRef = useRef(onPreviewHide);
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
onNavigateRef.current = onNavigate;
|
|
117
|
+
onPreviewShowRef.current = onPreviewShow;
|
|
118
|
+
onPreviewHideRef.current = onPreviewHide;
|
|
119
|
+
});
|
|
120
|
+
|
|
49
121
|
useEffect(() => {
|
|
50
122
|
let cancelled = false;
|
|
51
123
|
|
|
@@ -53,14 +125,20 @@ export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
|
53
125
|
setEmpty(false);
|
|
54
126
|
setReady(false);
|
|
55
127
|
|
|
56
|
-
fetch("/api/graph")
|
|
128
|
+
fetch(withBasePath("/api/graph"))
|
|
57
129
|
.then((r) => r.json())
|
|
58
130
|
.then((data: { nodes: GraphNode[]; edges: GraphEdge[] }) => {
|
|
59
131
|
if (cancelled || !containerRef.current) return;
|
|
60
132
|
|
|
133
|
+
// Apply folder exclusion filter
|
|
134
|
+
const filteredNodes = data.nodes.filter((n) => !isPathExcluded(n.id));
|
|
135
|
+
const filteredEdges = data.edges.filter(
|
|
136
|
+
(e) => !isPathExcluded(e.source) && !isPathExcluded(e.target),
|
|
137
|
+
);
|
|
138
|
+
|
|
61
139
|
// Show only nodes reachable from currentPath (undirected connected component)
|
|
62
140
|
const adj = new Map<string, string[]>();
|
|
63
|
-
for (const e of
|
|
141
|
+
for (const e of filteredEdges) {
|
|
64
142
|
(adj.get(e.source) ?? adj.set(e.source, []).get(e.source)!).push(e.target);
|
|
65
143
|
(adj.get(e.target) ?? adj.set(e.target, []).get(e.target)!).push(e.source);
|
|
66
144
|
}
|
|
@@ -77,8 +155,8 @@ export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
|
77
155
|
}
|
|
78
156
|
}
|
|
79
157
|
|
|
80
|
-
const localNodes =
|
|
81
|
-
const localEdges =
|
|
158
|
+
const localNodes = filteredNodes.filter((n) => connectedPaths.has(n.id));
|
|
159
|
+
const localEdges = filteredEdges.filter(
|
|
82
160
|
(e) => connectedPaths.has(e.source) && connectedPaths.has(e.target),
|
|
83
161
|
);
|
|
84
162
|
|
|
@@ -172,6 +250,7 @@ export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
|
172
250
|
directed: true,
|
|
173
251
|
grid: false,
|
|
174
252
|
roots: rootPaths.length > 0 ? rootPaths : [currentPath],
|
|
253
|
+
transform: (_node, pos) => ({ x: pos.x, y: -pos.y }),
|
|
175
254
|
} as cytoscape.BreadthFirstLayoutOptions,
|
|
176
255
|
userZoomingEnabled: true,
|
|
177
256
|
userPanningEnabled: true,
|
|
@@ -182,12 +261,40 @@ export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
|
182
261
|
// Defer fit/center until container has layout dimensions
|
|
183
262
|
requestAnimationFrame(() => {
|
|
184
263
|
cy.resize();
|
|
185
|
-
|
|
186
|
-
if (
|
|
264
|
+
const savedZoom = Number(localStorage.getItem(ZOOM_KEY));
|
|
265
|
+
if (Number.isFinite(savedZoom) && savedZoom > 0) {
|
|
266
|
+
cy.zoom({
|
|
267
|
+
level: savedZoom,
|
|
268
|
+
renderedPosition: {
|
|
269
|
+
x: containerRef.current!.clientWidth / 2,
|
|
270
|
+
y: containerRef.current!.clientHeight / 2,
|
|
271
|
+
},
|
|
272
|
+
});
|
|
273
|
+
} else {
|
|
274
|
+
cy.fit(undefined, 50);
|
|
275
|
+
if (cy.zoom() > 0.9) {
|
|
276
|
+
cy.zoom({
|
|
277
|
+
level: 0.9,
|
|
278
|
+
renderedPosition: {
|
|
279
|
+
x: containerRef.current!.clientWidth / 2,
|
|
280
|
+
y: containerRef.current!.clientHeight / 2,
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
187
285
|
cy.center(cy.nodes("[?isCurrent]"));
|
|
188
286
|
setReady(true);
|
|
189
287
|
});
|
|
190
288
|
|
|
289
|
+
// Persist zoom level on user interaction (debounced)
|
|
290
|
+
let zoomWriteTimer: ReturnType<typeof setTimeout> | null = null;
|
|
291
|
+
cy.on("zoom", () => {
|
|
292
|
+
if (zoomWriteTimer) clearTimeout(zoomWriteTimer);
|
|
293
|
+
zoomWriteTimer = setTimeout(() => {
|
|
294
|
+
localStorage.setItem(ZOOM_KEY, String(cy.zoom()));
|
|
295
|
+
}, 200);
|
|
296
|
+
});
|
|
297
|
+
|
|
191
298
|
// Hover effects
|
|
192
299
|
cy.on("mouseover", "node", (e) => {
|
|
193
300
|
const node = e.target;
|
|
@@ -199,6 +306,26 @@ export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
|
199
306
|
});
|
|
200
307
|
}
|
|
201
308
|
containerRef.current!.style.cursor = "pointer";
|
|
309
|
+
|
|
310
|
+
const path = node.id();
|
|
311
|
+
if (onPreviewShowRef.current && containerRef.current) {
|
|
312
|
+
const bb = node.renderedBoundingBox();
|
|
313
|
+
const cRect = containerRef.current.getBoundingClientRect();
|
|
314
|
+
const left = cRect.left + bb.x1;
|
|
315
|
+
const top = cRect.top + bb.y1;
|
|
316
|
+
const rect = {
|
|
317
|
+
left,
|
|
318
|
+
top,
|
|
319
|
+
right: cRect.left + bb.x2,
|
|
320
|
+
bottom: cRect.top + bb.y2,
|
|
321
|
+
width: bb.w,
|
|
322
|
+
height: bb.h,
|
|
323
|
+
x: left,
|
|
324
|
+
y: top,
|
|
325
|
+
toJSON: () => ({}),
|
|
326
|
+
} as DOMRect;
|
|
327
|
+
onPreviewShowRef.current(path, rect);
|
|
328
|
+
}
|
|
202
329
|
});
|
|
203
330
|
|
|
204
331
|
cy.on("mouseout", "node", (e) => {
|
|
@@ -211,13 +338,14 @@ export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
|
211
338
|
});
|
|
212
339
|
}
|
|
213
340
|
containerRef.current!.style.cursor = "default";
|
|
341
|
+
onPreviewHideRef.current?.();
|
|
214
342
|
});
|
|
215
343
|
|
|
216
344
|
// Click to navigate
|
|
217
345
|
cy.on("tap", "node", (e) => {
|
|
218
346
|
const path = e.target.id();
|
|
219
347
|
if (path !== currentPath) {
|
|
220
|
-
|
|
348
|
+
onNavigateRef.current(path);
|
|
221
349
|
}
|
|
222
350
|
});
|
|
223
351
|
|
|
@@ -236,7 +364,7 @@ export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
|
236
364
|
cyRef.current?.destroy();
|
|
237
365
|
cyRef.current = null;
|
|
238
366
|
};
|
|
239
|
-
}, [currentPath,
|
|
367
|
+
}, [currentPath, depth, isPathExcluded, refreshTick]);
|
|
240
368
|
|
|
241
369
|
return (
|
|
242
370
|
<div className="h-full flex flex-col relative">
|
|
@@ -258,6 +386,49 @@ export function LinkGraph({ currentPath, onNavigate }: Props) {
|
|
|
258
386
|
</button>
|
|
259
387
|
);
|
|
260
388
|
})}
|
|
389
|
+
<div className="ml-auto relative" ref={filterPopoverRef}>
|
|
390
|
+
<button
|
|
391
|
+
onClick={() => setShowFilter((v) => !v)}
|
|
392
|
+
className={`flex items-center gap-1 px-2 py-0.5 rounded-md text-[11px] font-medium transition-colors ${
|
|
393
|
+
excluded.length > 0
|
|
394
|
+
? "bg-[var(--brand-primary)] text-white"
|
|
395
|
+
: "text-[var(--text-muted)] hover:bg-[var(--bg-muted)] hover:text-[var(--text-secondary)]"
|
|
396
|
+
}`}
|
|
397
|
+
title="フォルダを除外"
|
|
398
|
+
>
|
|
399
|
+
<Filter size={11} />
|
|
400
|
+
除外
|
|
401
|
+
{excluded.length > 0 && <span className="ml-0.5">({excluded.length})</span>}
|
|
402
|
+
</button>
|
|
403
|
+
{showFilter && (
|
|
404
|
+
<div className="absolute right-0 top-full mt-1 w-56 max-h-72 overflow-y-auto bg-[var(--bg-surface)] border border-[var(--border-default)] rounded-md shadow-lg z-20 py-1">
|
|
405
|
+
{folders.length === 0 ? (
|
|
406
|
+
<div className="px-3 py-2 text-[11px] text-[var(--text-muted)]">
|
|
407
|
+
フォルダがありません
|
|
408
|
+
</div>
|
|
409
|
+
) : (
|
|
410
|
+
folders.map((f) => {
|
|
411
|
+
const checked = excluded.includes(f.path);
|
|
412
|
+
return (
|
|
413
|
+
<label
|
|
414
|
+
key={f.path}
|
|
415
|
+
className="flex items-center gap-2 px-3 py-1 text-[12px] cursor-pointer hover:bg-[var(--bg-muted)]"
|
|
416
|
+
style={{ paddingLeft: `${12 + f.depth * 12}px` }}
|
|
417
|
+
>
|
|
418
|
+
<input
|
|
419
|
+
type="checkbox"
|
|
420
|
+
checked={checked}
|
|
421
|
+
onChange={() => toggleExclude(f.path)}
|
|
422
|
+
className="shrink-0"
|
|
423
|
+
/>
|
|
424
|
+
<span className="truncate text-[var(--text-secondary)]">{f.displayName}</span>
|
|
425
|
+
</label>
|
|
426
|
+
);
|
|
427
|
+
})
|
|
428
|
+
)}
|
|
429
|
+
</div>
|
|
430
|
+
)}
|
|
431
|
+
</div>
|
|
261
432
|
</div>
|
|
262
433
|
{(loading || empty) && (
|
|
263
434
|
<div className="absolute inset-0 flex items-center justify-center text-[13px] text-[var(--text-muted)] z-10 bg-[var(--bg-surface)]">
|