@youtyan/code-viewer 0.1.8 → 0.1.10
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/README.md +56 -2
- package/package.json +13 -5
- package/web/app.js +7728 -660
- package/web/index.html +7 -3
- package/web/mermaid.js +156840 -0
- package/web/shiki.js +13182 -0
- package/web/style.css +719 -30
- package/web-src/server/git.ts +114 -7
- package/web-src/server/preview.ts +300 -16
- package/web-src/types.ts +2 -0
package/web/index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>
|
|
6
|
+
<title>code viewer</title>
|
|
7
7
|
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
8
8
|
|
|
9
9
|
<!-- diff2html/highlight.js assets are vendored so the preview works offline
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
<div id="app">
|
|
21
21
|
<header id="global-header">
|
|
22
22
|
<a class="brand" href="/" aria-label="Repository home">
|
|
23
|
-
<
|
|
24
|
-
<span class="title">
|
|
23
|
+
<img class="brand-icon" src="/favicon.png" alt="" width="20" height="20" />
|
|
24
|
+
<span class="title">code viewer</span>
|
|
25
25
|
</a>
|
|
26
26
|
<nav class="app-menu" aria-label="Views">
|
|
27
27
|
<a class="app-menu-item active" data-route="repo" href="/">Repository</a>
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
<div class="sb-head">
|
|
80
80
|
<span class="sb-title">Files</span>
|
|
81
81
|
<span id="totals"></span>
|
|
82
|
+
<div class="sb-actions" role="group" aria-label="folder actions">
|
|
83
|
+
<button id="sb-expand-all" class="sb-icon-action sb-tree-action" title="expand all folders" aria-label="expand all folders"></button>
|
|
84
|
+
<button id="sb-collapse-all" class="sb-icon-action sb-tree-action" title="collapse all folders" aria-label="collapse all folders"></button>
|
|
85
|
+
</div>
|
|
82
86
|
<div class="seg sb-view-seg" role="group" aria-label="view">
|
|
83
87
|
<button data-view="tree" class="active" title="tree view">tree</button>
|
|
84
88
|
<button data-view="flat" title="flat list">flat</button>
|